Thursday, July 16, 2009

$150 robot - Build the chassis

Part 8 - Build the chassis

I built my chassis out of 2 floppy disks, and 2 peanut butter lids for wheels. The floppy's are a bit small but I was able to fit the batteries and servos between them and the bread board on top. The PB lids worked pretty well for wheels, I just poked a tiny hole in the center and then screwed them on to the servos. When I did my first draft everything was held together with poster putty and rubberbands. This worked well for everything but the servos, they need to be secure and not come off, so I ended up using a hot glue gun and attaching them securly to the bottom floppy. The top floppy still uses poster putty which allows me easy access to the batteries.

You will also need to add a caster to the front, basically it just slides around, I rubber banded a rx vial lid to the bottom and it works well on floors (not so well on carpet). Basically making a chassis is up to you, you can salvage parts from the house, the garbage, the kitchen or you can buy them (check out this site for chassis and chassis kits) which might be a bit expensive

There are a couple of downsides to this design
1. Exposure: the circuit and everything else is completely exposed, not good for running into or off things. The robot book I got put all the parts in a sandwich container, much less exposed
2. Wheels: Peanut Butter lids are cheap but you have to make sure your hole is centered (although mine had little dimples in the center) and they're not that sturdy. Check out lego wheels or such is you want better wheels and/or better traction.

Saturday, May 23, 2009

$150 Robot - Build the Circuit

Part 7 - Build the circuit

Some people say breadboards, some people say solder your board. I think breadboards are fine unless you want you robot to be permanent, but if you might ever want to recycle parts stick with the breadboard. That's why we chose small cheap boards. Eitherway you will want to make your first draft on the breadboard.

Here's the schematic that's used for the $50 robot (which is really what we're building)

Basically we need:
power - input, voltage regulator with capacitor, led, power switch (optional)
sensor inputs - 3 pin headers that have vcc, gnd, and pin to the microcontroller (pins 27,28)
servo inputs - 3 pin headers that have vcc, gnd, and pin to the microcontroller (pins 2,3)
microcontoller - use the ic socket (especially if you are soldering)
we don't need the program header because we won't be programming the chip on this board

Thursday, May 21, 2009

$150 Robot - Sensors

Part 6 - Make the sensors

Now we make the light sensors, the society of robots has already done the work of writing a tutorial so here we go...
http://www.societyofrobots.com/schematics_photoresistor.shtml

crimping really does make things nicer

Note: I made my cables over a foot long which I'm sure is useful in some applications, I really only needed about 3" meaning I had lots of wire to hide out of the way. In fact it might not hurt to make a set of long wired ones and a set of short wires. Or a set of short wires and an extention cable...

$150 Robot - Servos

Part 5 - Servos
Servos are a type of motor, sure you could probably use a regular motor but servos seem to be very popular with robot people. There is one problem though... servos are manufacture to move 180degrees meaning your robot isn't going to go very far! So we have to modify it a bit...
$50 robot tutorial
A picture tutorial
between these 2 tutorials you should be able to modify your servo. Basically there are 2 things that need to be done. The first is modifing the servo so that it always thinks it at the zero position. The second is clipping off a piece of plastic so that it can go 360degrees

For this little project you will need:
screwdriver
superglue
sharp knife (sharp wire cutters might work)
maybe a file, depending on how well your cutting turned out
your programming board, and a few wires to connect the servo

Saturday, May 16, 2009

$150 Robot - Blinking Light

Part 4 - Blinking Light
Go to http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=93
Solder a resistor to an LED so that you can directly plug it in
Put LED between GND and any of the outputs (8 and 9 works)
Download the zip file
Open Programmer's Notepad
Follow directions for running make file
Follow directions for programming
Pray

You should now have a blinking light (this is the "Hello World" of the electronics world).

If its not working:
1. check all your connections
2. make sure all the appropriate power leds are on (if not its a hint of where something is wrong)
3. make sure if you are telling it which programmer you are using (usbtiny)
4. make sure you have told it the correct chip in all the correct places
5. take a break, come back, check 1-4 again (sometimes your eyes and brain need a rest)

Friday, May 15, 2009

$150 Robot - Programming chip

Part 3 - Getting programs on the chip
Download drivers http://www.ladyada.net/make/usbtinyisp/download.html
Unzip drivers
Plug in USBtinyISP
Follow directions here: http://www.ladyada.net/make/usbtinyisp/drivers.html
Download winavr http://www.ladyada.net/make/usbtinyisp/avrdude.html
Install winavr http://www.ladyada.net/make/usbtinyisp/avrdude.html
Got to run and type "cmd"
Run:
avrdude -c usbtiny -p attiny2313 -U flash:w:test_leds.hex
Don't worry, it won't do anything, just making sure avrdude can find the USBtiny

$150 Robot - Build USBtiny

Part 2 - Build USBtiny programmer
Well now you are an expert at soldering (while the board is useful so is the soldering practice).  Now we build our programmer.  The website tells you everything you need to know.  Go ahead and put the jumper on.