Step 8: Wire Things Up to the Arduino

Connect the left motor's forward transistors to pin 9, left motor backwards to pin 10, right motor's forwards to pin 11, right motor backwards pin 12. connect power from the H bridge to the 3.3v pin on the arduino, and the H bridge's ground to one of the ground pins. connect the output of the sensor to analog pin 0, the power of the QRD to the 5v pin, and the ground to one of the ground pins. We will keep these connections for all three tasks the robot will be able to perform. 
What are the specs for the h bridge chip<br>
<p>I didn't use a chip, I made my Own H-bridge with a bunch of PN2222 transistors. They have a 600ma max.</p>
What is the amperage on the chip<br>
What are the specs for the h bridge chip<br>
hey! I love the project but can you please help me find parts for this?! I really wanna build this
<p>cool project!!!. one of my favorite.</p>
<p>What is the black box with the mini breadboard in the middle called?</p>
Hi I'm new to arduino field.. I saw your Versatile Arduino Robot, it's cool :) .. Can you please explain me how to build the H-bridge and how to connect it to the arduino... <br>
Thanks! The H-bridge is basically two switches on each pole of the motor, so that either pole can connect to either the + or - rail on the board. I posted a schematic, unfortunately it didn't seem to have come out well, but there are plenty out there. The one I used shows switches, but by replacing the switches with transistors you can control the H bridge with the output of the arduino. To build it, You basically just connect the power rail to a pole of the motor through a transistor, and then connect the ground rail to the same pole through another transistor. Do the same for every other pole of the transistor. Connect the base of the transistors to a wire that can go to the arduino. The thing that can be tricky is getting the collector and emitter pins oriented correctly. Remember that the arrow on the transistor schematic symbol shows the direction the positive charge flows. Be sure the circuit is assembled so this happens. You may want to assemble on a breadboard first to make sure you get it right. Also, you could use relays instead of transistors, but the arduino may not be able to drive them directly. There are plenty of tutorials, webpages, and videos about H bridges out there if you are still confused.
can you please explain how to build the h-bridge..
What do you use for a power supply? I have a similar robot powered by 9V, but the motors suck that thing dry in no time
These days I use a 9.6v 1200mAh RC car battery, but it is important to isolate the motor power from the logic power otherwise you could kill your arduino.
They also sell rechargeable Lithium Backpacks for the Arduino uno and mega.<br>Here's the page for the uno's backpack I hope you like it.<br><br><br>http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_2127566_-1
As long as you're not drawing the power for the motors through the VDD pin of the arduino, (trust me, I already got flamed by people on arduino.com, and it was a accidental short (jumpers crossed) and the 9V wall-wart that ended-up frying the trace on the board).. you might want to make a molex to barrel adapter, and use a 7.2V RC battery.. Plenty of power.. Get the 9.6V RC repair kit, and the 7.2V battery from Radio Shack, as well as the type-M barrel connector. this will give you a way to connect the battery through the H-Bridge board, and add a jumper from it to the arduino. 7.2V will still power the +5V regulator on the arduino without problems..
Thanks will do.<br>
You should build a 9v power supply for your arduino, it would be easier than using wall power.
Yeah as a matter of fact I made one. One 9v battery didn't work, so I used triple and double A batteries to make a 9v supply. the batteries died really fast though, and at the time I did not have any more triple A batteries so I just used the adapter.

About This Instructable




Bio: Science is my passion. I find myself constantly working on countless experiments, from low energy particle accelerators to good old simple electronics. I also like ... More »
More by Higgs Boson:350kv Van de Graaff Generator How to see alpha particles Simple Jacob's Ladder 
Add instructable to: