Coming up next: Hammer and Head
So, my next robot project has two robots: Hammer and Head. Hammer will have a hammer of some kind and Head will have a big head. Hammer and Head are going to have some fun together. Well at least Hammer will have fun...
Here's a list of updates to help with page navigation (if it ever works):
And now on to business:
Basically the idea is that Head will just wander around and Hammer will try to catch Head. I'm planning to "cheat" a little bit so Head will have an IR beacon to help Hammer locate it. My plans don't anything more except at least Hammer will have four wheel drive. That's because bad guys always have 4WD don't they. Although really bad guys have 6WD ;-) Oh, and Head will probably be running on Picaxe and Hammer on some AVR chip me thinks.
Because I'm doing this for learning and fun that's enough planning for now. Good way to learn is by mistakes and mistakes usually happen when you don't have good plan so I just started building Hammer. I already had some Solarbotics GM9 gear motors, wheels, sprockets, chain, paint stirrers, hot glue and other stuff. That equals a nice chassis for Hammer.
Here's what I managed to put together yesterday and today: Chassis for Hammer. There's some pictures of it below and short descriptions of what I have done.

Hammer's rear wheel attachment
All Hammer's wheels are red GMPW wheels. Rear wheels are attached to GM9 motors with a M4 screw that goes through the wheel, 3 washers and a M4 nut (for spacing, can't see those in the picture above), a sprocket, 2 washers and two pieces aluminum tube. I drilled GMPW wheel's center hole with 3,5mm drill so M4 screw fits tightly. In addition I used a drop of super glue to secure the wheel to the screw.
I used two pieces aluminum tube to attach the screw to GM9. The first piece is 8/6 tube (8mm outer and 6mm inner diameter). It's about twice the length of GM9's shaft. I flattened the other end of it hoping it would fit GM9's shaft just like that. Well it didn't but then GM9 met Dremel and my little piece of aluminum tube now fits on the shaft just fine. I drilled 1mm hole though the tube and GM9's shaft so I can put a pin (just a piece of iron wire) through to secure them.
The second piece of aluminum tube is cut from 6/4 tube and it's about half the length of the first one. So the second piece fits inside the first one and M4 screw fits inside the second piece. I drilled a 1mm hole through both pieces and the screw, put a pin through the hole and that's it. Then I did the whole thing again and I had my rear wheels attached to motors.

Hammer's rear wheels and motors
Rear wheels ready, time to figure out how to attach front wheels. I thought they could be done pretty much the same way as rear wheels except there's no motors. I had to find a way to make them rotate freely. After some quick brainstorming (more like a one giant lightning flash) I did this:
Hammer's front wheel attachment 1/3
There's M4 screw, washers, a nut and a sprocket just like in rear wheels. The difference is that there's 2 pieces of 6/4 tube and one long piece of 8/6 tube. Both 6/4 pieces go on the screw and the one closer to the end of the screw is secured with super glue. The tube piece next to the sprocket is now held in place by the other piece of tube and it's rotating freely. The long 8/6 tube goes on the both smaller pieces. I drilled a hole in the 8/6 tube and put a screw through it so it's attached to freely rotating piece inside of it. Now I can attach the 8/6 tube anywhere I want and the wheel will rotate. Here's a couple of pictures of the whole front wheel thing to clarify things:
Hammer's front wheel attachment 2/3

