March 2013

Chomper came about from another silly notion.

After my wife opened one of her stocking stuffers this past Christmas, a small ring, I couldn’t help but save the jewelry box from the trash noticing how it looked like a square head and with an opening mouth. Scary imagination no? Soooo anyhow I found some simple linkage from my radio control race truck box, drilled a hole in the back of the box, glued the servo up inside, hooked up the linkage and TaDa! … the box could now talk. I actually left it like that for a while - a “dis-emboxed” head and even had it yapping to speech and music for a bit with the LED bar graph code floating around here. Fun and silly enough but... 

Chomper Body

 Surely Chomper deserved a body of some sorts so I dug out my super el cheapo motors and wheels/tires I had picked up on ebay and then had to find something to mount them on. Fortunately, for me, not my wife who has to put up with all my junk, I had saved the aluminum support metal out of some of my old carpal tunnel wrist support gloves (yes, yet another result of too much technology, coding and keyboarding work). They seemed to look rather dumb BUT gave the curve needed up top to allow Chompers jaw to open. I wanted more than just a flopping jaw so yet another servo was added to allow Chomper to swivel his head back and forth. Now he could yap AND he could look at you with that question mark look.

Power Up

 Power was needed to do anything so a couple 2 x AA boxes fit nicely up front on his “legs” and a third different type I had around was mounted out back. With Chomper’s big head he was pretty front heavy so I made some simple aluminum rear dragger supports, mounted the other AA box on that and some furniture “sliders” to make it a little less sticky back there. I had to get him leaning back pretty far to keep from falling forward every time he stopped but that kind of added some character to him.

I’d never used an H-Bridge on an Arduino yet and I had a bunch of 754410 chips sitting around so I put together a little H-Bridge board to use. I did learn a bit about the differences of H-Bridges and Arduino vs using a BX/ZX 24 in the process. I could not figure out how to invert the control signals and PWM one for movement like I remember doing on the other platform. I ended up using a third pin to drive the modulation and two pins each for motor direction. Works but seems to use a lot of pins.

Speaking of pins, the “pin driver” in this case is a Nano clone that has a dead USB port for some unknown reason (Ok, YOU all know I killed the port somehow but I don’t know HOW so it’s unknown to me). I just use a USB<->TTL adapter and press the reset button to program it. To power everything from the 6 AA batteries and approximately 7.x volts a basic LM2596 step down regulator is mounted up and adjusted to 5 volts. A speaker out of the handset of an old cordless phone is nestled between Chomper’s legs for some sound and the little round H-Bridge board fits perfectly on the back of it... hot glued of course.

Having just received a boatload a brand new bright LEDs I had to add some light to Chomper so I picked one of the RGB LEDs and wired it up to allow the three colors to rotate, etc. It’s digital output only so not much color mixing but adds a bit of light action as the colors are sequenced through. Actually the code is straight from my  base code and the code running on my Coffee Cup Robot (CCR) thus the blinking LEDs are the same routine... just three different colors on Chomper. Easy enough to do for sure.

Chomper Chomping

Right now Chomper really only has two “modes” of operation - the “HeadBite” mode where he sits there and waits for something to get within range of his sonar “eyes”. Once in range he starts opening his mouth the closer you get until you get too close and then he “Chomps” it shut - thus, “Chomper” is his name.

It’s fun how you can take a pencil and move towards him until you get close enough and he’ll bite down on the pencil and hold it. (See the video - but note I’m not a very good aim with my left hand having missed his mouth a couple times). I also added my normal “Blip” sounds effects from the sonar data - but this time it only starts when you’re close enough for him to start opening his mouth.

Chomper does have a PIR sitting in his mouth kind of like a tongue at the moment. No real idea what to do with it but figure I’ll have another mode that he sits with mouth open looking for something to move and then bites it. OR if he closes his mouth while moving around the PIR may not trigger until he opens his mouth and settles down.

The other mode is a normal roam mode - just drive around and try not to run into stuff. However, using the CCR head rotate code makes Chomper swivel his head instead of rotate it making him look even sillier. Moving the sonar around like that has an unintended effect of false positive sonar hits which adds a little more flavor to his actions as he randomly stops in the middle of the floor and does the “avoid” routine.

His “avoidance” isn’t too great however with the sonar pointing up like it does... although this way is much more fun to interact with him when he’s on the floor or cabinet top. Unfortunately he can’t really see where he’s going down low and gets confused and stuck much easier than my other bots. I’m still thinking about adding another sonar down low and kind of hidden to provide better object avoidance.

Or maybe I’ll just leave him like he is so he can wander about until he runs into the wall, gets too close and puts himself into “Bite me” mode....