Awkun, interesting enough, started my foray into Robotics from Software Engineering & Penetration Testing. Basically, like most I've met. I was looking for a “fun” project to start working with various Arduino boards in my spare time between contracts.
The thought of flying drones in all there various forms (Quad-copter, Push You’s, Pull Me’s and Ornithopters) where very exciting. There, also, costly to crash and have shown a high risk of injury to either yourself or others around you. Especially when tree’s are involved.
While i can certainly see flying as an end game for drone based robotics. That also means it’s not exactly the best starting point. Then of course, there is, the current debacle with the FCC and Hobbyist’s. Or even the power requirements in creating a long distance drone controlling platform.
I felt a rover based platform was a perfect starting point. I could start on a smaller “desktop” size scale and then move into a larger outdoor version after testing was concluded.
I purchased a book on Arduino, as well as, a Mega 2950 Micro-controller, and, a Ultrasonic distance sensor. I wired everything up to a 9v battery pack and was shocked at how quickly i was pulling data from the Ultrasonic sensor. Granted the learning curve for C++ programming was low for me. But still, Arduino was easy. Arduino was fun. Arduino could be powerful! From this, the idea of “Awkun”, an autonomous rover was born.
Next, i had to create or buy an actual “Rover” body that had enough free room to let me experiment. My first thought was just to buy some Styrofoam and start shaping the size of body i needed. Sadly though, while i posses Software, Network, Database, Electrical and Mechanical engineering skills. I do not, posses Artistic or overall Material Construction skills. Needless to say, the rover body i had created pretty much sucked.
After some searching on Amazon, i had found a company called Sain Smart selling exactly what i was looking for! I purchased one of there Black 4WD Mobile Kit’s as it had everything i needed to get started! Or so i thought anyway. Once it showed up however, it was missing most of the screws. Annoying, to say the lest, but nothing a trip to the local Ace Hardware didn’t solve.
The directions for the kit where in a very badly translated form of English. They where based off a different model from a different company based in Taiwan. Very annoying, but they where close enough. I was able to to get everything wired up including the 4WD hack being used so that you didn’t need a second stepper motor board which i personally found pretty neat.
I took one look at the code provided for the kit and just cried inside. Don’t get me wrong. It worked, there were no compiler errors! When i did load up the code to test various parts of the kit it worked as intended. This however did not change the fact that it was poorly written, in my opinion of course.
Despite the doom and gloom, I did set out to at lest use what was provided and simply fixed issues with data types and variable storage (not storing all variables as global). I also switched to using #define for pin assignments rather than int variables in memory. Simple, much cleaner. I’ll re-write the entire thing later anyway.
It worked! On the desk anyway… everything was powered and working with the Mega 2950 Micro-controller. The wheels where also working with the Micro-controller via the stepper board (forward, backward, and, left, right turns). All powered on a 9v battery pack, not bad. Replacing copper tops every few days of non-stop use is not going to cut it of course. However, for the moment, it's working great!
The last step was adding a 3-axis accelerometer and logging it’s information. This was done so i could test how far the robot could tilt before high-centering or worse, falling down stairs. This way, when it detected such actions. It could reverse and move on / away from that area.
Sadly, though the logging data proved that the accelerometer alone was not enough to detect a sudden tilt. So i also added a “tilt sensor” which in this case was using Mercury to detect when it was tilting. This combined with the accelerometer data provided the needed protection while removing “most” false positiveness from the tilt sensor alone (such as running over something).
Awkun was alive! Well, not really. But it was a start! There was no servo motor for the “head” so a lot of guessing had to be made in the code as to if it was “safe” or not to turn, go forward or backward. It did get stuck in certain situations (such as hitting a poll that the Ultrasonic sensor could not see). But it worked!! I was happy, I was excited. My brain raced with upgrades both hardware and software. I felt like a kid again!