Society of Robots
Search and Index
 Parts List
 Robot Forum
 Member Pages
 Axon MCU
 Robot Books

 How To Build
  A Robot




 Robot Journals
 Robot Theory

    - THE $50 ROBOT -


    Step by Step Robot Tutorial

    Electronics, Continued
    Continuing from Step 3B, I will now show you how to test your circuit to avoid serious failure, how to connect it to your computer for programming, and how to make your sensors.

    If you don't have the proper testing equipment, plug in your battery pack and pray to the robot gods that your circuit doesn't melt in a pretty fire . . .

    The first test is called a connectivity test. Get out a multi-meter and do a connectivity test to make sure the pins that aren't supposed to be connected aren't connected. If by chance you accidentally bridged power and ground, your circuit could spark and your batteries melt. If you put the multi-meter on the resistance setting, make sure all non-connected pins have at least 5 kohm resistance or you may have power issues. You may need to get your soldering iron back out to fix any potential problems you find.

    Connectivity Check

    Then do what I like to call a 'smoke test.' This is when you power up your circuit with a power supply. Plug your circuit in, start the voltage at 1V and work your way up slowly to 6.5V. The current draw should be under 50mA. If you see a huge current draw (or smoke), there is a mistake in your circuit so turn off power immediately. Otherwise, at 6.5V, get out your multi-meter again and check voltages on all the pins to make sure everything is working.

    Smoke Test

    The sensor bus should read 5V (as long as the input is greater than 6V), while the servo bus should equal your battery voltage.

    Plug in the black ATmega8 IC (finally, eh?). Be careful of static electricity. You may also have to bend in the pins so that they all go in. Be patient while doing this. After the pins are in, push the IC into the socket carefully.

    Plug in ATmega8 IC

    Plug in the battery. For the 6V battery pack, just plug it in to the 3 pin male header. Remember to verify that the black wire is going to ground and the red wire to power! I was dumb and didn't . . . but was also lucky that nothing fried (the regulator provides some reverse polarity protection, apparently). Check the schematic for reference.

    Plug in RC Battery

    For the battery holder method at 4.8V:
    Solder in the black wire to ground and solder the red wire to the servo power bus. Check the modified schematic if you aren't sure.

    Plug in Battery Holder

    For the battery holder method at 4.8V:
    Then with a 9V battery, attach the - to ground and the + to the voltage regulator input. A good method is to remove a 9V battery connector from an old toy (or buy cheap from RadioShack) and directly solder the wires onto your perf board.

    Plug in 9V Battery

    Now we will plug in the programmer. On the end of the programmer is the ICSP header (the black boxy thing). Look for a triangle on the front of it, as in this picture. This arrow marks pin 1.

    ICSP Header Triangle

    Plug in the header as shown. As always, if you aren't sure, check the schematic. The arrow side should be closest to the ATmega8 IC.

    Plug in Programmer

    To finish the connection, plug in the other end of the programmer into a serial port of your computer. If your PC does not have a serial port (such as my Dell laptop), you will need to buy a serial-to-USB adaptor cable (~$15, left cable in picture). Optionally, you may also want to buy a serial extension cable (~$5, right cable in picture).

    Plug Programmer into Computer

    The extension cable is great if you want to keep your robot plugged in while it runs around (for sensor output by serial, etc).

    Your servo should have three colored wires: red goes to the + of your battery, black goes to - of your battery, and white (or sometimes yellow) goes to a digital output pin on your microcontroller (for the control signal). Again, if you would like to learn more about servos, check out the servo tutorial.

    HS-311 Servo

    And if you haven't figured it out yet already, plug your servos into PD0 and PD1 (pin 2 and pin 3). The black wire of the servo goes to the ground power bus (the one furthest away from the ATmega8).

    Plug in Servos

    Congratulations, you now have functional robot brains! Yum!

    Now you must make two photoresistor sensors. Go to the photoresistor tutorial and follow the detailed instructions. I used a 1.5kohm resistor for R with the middle sized photoresistors in the RadioShack kit, but your situation might be different so you might want to recalculate your R value.

    Finished Photoresistor Sensor

    You dont need to do the crimping method described to make this sensor, but its a more professional method and makes your sensor more modular (can be scrapped for future robots). The disadvantage to it is that the crimping tool can be a little expensive.

    Now attach your photoresistor sensors to the robot. I used packaging tape, but any method would work. Make sure the sensors are evenly spaced and at a decent angle. Later, when testing your robot, you will probably need to adjust the position of the sensors. I also tried poking holes into the bottle for the sensors to stick out of, but the sensors didn't stay put.

    Mount Photoresistor and Circuit Board

    Now plug your sensors into your circuit board, and mount your board onto your robot. Personally, I recommend using the four big holes in the perf board corners to screw your board into your robot. But I was lazy and just stuck it into the water bottle. The problem with this lazy method is that its difficult to attach your programming cable to your robot when the circuit board isn't mounted properly. I expect you to mount it properly =P

    Finished $50 Robot!

    You will probably have a huge jumble of wires sticking out above your robot. This is bad design because wires could jostle loose or get tangled on something. Get a twist-tie from a bag of bread and use it to tie the wires together, as shown in the above image.

    Your robot is almost complete! We just need to program it now . . .

    Click to continue on to Step 4 >>>.
    In step 4 we will learn how to program the robot.

Get Your Ad Here

Has this site helped you with your robot? Give us credit - link back, and help others in the forums!
Society of Robots copyright 2005-2014
forum SMF post simple machines