Orbie Bot

My daughter came to me one night with one of her RC toys. She said she didn't use it that much so I could have it to build a robot. This is what she brought me and I had been wanting to make a robot for a while.


And this is what I turned it into.


It's a sonar sensing, object avoiding robot. It drives in a straight line until it finds an obstacle then it looks left and right and turns to whichever side is open. I also modified the code to have it back up a little before it scans left and right because it kept hitting the range sensor on the kitchen cabinets.

The Materials: 

1 x Mini Breadboard
1 x Arduino Uno
1 x Seeed Motor Shield
1 x Parallax Ping Sensor
1 x Micro Servo
1 x Orbiez Lady Bug

The Build:

     The first thing I did was strip everything off of the Orbiez except for the motors and the batteries. I tied the wires from the batteries to the motor shield input and removed the jumper. The batteries didn't have enough juice to run the motors and the board so I used a 9v battery to power the arduino. I also used a mini breadboard and some modified grove cables to connect everything. The seeed shield uses grove connections. They're the little 4 pin connectors. I connected the servo to pin 5 and the ping sensor to pin A1. I mounted the ping sensor on the longest arm that came with the micro servo and attached the servo to the front of the Orbiez with some two sided tape. The motors are connected to "Motor A" and "Motor B" on the shield. It doesn't really matter which is connected to which or if positive and negative get mixed up. I just ran the motor shield demo code to figure out what was what and then changed the different void sections to what was actually forward, backward, left and right. Here's the demo code.




Once I changed the right sections to forward, backward, left and right this is the code I ended up with.

The Final Code:



     It's a pretty simple robot. You may need to adjust the delay sections to get it to turn the way you want it to and adjust the servo numbers to center it and adjust how far it looks to either side.

     I'll post a video when I get a chance so you can see it in action.  Here it is.

Comments

Popular Posts