Hello All ! I know it has been a while since my last update. I am actually working and making very good progress. As always the facebook page is the most up to date and the BEST way to contact me !
In a nutshell I’m almost done with Bot 2 of 4. It works well and I’ve added several new features. Whats left to do for Bot 2 is clear and Bot 3 will be even better.
I have built a “engine” that does all of the heavy lifting for communicating with the system. Connecting, sending and receiving message and even other stuff like system statistics are all take care of by the engine. The engine is fully documented and has been stripped down as much as possible to keep it simple and easy to use.
The engine can be used in a Linux or Windows java application, or in android. The same exact engine is integrated into all of the software that is developed on to of it, no matter what the platform.
I have added support for up to 4 servos. Each servo is independantly controlled by sending it an angle of up to a tenth of a degree. The angles are from 0 to 180. This works well with the micro servos and has me thinking of ways to control the camera as well as how to add arms or appendages.
Analog to Digital Conversions
I had previously only 1 ADC that worked on the hardware. I had thought eventually I would get to three. However after investingating it again I was easily able to get 6 to work. So now the unit has 6 ADC conversions updated about 10 times a second. One of them is used for the battery, this helps you know when the battery is getting low. I also plan on using another one for the charging current, but this will be in bot3.
I was amazed that all of this works on one single CR123 battery at 3.7v. As of now it lasts about 30 minutes before the software will notify you that the battery is low. As with most electronics when the battery is low it misbehaves more. I dont know if I will continue to try and use only one cell. I built a extra battery pack in case I need it, this would give me about 3 hours of battery life.
I have also investigated the battery charger and understand how it works. I even made a test circuit. BUT working with the IC is nearly impossible, it is too small. I burnt up the one I was testing with and moved on. Theoretically it looks like everything is good and it *should* work. Hopefully I can also address this in bot3 if I have any charger IC’s left. I have not been able to find a larger IC replacement that works the same.
I’m using wifi communication, which for some reason maxes out at about the same as the bluetooth 230Kbps. It is however much more stable and powerful since you can connect it to your router and forward it across the internet. You would have issues pushing bluetooth across the internet.
I still support the bluetooth modules, and even another wifi module. I dont know how much support I will have for the other modules. I think support for them will be on a “as needed” basis. However, as of now there is working drivers for all the modules I have used.
In bot3 I plan on switching to SPI which will give me a much greater throughput, up to 4Mbps with the same wifi interface. I will also have to add commands to connect to your router and set passwords etc.
There is a small set of commands that can be sent to the bot, In both the java example and the android example I expose the entire tree of commands. I have also added several commands to do things such as set the camera resolution, set gpio, slow superloop and much more. I’ve wrapped all of the commands into a system so you can simply call the function with the name of the command as a string and send it off.
For example to send a message to slow the internal loop of the bot down by having a delay of 500 milliseconds you can send this command (assuming you are connected).
BotMessage bm = new BotMessage();
// slow things down if debugging !
bm.updateMessage("CONTROL", "SETDELAY", 500);
That is all the code needed to create and send the message. It is the same for all of the other commands that control pwm, servos, camera etc.
I have built this platform similar to Bot1, but I used the polulu 30T tracks this time so I can compare and contrast the two. I also attached lights to the front.
Java PC Example
I have written a java application that shows how to use the ZEngine. This application exposes all of the controls to the user. It is meant to be a starting point for whoever wants to develop a specific application on top of the ZEngine.
I have a short and semi confusing video using it on Youtube. It shows all of the components functioning together.
I do not consider it complete until the Android software works as well. I’m almost done with the Android example code. It also exposes all of the functionality to the user. The picture you see below has all of the controls in a “sliding drawer”, so when you hit the control button at the top all of the controls are out of your sight.
It shows you the status of all gpio and the ADC’s, and when you bring up all the controls it gives you control of 8 gpio, 4 servos and the custom command tree (which is everything).
To “drive” I have implemented left and right motion controlled by two pointers on either side of the screen. So if you put your thumb down anywhere on the left side of the screen and move upward the left motor will move forward, same for backward and the right motor. I’m not sure how easy it will be to drive this way, but if its not fun I’ll put in the simple analog joystick control again.