Step 4: Adding the Electrical Brain.

OK, so you're done with the mechanical part of this project, time to give franken-robot its brains! You'll see in step one I referred you to this step for the circuit shield. The Arduino by itself can do nothing for this robot besides process and output data in a high (1) or low (0) 0-5volt signal. Furthermore, microcontrollers can't supply things like motors and relays the high current they require. If you try to power a motor with the Atmega168, most likely all you will get is smoke and a free fireworks show. So then how will we control out gear-head motors you might ask? Surveyyyyy says- H-Bridge! I am not going to spend the time here to explain exactly what an H-Bridge is, if you would like to learn more about them go here. For now all you need to know is that an H-Bridge will take a high or low signal from a mircocontroller, and power our motors from the AA batteries supply voltage source we give it. The circuit shield as the Arduino community calls them, will be a PCB (printed circuit board) that will rest on top of the Arduino and plug into it with header pins. To this shield we will add components like the L298 H-Bridge, some LED's, and Ultrasonic sensor wires.
Once again I have done most of the work for you, by spending hours making a PCB of our circuit shield in a PCB CAD program called Eagle. To get your very own professionally made circuit shield go to BatchPCB. BatchPCB is a shoot off of Spark Fun Electronics, and they specialize in taking small orders from people like you and me at a very reasonable price. Next make yourself an account there so you can order my shield, then get the https://www.instructables.com/files/orig/FSY/LZNL/GE056Z5B/FSYLZNLGE056Z5B.zip Gerber Zip File (also at the bottom of this picture set) which contains the golden 7 files they need: GTL, GTO, GTS, GBL, GBO, GBS, and TXT drilling guide. Look at the two pictures below as a reference, but basically click "Upload New Design" in the top task pane on the site, and from there you just find and upload the entire Zip file, and then check the picture to make sure all the layers are in the place they need to be, click submit then select the Eagle PCB bubble and then submit again. It will send you and email that says it passed the DRC bot and it will have a link that you can click to add it to your shopping cart, then just order it. It costs like $30 and takes about 1-2 weeks depending upon when you send it to them and what shipping you get.
Now if you are good with electronics already, and think you can make your own on a prototyping board ( I did this temporarily), or if you like to etch your own PCB's, then go ahead but I'm not discussing how to do that here as it will waste time and space. If you choose to make your own then you can get just the schematic here, its a little crowded and messy so be ware. Oh, and an extra note on the PCB it does have some of my silkscreen graffiti on there, so don't think that the guys at the PCB factory were writing Chuck Norris facts on your circuit board! So lets fast forward about a week and assume your holding the circuit board right now...

Step 1: Make sure the holes for the Arduino headers line up with the holes for the header pins on the shield. Now as a result of my error, you will have to bend some of the pins on the L298 H-Bridge back so they will fin in the holes on the shield. Sorry about that. Warm up your soldering iron and get ready for some major soldering! If you don't know or are rusty on how to solder check out this page by Spark Fun.

Step 2: Solder the male header pins to the board. To make sure they fit well, I suggest that you stick the male headers into the Arduino first, then fit the shield over them; and solder them on.

