BEN’S OMNI-DIRECTIONAL ROBOT ( OMNI-BOT )
About the Author!
Hey! My name is Ben F and I go to Friends Academy, a private school on Long Island. Ever since I was little I wanted to build things, whether it meant building lego’s or destroying stereo’s. I mean who uses stereo’s now-a-days? After 15 years of financial torture, my parents said enough, they decided to give the VCR’s a break and send me to BlueStamp. At first I was ecstatic about going because who wouldn’t love to make robots and solder joints, however I definitely did not know how hard it would actually be.
My experience at BlueStamp was amazing and I couldn’t be more grateful to my instructors, Dave and Robin, and all the others who helped me tackle an obstacle that seemed impossible just under 6 weeks ago.
The Final Blog Post Video!!
My Working Code ( BenF_working_omnibot_code )
My Build Materials ( BSE BOM list )
***PLEASE NOTE*** ( This is a fully functioning omni-bot code, the only thing that needs to be done is for you to copy and paste it into an Arduino sketch on a PC, NOT A MAC, this code does not work on Apple products. )
THE BIG MILESTONE!!!! MILESTONE NUMER 3!!!!
The greatest feeling you can ever achieve is writing a recap story of something that took so much effort and time.
My final Milestone has to be getting the final code to compile, upload, and work on my robot. This milestone was definitely felt the greatest to accomplish because i’ve never written code before and I wrote a lot of the code that was used to make the robot work.
On my PS2 controller the buttons that control the functions are as follows
X = Move Forward, ∆ = Move Backward, O = Rotate Counter-Clockwise, Square= Rotate Clockwise, R1 = Move Diagonal/Left/Backward, R2 = Move Diagonal/Left/Forward, L1 = Move Diagonal/Right/Backward, L2 = Move Diagonal/Right/Forward
The de-bugging process took 90% of the 4 weeks that I spent on coding. De-bugging is going through each end every line of your code and making minor tweaks. Debugging is not only hard, but its extremely tedious and annoying to go through upwards of 250 lines of code and correcting mistakes that could be as minor as a missed semi-colon at the end of a code, or a missing squiggly bracket at the end of a loop statement.
Milestone Number 2!!
Due to the fact that the breadboard/arduino layout and code that i got from Adafruit was used just to allow me to learn more about the arduino, I had to find a completely new layout that I could use to control how much power to send to specific wheels to make them move in any direction I want. The previous layout let me only send equal power to all the motors, rotating the robot counter-clockwise.
Every omni-directional robot is different in it’s own way, so finding a breadboard layout that allowed me to specify direction and speed was extremely difficult, luckily a layout that seems to work is the omni-bot schematic on Bill Porter’s website ( http://www.billporter.info/2010/06/05/wp-content/uploads/2010/06/PS2X_lib_v1_41.zip )
Wiring the PS2 controller’s blue-tooth connector to the Arduino was without a doubt a challenge. Thank god for Bill Porter, because without him and his website I most definitely wouldn’t have even come close to finishing my project.
Thankfully the only minor obstacle that I encountered while wiring up the arduino and the breadboard was that the motors were connected to the same arduino pins in the code as the PS2 blue-tooth connector so when I was doing my testing my serial monitor kept reading “faulty wiring”. This was easily fixable by going through the code and re-attaching the motors to different arduino pins
My First Milestone!
After 2 and 1/2 weeks of hard work, I finally reached my first milestone.
My first milestone was to finish the hardware of my robot (the steel frame, the metal axels, the motors & wheels, etc.), and to completely connect the breadboard with the Arduino and the wheels so that when a nine volt battery is connected to the breadboard each of the three wheels would be given an equal charge at 3 volts causing the robot to rotate.
Although it sounds extremely complicated, connecting the breadboard, the Arduino, and the motors was somewhat simple with the help of Adafruit’s tutorials on how to move DC motors forward and backwards using the Arduino Uno. The tutorial I used can be found at, http://learn.adafruit.com/adafruit-arduino-lesson-15-dc-motor-reversing. (Please note: the information provided in the adafruit tutorial is NOT the final breadboard layout and code, it is simply an example for those who are inexperienced in DC Motor Reversing)
One speed bump that I encountered in the first week was looking for a schematic (build plan) for the hardware kit that I purchased from Vex Hardware, http://www.vexrobotics.com/276-2161.html. Only after 8 hours of searching on the internet for a schematic and many apiffanies of giving up and choosing a new project did I learn that what I purchased from Vex was not the hardware for any specific robot but was just a bundle of arbitrary parts that could make an endless possibility of robots, from an Omni-Directional robot, to just any old RC car. As a result i had to create my own schematic which took about 5 minutes. (Very different from the previous 8 hours I had spent).
“Many of life’s failures are from people who did not realize how close they were to success and gave up.” – Thomas Alva Edison
My Starter Project
For my starter project I chose to make the Laser Sensitive Target, provided by Electronic Goldmine LLC. (http://www.goldmine-elec-products.com/prodinfo.asp?number=C6739). I chose the laser target because i have some very powerful laser pointers and am a laser pointer fanatic. Also, the laser target is fairly easy starter project to make compared to the light seeking robot which requires loads of soldering, hundreds of transistors and resistors, multiple light panels, and two electric motors. Meanwhile the laser is simply 1 light sensor, 8 LED bulbs (light-emitting-diode’s), 2 resistors, a sensitivity dial, and a 9 volt battery connector.
The light sensor in the middle of the board picks up either the ambient light or the laser and sends a signal to the sensitivity dial telling it how much light there actually is. The sensitivity dial then tells the resistor how much energy to send to each of the LED’s. The greater the amount of light taken in by the sensor, the more energy is sent to the sensitivity dial; therefore, the more energy the resistors let through to the LED’s making them brighter.