Hammer's front wheel attachment 3/3
I hope those pictures give you the idea how I did it.
Now that I had wheel attachments ready I needed chassis. Paint stirrers and hot glue For Teh Win! I also used that metal ribbon thingy with holes in it. I really don't know what it's called neither in English or in Finnish. You can see it pictures below (tell me if you know what it's called :-). Chassis is pretty straight forward thing so I just post pictures right here:
Hammer chassis top
That's how Hammer looks like right now. For a quick test run I used Picaxe 28X1 + 28-pin project board to see how this thing moves. It seems to move quite nicely but turning is a little bit hard (I kinda expected that) but it still turns. I might make the chassis a bit shorter (rear and front axles closer together). I think that would help with turning.
I also thought that I could probable use some wheel encoders. Never done that before. Those GMPW wheels seem to have some kind of "almost" encoder markings. Maybe I'll just use a magic marker to enhance those. It's going to get a bit tight though because those sprockets and chains are a bit in the way.
Today I made the chassis of Hammer a bit shorter. I thought it might help with turning. I'm not really sure if it helped or not. It seems like it's turning a bit easier now. Well at least on carpet. Those GMPW wheels have a good amount of grip to turning is still a bit difficult on hard surfaces. I shot a video where you can see how it handles. Here's a picture of how the chassis looks like now:
Hammer's chassis after some sawing
I'll probably have to replace those GMPW tires or try to coat them with something that has a bit less friction.
Finally I got myself building again and managed to make an evil-eye-thingy for Hammer. Basically it's more or less like Oddbot's compound eye but without IR-leds. I'll place IR-leds later to Head so Hammer can track it. I used SFH 313 FA phototransistors and 47K resistors. I experimented with bigger resistor values too and sensitivity seemed to get better but I wasn't sure if it could cause noise problem so I decided to try with 47Ks first. Not really much more to say about it so here's some pictures.

Construction phase. I used some hot glue (what else ;-) to keep those phototransistor in place during soldering.

Some soldering done.
Next thing to do would replacing that evil-eye-thingy on top of servos and try to track an IR-led.
Oh yeah! I'm on fire! Two updates within just few hours! I just couldn't leave that evil eye alone and go to sleep. I had to try it. So I quickly assembled some "eye muscles" from two Tower Pro SG90 micro servos and attached them and the eye to Picaxe 28x1 (eye will be run by ATMega8 later). I already had Picaxe 08M doing PWM with an IR-led from my previous tests with IR-phototransistors so it could play the role of "the bait". (PWM was really a simple modulation. My Picaxe test code doesn't take any advantage of it.)
IR-led tracking seemed to work, at least somehow. There seems to be some differences in phototransistors' sensitivities and that was expected. However the difference between left and right was quite notable. It might be that I have accidentally damaged one phototransistor on left (they work in groups of two).
Below is a picture of the (ugly) setup and there's also a video showing the system in action (also on Vimeo).
And here's the simple test code:b0 = 140 ' Smaller = right
b1 = 150 ' Smaller = down
servo 0,b0
servo 1,b1
main:
readadc10 0,w1
readadc10 1,w2
readadc10 2,w3
readadc10 3,w4
'sertxd ("Left: ", #w1, ", Right: ", #w2, ", Up: ", #w3, ", Down: ", #w4, CR, LF)
if w1 < w2 and b0 > 75 then
b0 = b0 - 1
endif
if w1 > w2 and b0 < 225 then
b0 = b0 + 1
endif
if w3 < w4 and b1 > 120 then
b1 = b1 - 1
endif
if w3 > w4 and b1 < 225 then
b1 = b1 + 1
endif
servopos 0, b0
servopos 1, b1
goto main
Just got the evil eye thing running on ATMega8. There's video available on Youtube and Vimeo. Code is AVR C code written/compiled on AVR Studio/Win-AVR. Basically it just reads 5 ADCs and turns servos according to ADC readings. Servo control is done using one of ATMega8's 8-bit timers. ACD readings are also dumped out from UART for debugging purposes.
The eye is a bit twitchy at the moment. I did a little bit a debugging and I'm getting nice and stable readings when I hold an IR-led if front of the eye. When I move the led away from the eye readings decrease steadily for a while until they drop down drastically and the eye starts twitching. Curiously it looks like (tried only 3 times so far) that when readings drop they always have same kind of pattern (lowest and highest values always come from same phototransistors).








@ Wed, 2010-10-13 14:43
Great work nuumio
I was curious why you made a 2 axis platform for your evil eye. Won't "Head" be broadcasting at a fixed level? Also, the bots run on a fixed plane, the floor - lovely floor by the way, you must be European. Or will distracting Hammer with lights and windows be part of the effect? Also, will Head have a proximity sensor near the IR transmitter? Then Head might know when to do evasive maneuvers.
If your interested in Hammer only chasing Head, have you thought of polarization filters on the IR tx & rx?
Great documentation btw.
GroG
@ Wed, 2010-10-13 15:47
Ideas behind 2 axis platfrom for eye
First of all, I thought that the Evil Eye will look much cooler if it had 2 axes instead of one :-) But there's also a bit more tehnical reason. I thought that if I place the eye and IR leds to different heights I could use the eye's angle of inclination to help determining the distance to Head. It would be something like this:

Small angle = Long distance between Evil Eye and Head
Big angle = Short distance between Evil Eye and Head
Hammer will also have Sharp IR distance sensor so he and use that too when determining if Head is close enough. I haven't thought of polarization filters. If I remember correctly how polarization works would those filters help to filter out ambient IR if aligned correctly? But they would also reduce "the real" IR a bit wouldn't they? My phototransistors have daylight filter so ambient light other than IR is not a problem.
Head's only sensor is SFR05 (+bumper switches). He is an object avoider so he'll try to avoid Hammer if they meet "eye to eye". But if Hammer sneaks on him from behind he won't see it coming.
And yes, the floor is European :-)
@ Wed, 2010-10-13 13:23
The biggest problem you will
The biggest problem you will have with your eye is ambient light. With my eye the software read the phototransistors with the LEDs on and then again with them off. With the LEDs on you got a reading that was ambient and reflected light. With the LEDs off you got only ambient light. By subtracting the ambient light readings from the total light readings you were left with reflected light only. This allows my robots to ignore sunlight coming in through a window.
In your case Head will have the IR LEDs and Hammer the phototransistors. If head pulses the IR LEDs then Hammer can try to subtract the low readings from the high readings to eliminate ambient light. The hard part will be Hammer knowing if the pulsing is due to Head or say 50Hz from indoor lighting
@ Wed, 2010-10-13 14:21
Thanks for your thoughts
I tried simple modulation and I was getting some promising results with it. One problem was that when I increased sensitivity by increasing the value resistor in series with phototransistors their response time also started to get slower. Instead of (close to) square wave I was getting something that looked more like shark fins. So I would have to compensate the "slowness" of phototransistors in SW too. Slowing down the pulsing rate could help also (more high/low time). I did tests at 198Hz. Pictures and more info here: http://letsmakerobots.com/node/22571
I'll probably try to make the tracking without pulsing first and try it a few times. Hopefully it'll work well enough at night time (and winter is closing in so not much Sun light here anyway). I'll add modulating and ambient IR filtering after that. Now I just have to get back on track building that robot.
@ Mon, 2010-06-21 11:46
Thanks
Thanks. You can build almost anything from paint stirrers ;-) I really should get back working on it but I've been lazy lately.
@ Mon, 2010-06-21 08:43
Looks like a good base. good
Looks like a good base. good work
@ Mon, 2010-06-14 22:32
"that metal ribbon thingy
"that metal ribbon thingy with holes in it" - I've always called it "plumber's tape", I guess it's more accurately called "metal strapping". Either way, plumbers use it to hold in water heaters, keep pipes stuck to walls, things like that.
@ Mon, 2010-06-14 22:58
Plumber's tape
"Plumber's tape" or "metal strapping" will do. I just picked up a roll of it from a hardware store because I thought it would become handy. Ah, pipes, now I know where I have seen this before :-)