Step 3: Now solder the L298 H-Bridge to the shield and the rest of the components (LED's, polarized connector pins, resistors, and diodes). The PCB should be pretty self explanatory as to where everything goes, because of the silkscreen layer on top. All the diodes are 1N5818, and be sure to match up the stripe on the diode to the stripe on the silkscreen. R1 and R2 are the 2.2K resistors, R3 and R4 are the 47K resistors, and R5 is the 10K resistor. LED's 1 and 3 are green to indicate the motors are going forwards, and LED's 2 and 4 are red to indicate the motors are going in reverse. LED 5 is the obstacle indicator and shows when the sonar picks up an obstacle in its programmed limit. The extra jumper places are there to leave us the option to update Walbot with different sensors in the future.

Step 4: If you are soldering the wires directly to the board then skip step 5. If you are using the polarized connector pins then skip THIS step. Soldering the wires directly to the shield is not as neat but much faster and cheaper. You should now have 4 wires for both the motors, 4 wires coming from your AA battery packs, and 4 wires coming out of the sonar. Lets do the Battery packs first. See the second picture for a diagram of where to solder the wires. Now that thats done, solder the LEFT motor wires to the MOT_LEFT labeled holes on the PCB, and the RIGHT motor wires to the MOT_RIGHT holes (order does not matter, we can fix that with software later). For the sonar, there should be small labels in front of the SONAR holes on the PCB. Match up your GND wire to the GND hole, the 5V wire to the VCC hole, the RX wire to the Enab hole and the AN wire to the Ana1 hole. You should then be done with the wires!

Step 5: If you are using the polarized connector pins for the wires on the board and don't know how to use them, then read up on them here. Now solder in all of male polarized connectors to their corresponding number of holes. Look at the diagram below to see where to stick the crimp pins in the housing slots, so that they line up as shown. Next do the polarized connector housing for the left and right motor wires, it does not matter which order the wires go in just as long as left goes to MOT_LEFT, and right to MOT_RIGHT (we can fix which way the robot goes in the software). Finally do the Sonar wires making sure to line up / orient the wires so that your GND wire does to the GND hole, the 5V wire to the VCC hole, the RX wire to the Enab hole and the AN wire to the Ana1 hole. Once you crimp, wire, and connect those together, you should be done with the wires!

Step 6: Now you need to be able to power the Arduino using your 9Volt (its really 7.2 volts) battery. Using the 9Volt clip connector, open the power jack and solder the POSITIVE RED WIRE TO THE CENTER TAB and solder the black gorund wire to the tab which goes to the outer metal part. This is critical to make sure that the center / inner hole is positive, if you reverse this the Microcontroller will most likely do nothing except heat up, smoke or explode. If by accident you fry your Atmega168 you can get a new one here but you will have to burn the boot loader back on. To find out how to do this check the Arduino forum.

All the electronics should be finished with for now! Only easy stuff left now!
<p>I had some trouble finding some of the parts from this list but was able to find them on this website: http://stainlessandalloy.com good luck with your project!</p>
So...your dad the only one with a music collection there? LOL!!! Man, took me back! <br>Oh ya, sweet little bot you got there!
Nah man my dad doesn't listen to Stealers Wheel, classic rock is my go to genre.
EVERYBODY listens to them, they just don't remember their name! LOL!<br><br>If you're ever looking for anything though, I've got about 250GB worth! LOL!
They were often mistaken for Steve Miller band and occasionally BTO though.
Can you please help me, i cant get the template it wont open.
Bingo, this is a cool autobot.<br> <br> Try a different concept <a href="http://www.geniusdevils.com/2013/01/wall-follower-robot-with-distance-sensor-and-microcontroller.html" rel="nofollow">Wall Following Robot</a>
hi this is a very good project i completed i but i need the code for the sharpe ir please send it to king02 levi2004@yahoo.ca
In your code under the distCal function where did you get 204 in <br>dist = ((valAvg/204.8)/.009765625); <br>also i would like to see how you calculated distance with the IR sensors <br>link for the updated codes does not seem to work <br>thanks !! great job
can i pls have the proper Cutting and Drilling guide Word document and also the PCB information soon... <br>can u pls mail it to ashikbekal@gmail.com <br>pls Brandon
Oh, softwarelink not work :(
Brandon I cant find de code for the Infra red sensor
Can't access the site to get an electrical schematic of the motors shield. Nor the PCB manufacturer. <br> <br>Is the schematic still available and where can I get it <br> <br>Thanks
It looks like the link to the Cutting and Drilling guide Word document is broken. Anyone have it?
It looks like a number of the parts are not available anymore. Does anyone have any alternatives for the motors and capacitors? I think a lot of the items from Trossenrobotics are not available...
This is a Great bot 1st of all, but this bot would be much improved with full circumference sensors and the capability to map its tracks and all the obstacles the sensors have found.
Ok so this is kinda&nbsp;embarrassing but I recently just lost all of my Walbot files to a broken (reaaaalllly broken trust me) hard drive, I have backups of most of the files from uploading them here, but I'm missing the Walbot shield .sch file that I have linked to here. Did anyone by chance download it at some point and still have it? Or if someone can figure out how to see if they can get around the &quot;this link appears to be broken&quot; msg for this&nbsp;&nbsp;<a href="https://www.instructables.com/file/F3LWTE5F3AQ37KW/" rel="nofollow">www.instructables.com/file/F3LWTE5F3AQ37KW/</a>&nbsp;link, that would be sweet too.
&nbsp;So if anyone has pictures of their version of walbot please send them to me (brandon121233@gmail.com) I want to add a section to this instructable&nbsp;featuring&nbsp;pictures of other peoples versions of walbot. THANKS
On step three in the first picture, you can't hover over the yellow box inside the other one, but I'm assuming it's just pointing out where the half ping pong / table tennis ball goes.<br />
First of all great instructable. This is a really cool idea and I'm excited to build it. I have two questions, though. I am making the pcb myself. What do the red arrows (like the one connected to pin 9 of the H-bridge) mean? And what do the JP(number) stand for? Thanks to anybody to take the time to answer my noobish question.<br />
The only picture with red arrows is the 4th pic and the H Bridge is not a part of that. Not sure what you mean by JP, can you give me a more specific quote?<br />
Sorry about not being more specific. When I referred to the red arrow, I meant in the schematic. The schematic also has JP1, JP2, etc., and I didn't know what that meant. Thank you very much.<br />
thats Jumper 1 and Jumper 2, kinda like auxiliary ports should you ever want to add more sensors...<br />
I think that the text for step 1 is missing as I am unable to view only this step but I can view the others.&nbsp;I&nbsp;need to know what materials to use. Please can you fix this as soon as possible?<br />
huh thats very odd, it seems as though intructables is having a bit of a problem as it refuses to show that step??? If I click edit it shows all the text but when I save it nothing shows up for step 2... I might have to contact Eric W bout this<br /> <br /> but for now heres a link to where you can also find the same instructable <a href="http://www.societyofrobots.com/member_tutorials/node/45">www.societyofrobots.com/member_tutorials/node/45</a> also take a look at some of the other member tutorials and stuff on that site. I know the guy who runs it, and as far as hooby robotics goes- he's the best. <br />
Very nice robot, I have already arranged materials but waiting for the schematic. Can anybody help me to get the schematic? kindly help me Thanks.
hi brandon, i just start on making the PCB myself cause i dont have that much money to spend on, i have a problem on the schematic that you have posted. The line that connect to pin 9 of hte H-Bridge, i see it as an arrow that does that mean? does it mean the same as Pin 4 of the H-bridge too (the one that connect to the +), which i assume to with +8v right? And your 2 battleries, it in series right? I just want to make sure of these before i solder on the H-bridge. Thank in advance.
cool bot
hmm presto simpler way.<a rel="nofollow" href="https://www.instructables.com/id/make-walerbot">https://www.instructables.com/id/make-walerbot</a><br/>
hmm I found a simpler way.<a rel="nofollow" href="https://www.instructables.com/id/make-walerbot">https://www.instructables.com/id/make-walerbot</a><br/>
hello.i cant open the schematic file as well. can u send it to my email pls? nadiacatlady@y! thxz.
ok all i want is for you to email me the shcamatics . i emailed you so you should have my email (i cant open the shcamatics in the file there in on step 4)
i sent you the e-mail
ok i rly wana od this project but my arduino has errors saying expected ' } ' before ' else ' at global scope pls help ty vm
hmmm did you modify the code, that I have uploaded, at all? If not I need to look at it, but I think you might have accidentally left out a brecket after one of the else statements. Click on the error and it should highlight the section thats wrong in red.
fixed it...your origanal didnt work but the lazer one did. one more step for me(but a good learning opertunity) ty pep
another error is.. in function ' avoid walls() ': error: expected intalizer before ' int '
i love this robot and i really want to finish it but whenever i try to verify the Walbot_QT_Program it says, " error: expected primary-expression before 'else' can you please help i need to finish this by Tuesday.
Did u accidentally delete a bracket after one of the else statements? It should highlight the area where the error is if you click on the error message. If you still can't find the problem copy and email EXACTLY the code that is giving you the error and I'll take a look at it. As far as I know of the code that I have posted compiles without errors... my email is Brandon121233@gmail.com
and yes the errors with else but i deleted nothing pls help
a bunch of errors.... help
ok thanks that works now but what exactly did ypu mean when you were talking about step six on on page "step four" could you explain it in a little more detail.
Its where you solder the 9Volt connector tab wires to the 2.1 x 5.5 x 9mm Right angle DC Power Plug, that needs to be soldered together so that the positive (red wire on the 9volt power tab) is connected to the CENTER (inside metal part) of the DC power plug. If you are still confused I'll update that section with some pictures. By the way, would you mind sending some pictures of your Walbot (if you have a camera) to my email: Brandon121233@gmail.com. I would love to see what someone else's creation looks like, and if its ok with you I'll add some of the pictures to a new section of like people who have built Walbots. Thanks a bunch if you can...
bredon i use stepper motor, do you think its the same as yours? whats the difference if i use stepper motor?
bredon plz give me a jpg file of the systmetic diagramn
hey brendon can give systematic diagram in your robot as a image file
??? Not sure what that means, could you explain it in better english
He wants the Schematic of the Arduino shield.
image? the link for the files are there, do you literally mean you want an image like JPEG or TIF of the circuit?
Yes, I think that is what jimsondefrancia05 means.

About This Instructable




More by Brandon121233:My Workshop Starch Plastic 2.0- Pressure Cooker Hacking How to modify an airsoft magazine 
Add instructable to: