Step 2: Step 2 - Wiring and Mounting Arduino to Platform

http://www.youtube.com/embed/P4xuYb412G4 This video shows how to wire a battery back.

To mount the Arduino to the platform, I first put the standoffs on the Arduino to see where I could mount it. I decided to mount the Arduino on the bottom plate because it would require less drilling. I drilled one hole on the platfom so I could get all four standoffs connected to the platform.

Pull all the wires out from beneath the platform. There should be five cables, four for the motors and one positive battery cable from the switch and the negative cable from the battery pack.

Next we will build the Adafruit motor control shield to control the motors on the platform. This website walks you through the simple build. http://ladyada.net/make/mshield/solder.html

The kit includes some headers so you can solder them onto the motor control shield to make it easier to connect the different sensors. The headers that are provided are 8-position. You will need to cut in the middle of the seventh pin so it will fit onto the motorshield. If you decide not to use the headers, you can solder jumper wires to the board. In this build we will be using pin A0, one grd (ground), and one +5V pin.

Take both sets of wires from the left side (front left and back left) and test them with an AA battery (not included) to make sure they are wired correctly. Both of the wheels should go the same direction. We are wiring the motors in series. Do the same with the right side.

After making sure that the motors are wired correctly, put the left side to the terminal labeled M1. Put the right side to terminal M2.

You will need to solder the plug and the battery holder together as shown below. This will provide power to the Arduino UNO
<p>Hello, I'm having trouble with calibrating the motors... the robot constantly deviates to the left when moving forward, even after increasing the speed of the left motor. Also, I did ensure that the wheels are aligned properly, parallel to each other and flat on the floor. The deviation is more of a curvature rather than a slant. do you have any suggestions as to how to tackle the issue? thank you very much</p>
<p>please note though, that I did slightly modify the code for the 2 wheel model by reducing the speed to 90/94 for the right and left motor respectively, and calibrating the time delay on the turns to 90 degrees. the 90/94 speed was the optimal speed to have it go as straight as possible but there is still quite a significant deviation to the left. It would deviate about a foot to the left over the distance of approximately 2 feet forward</p>
Could you email me a code that would work with a four pin ping sensor and also would an arduino motor sheild work just the same as Ada fruit one?
Not sure about the motor shield. The Adafruit motor shield requires a library, so the code may be entirely different from what would be needed for the Arduino motor shield. The same goes for the ping sensor. I used the library and sample code that came with a 4-pin ping I was evaluating on a breadboard, but it would not work using the instructions. Instructions said only the 'echo' pin was needed, but the serial monitor would only show zeros. I connected a wire from the 'trig' pin to the 'echo' pin so they were both on the same I/O to the Arduino, and it worked. <br> <br>Not saying that will be the fix for you because I'm using sample code for a 3-pin ping and that same trick I tried is not working with my 4-pin sample.
Very nice job! It's very neat and tidy. Congratulations!
Is there an update to this that addresses the new version of this kit that uses the DFRobot's Romeo board?
<em>Do&nbsp; you connect the battery pack to both the arduino and motorshield, or just the motorshield and use the standard 9v pack for arduino.<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thank you</em>
im pretty sure you use the 9v for the Arduino, and the pack for the motor shield
i just uploaded your code and tried several times more i had no problems with uploading but when i upload it i turn the batteries on and the robot just sits there and does nothing
Hello Sean, there are two battery packs in the kit. One to power the Arduino and the other is to power the motors. Make sure that both of them have power. <br> <br>-Omar
Hi just wonder how you worked out your &quot; look around &quot; times <br> <br>Thanks
HI guys, I was wondering if you can help me out. I need to know how to preprogram (a code) a path into an arduino so it can move the way I want it to and use two motors(each attached to one track) to help it to go the preprogrammed route. Help would be much appreciated.
Hello singh1234, There are several ways you can approach this. You can add encoders to the motors and program it that way. You can also program it by making it go forward for a couple seconds and then turn for a couple of seconds. Depending on the size of you robot, I believe using servos would be the best and easiest option, for example, using this <a href="http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_283039_-1" rel="nofollow">servo</a>.<br> <br> Good luck!!
Thank you. You guys are the best. One question though, to use three of these servos, do I need a motor shield? (Jameco Part no. 2152403) If I do, do you guys ship to Australia? thank you again.
I just finished putting my 'Arty' ping-bot together, using your code, but stripped-out the Adafruit motor controller part, Using the Adafruit Proto-shield, and went with 2 modified Futaba S3004 servos converted to constant rotation. (an old trick I learned long before seeing the projects here.).. It took reverse engineering your code a bit, though.. swapping the motor values for Fwd/Rev, stripping out the Centimeters return, since the distance is only dealing in inches, and cutting the delay times in 1/2 for the turn and back-up times, since the servos seem to react faster. It's not as elegant as the J-Bot's frame, but everything packed into a 7&quot; X 5&quot; X 3&quot; 4-locking side food container., and powering it off a 7.2V RC car battery. (using a 7805 to drive the 3 servos, and the PING)) ) All I need do, is plug the power adapter (standard RC-Car to coaxial) from the battery into the board, close the lid, then let it roam around.
And, 'Arty' in action! http://youtu.be/E7iytmVTBqs<br>
copied and saved your code, it might iron-out problems I've been having with a similar design, using the arduino, creating a 'BOE-Bot' style, using only 3 servos (two for mobility, and one for the PING)) )<br>
good work
This is just what mine should look like if I'd ever got round to finishing it.<br><br>Hopefully this great 'ible will spur me on to finish it.<br><br>Nice job. Hopefully mine will be half as tidy as yours.
Very nice! Neat and tidy, just the way it should be. Congrats on the design.

About This Instructable




More by JamecoElectronics:Vibration sensor with no moving parts RFID Deadbolt Hack Voltage Probe with Tone and LED Outputs 
Add instructable to: