robogrover

robo grover
grover sat alone on the shelf, placid red smile stiched across his goofy blue face.  his fabric eyed gaze never shifted.

he couldn’t see it coming.

when the knife pulled free from the back of his head, his polyester brains spilled to the floor.  only a sad smile remained.  had grover only been able to see his attacker, things may have been different.

grover the muppet — barely alive.
we can rebuild him.  we have the technology.

scene of the crime

robo grover attacked

we’ll be giving grover the ability to see his attacker before it’s too late.  he’ll be outfitted with muppet vision and the ability to face his enemy.

materials

robo grover materials
i chose to use the basic stamp and developer board that i bought for the robot walker howto.  we’ll be using the basic stamp to determine which direction motion is coming from, and to control a servo to turn robogrover’s head in that direction.

in addition to the microprocessor / control system of your choice, you will need the following:

  • servo motor (1)

  • photoresistors (2)

  • 0.1uf ceramic capacitors (2)

  • 220ohm resistors (2)

eyes

robo grover eyes

robogrover will be able to ‘see’ using 2 photoreisistors.

the resistance across the leads of of a photoresistor varies depending on the amout of light shining on it.  with a simple circuit, your can time how long a capacitor takes to discharge across this resistor.  your program can use this measurement to determine the light level.

we can watch for a change in light level, which robogrover can interpret to mean ‘movement’.  by using two light detector circuits, with a photoresistor in each of robogrover’s eyes, we can measure which ‘eye’ detected more light change and rotate the head in that direction.

as luck would have it, you can easily poke the photoresistor through grover’s eye fabric and it fits nicely in his pupil.

robo neck

robo grover neck

i used a hobby servo to turn grover’s head.  it will just barely cram in there.  you can make grover a ‘spine’ out of an old broken pencil or a lego beam and attach this to something in his rump.  that way when the servo rotates, his whole body twists.

the neck isn’t quite pliable enough to flex on it’s own (without a whole body twist), so if you want only his head to twist, you will have to sever it from his body and fashion him some sort of neck.

wiring

robo grover wiring

to make one eye, connect a capacitor to a photoresistor in parallel.  then wire the resistor in series to an i/o pin on the basic stamp.  connect the other side to vss and you are set.

wire up the second eye the same way but to a different i/o pin.

software

to measure the light levels, you raise an i/o pin to charge a capacitor, then lower it and measure the time it takes for the capacitor to discharge.  you can use the rctime pbasic command to do this measurement.  here is a quick routine to detect the light level on i/o pin 5:

 time var word

high 5
pause 2
rctime 5, 1, time

the higher the value in the time variable, the lower the light.  as light decreases, the value stored in time will be lower.

the routine i’ve been playing with does the following:

  • measure the light value for each eye

  • wait a tenth of a second

  • measure the light value for each eye again

  • calculate the absolute value of the difference between the new light value and the old

  • rotate the servo proportionally based on which eye recorded the most change

you’ll have to play around a bit to figure out what works best.

if you sum up a few measurements for each recording, you can smooth out random fluctuations a little, but your loop will take longer.  it’s a bit of a tradeoff.

rebirth

cautious robo grover

with a bit of fine tuning, robogrover now has some mad vision and neck-turning skills.  i almost get the feeling that he is a little cautious of me.

i hope that his new street smarts will serve him well the next time tickle-me elmo tries to jump him in the back alleys behind sesame street.

Comments

  1. -pat says:

    Neat, but a BASIC Stamp seems a little overkill for that. Take a look at BEAM technology, with heads that track light, circuit diagrams here http://www.solarbotics.net/library/circuits/bot_head.html and a gallery showing some examples here http://bestiary.solarbotics.net/1230_head_gal.html

    Look into the BEAM stuff, I think the scene has gone a little stale, but it’s got the kind of mind frame I think would appeal to hardware hackers.
    -Pat

  2. -pat,

    very true. it’s probably overkill. i love the programming side of things, though. there’s something appealing about trying out different routines to experiment with what works best and to produce different behaviors.

    i’d like to see some cool beam beased toys like this. measuring light level difference over time would be challenging, but a simple light follower would be just as fun.

  3. sp says:

    Awsome little trick there, i’m actualy going to do this little hack and freak out my roomate, she will think the doll has a mind of its own, i’m going to add a few led’s in there, so he will light up when he moves his head, it would just add a scary effect i believe….

  4. Milokp says:

    We have the capability to build the world’s first bionic [grover]
    [Robogrover] will be that [grover]
    We can make him better than he was before
    Better. Stronger. Faster

    –Theme from 6 Million Dollar Man

    Anyone else have this theme run through your head when you saw the pictures above?

  5. brk says:

    Actually, the Stamp is *perfect* for an application like this. It’s real easy to program, there is a ton of support for it from the manufacturer and from other groups/lists and it’s reliable.

    If you were going to produce RoboGrovers in bulk, then it would make sense to build this with discrete components or a lower-cost micro. But, for general hacking like this the Stamp is a GREAT tool.

  6. Roy says:

    Every time I click on “robot hacks” I get the weblogsinc.com home page. Is is me or your link?

  7. Mike Montana says:

    I had a good chuckle on this one. A great intro stamp project for beginners like myself. Thanks!

  8. StALkbEE says:

    no video!?

  9. conor says:

    so cool!

  10. Andrew Wardach says:

    Does anyone have a video of this? I would love to see it in action.

  11. greg says:

    That’s hilarous… Now I’m staring at the old stuffed Alf (not the talking one) on my shelf and wondering… Do I have the technology?

  12. hbarbobot says:

    hahahaha thanks that is awesome, i might have to try this execept with a little less basic ;)

  13. aluxeterna says:

    reminds me of that creepy-ass teddy bear in the Movie AI. This is the beginning of the end… I expect robogrover to be up and running, literally, before too long.

  14. Shadow says:

    it might be an interesting idea to go for infared sensors instead. Then it would work in the dark ;) I have never tried to use a stamp before, but it shouldn’t be very difficult. Calibration would be simple. If one wanted to get really goofy, put a GP2D02 or GP2D12 in there and have it raise it’s arms or play a sound file when someone gets close enough. heheh

  15. gotboy says:

    great work, nice write up too. A good laugh. Reminds me when i took out santa bears brain in a similar fashion and inserted 400 tom thumb firecrackers ( they are small ) and stitched him up. I lit the fuse and gave him a frontal lobotomy !!!, my mum threatend to send me to counciling after that one . woops

  16. noouch says:

    For some reason, this freaks me out.

  17. Rick says:

    It would be awesome to make one of these that would randomly start screeching and flailing around.

  18. h says:

    so clever.
    i think i’m the only person in the world that finds grover intensely creepy?
    this would scare the crap out of me!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s