Now is the time we say goodbye. However, before we can do that, there are a few last things we need to take care of. I know you are totally psyched and ready to start building robots, but we still have to put the finishing touches on this one. Please hang in there with me. This will be quick!
First things first - or basically last - you should add a power switch to the robot. Toggling the power by opening it up and pulling a battery out is not particularly fun. It is so much easier to turn it on and off with a switch.
So, let's do that.
Find the black wire coming off of the 4 X AA battery holder and cut it in half.
Get an SPST toggle switch and attach two 8" black wires to it.
Solder one of these wires to one of the halves of the black battery holder wire and insulate it with shrink tube. Solder the other black wire to the other half, and insulate it as well.
Drill a 1/4" hole (or whatever size is appropriate to mount your switch) in the plastic box.
Mount the switch in the hole that you just drilled.
Congratulations, you now have a power switch.
Above you can see the complete wiring diagram for the robot. First off, stop and pat yourself on the back for having just accomplished all of that. Secondly, should the robot break or you ever encounter any other difficulties with the robot's hardware, check the wiring against this diagram first.
Also, while we are closing things out, you may have noticed that we have programmed all of the various elements of the robot individually, but never had them all running at once. Now is time to bring them all together into one routine.
This program encompasses all of the components that we have added. It allows for user control, but also uses the three sensors to identify obstacles and avoid them. In the code, the sensors are only activated when the person is driving the robot. When the sensors find danger, the robot stops and backs away on its own. Navigation is a collaboration between the person operating the robot remotely through Skype, and the robot itself.
To finish the whole thing up, upload the following code onto the robot:
There are many things you could do to push this robot further.
Foremost, you can improve upon the code. Some ideas for extending the code include:
- Make the robot navigate autonomously after not receiving human input for an extended period of time.
- Create additional routines for the other unused DTMF keyboard keys.
- Add more complex speed control to the robot.
To learn more about writing code, the best place to start is the Arduino Language Reference Page and the Arduino Forums.
You can also add additional hardware. Here are some ideas for pushing this further:
- Add a second set of sensors in the back of the robot, and upgrade the Arduino to an Arduino Mega.
- Add a remote control foam missile launcher turret to the robot.
- Add rechargeable batteries and a solar panel.
To learn more about electronics check out the Intro to Electronics collection and the Robots Channel.
Lastly, you can give your robot a name.
I named mine Randy 3000, in homage to Andre 3000 of the seminal southern rap group Outkast.
If you are having trouble naming your robot, here is a Baby Name Generator to try out.
Now that you have built your first robot, you are probably itching to build some more. If you would like to get some more practice building things and are intimidated by jumping into a full-fledged robot on your own so quickly, you can build a few more Simple Bots.
Or if you want to change things up a tiny bit, you can make a Solar-Powered Simple Bot with and experiment with renewable energy.
You can take a baby step forward from Simple Bots and convert an RC Car Into a Robot.
Alternately, you can take the lessons learned from Simple Bots and build a not-so-simple Walker Robot with Arduinos and sensors.
Or maybe you need to build a Robotic Drum Set to start a robot band?
If you are looking for a real challenge, you can always try building something more complex like this Seed Spreading Gardening Robot.
If none of those float your boat, you could always try your hand at building your own creation and sharing it on Instructables.
Share a photo of your finished project with the class!
Nice work! You've completed the class project