Step 6: Arduino, Wires, and Battery - Shocking!

Alright, now it's time for the electronic components of the project to come together. The electronics in this project are very simple as you are just hooking up three motors to the arduino. The picture of the breadboard below shows how I set mine up. The battery pack is wired to the V-in and ground on the arduino. The V-in and ground is also sent to the two driving motors with the V-in going to the red motor wire, and the ground going to the black motor wire. Then I sent the two motor signal wires (white in my case) using yellow wire to the arduino pmw ports at 5 and 6 (my "left" motor is attached to pin 6 and the "right" is in 5).

For the servo I also attached it to the V-in and ground, and the signal wire to the arduino pmw port 3. Next, I secured my battery pack to the open space left on the robot. You also want this as close to the center of the robot (by the pen) so that the weight isn't distributed too unevenly. After this I just cleaned up the motor wires with some zip ties. 

You can also power the motors and arduino independently. Send the arduino's power source into the V-in and ground terminals on the arduino and have the motor's power source hooked up to the motors (make sure to send the motors' ground line to the other arduino ground pin). Then just send the signal wires to the appropriate terminals. 
<p>can anyone Please tell me any other application of this robot ?.....</p><p>especially in agriculture domain....</p>
<p>how is that magnets sticking to the glass ?<br></p>
<p>I see a lot of potential in this. You are a student? Go to businesses on holidays and put designs on the windows, have you thought of etching? Or a lace design would really be nice on any home window. You could make a pretty penny with this.</p>
Can you give me that websit with the accelerometers
Sparkfun.com sells IMU's, I recently purchased the 9150 (I think) and they also have just accelerometers.
Ah. I didn't see this mentioned in the instructable and I couldn't tell with picture if one was on the inside of the window. <br>Oh I have see someone selling a window cleaning robot but it used vacuum to hold on to window and needed to be plugged in for the power so not as portable as your idea. And was noisy from the vacuum.
Thanks, I updated the intro paragraph so hopefully it's clearer.
You must be a great hit on Halloween. Now make the clean window robot.
Haha I'll have to fish out a squigee and see what I can do!
I don't get this either... <br>hrm this should be for how it can climb on glass with magnet ? but doesnt seem to be working down there. Can you explain some of that Mizchief100 because I guess I missed my science class that day.
So basically there's one magnet attached to the robot and one on the opposite side of the window. The wheels of the robot are grippy rubber and the magnet is mounted just off the glass so only the wheels are touching, allowing it to move around on the window. Hope that helps!
Dude magnets were genius. Are the magnets strong enough to hold up a person??
The magnets are strong, the glass isn't.
how it can climb on glass with magnet ?
I was thinking, about using a round metal disk, with three or four small casters to hold it just a milimeter off the window surface, might make the device roll freely over the window. <br>
Go for it! Let me know how it turns out. <br>
Cool and interesting way of sticking a bot to a window! :-) Thank you for sharing this idea with us; I like the VEX gears and tools as well.
Thanks, and yes the VEX adds a lot to it.
greate instructable, giving food for thought, thanks for sharing
Hi, Mizchief100 <br>Well done, I have not thought of using magnet to hold this robot. <br> <br>
You could sell these to big box stores for ad writing as well as your idea of window cleaning. This looks very patent worthy. Good job dude!
Hah hadn't even thought of that but now you have me thinking!
well done! looks robust <br>I would definitely add obstacle detection and get curvy with some sinus functions driving PWM levels!
Great ideas! Curved lines would be something for sure. I will keep this in mind.
Impressive work.
Hey ! What about window cleaning ???
Definitely possible, you just need to attach a squigee or something to clean to the back and draw it a route to clean on the window!
Hey ! What about window cleaning ???
Hey ! What about window cleaning ???
I was expecting something that would paint the edging on the window frame ;-)
Am I right in presuming other magnet on the far side of the window? If so, does if ever get stuck on crud or scratch the window slightly?
Yep, it's on the other side of the window one. And I've never had a problem with scratching/sticking the magnet has a really smooth metal surface, but I've also wrapped it in a soft bed sheet and attached it to the window like that and it worked great as well!
I've been wanting to work on something like this, but for boring practical purposes like cleaning my windows, or a submersible fish tank cleaner robot and this info will be a huge help. <br>I haven't used an accelerometer before, how well is that working for keeping the turning accurate? <br>Great instructable btw!
It's doing quite well, accurate to within 3 degrees normally. Will keep you posted!
Very cool project!! Well done. Neat clean design. Thanks for sharing this with us! It has inspired me.

About This Instructable




Bio: I hope to help people with the things I make.
More by Patrick S:Guitar Backpack DIY Prosthetic Leg Foam Cover (Cosmesis) Tact: Low-cost, Advanced Prosthetic Hand 
Add instructable to: