Let's Make Robots!

White Legged Spider Monkey Hexapod (3 servo)

Walks (hobbles?) around, avoids stuff, future PIR and LDR for light tracking

White Legged - Yes, it has white legs

Spider - Yes it looks like a spider (with two legs removed - ouch)

Monkey - Yes it has a Baby Orangutan monkey brain

Hexapod - Yes it has six legs

So White Legged Spider Monkey Hexapod is the best name I could come up with.

Having checked out a few 3 servo hexapods here on LMR, especially StaffY's Tarantula build (http://letsmakerobots.com/node/35415), I wanted to give it a go. I've never messed with a walker of any type before, but love the mega servo count walkers roaming around here, so I figured starting as simple as possible was best.


Side ViewThe legs are an old thick coat hanger that has a plastic coating on it which is where the color comes from. Good and bad as the plastic slips or twists at the glued joints which makes a nicer soft feel to it, but it also stretches out pretty fast making it all sag. The legs are simply hot glued to the servo horns and covered up with the little furniture slides that have been gutted and trimmed to fit. The glue is not giving but the plastic is.

The servos are some three dollar 9g's from a HobbyPartz sale again hot glued together in the standard 3 servo configuration. Since I do not have any small LiPo batteries and the Orangutan requires 5.Xv or higher I used a rechargeable 300mah 9v ($6) as the main power. A small Pololu step up/down regulator (S7V7F5 ) ($6) is mounted under the Baby Orangutan chip ($12 on sale) for the 5v to the servos and sensors.

The round perf board is from Radio shack (~$2). I love those little boards and have bought several batches for different builds but figure this is the best use I've found yet - on a spider thingy. The Baby Orangutan is very easy to build a board for, just use a 24pin socket and some male pins for connections. A small regulator for the 5v rail and wire it up. The CPU has two onboard PWM motor outputs as well that I am looking at what to use for. I have a small pager motor I may try to use to make it "buzz" on occasion. No clue for the other yet but maybe a tiny speaker that would buzz instead?

The HC-SR04 is a cheap ($3.00) version from across the ocean. So far I've had some issues with it giving lots of false hits while walking. Not sure if it's the power supply / battery limits or just all the moving around the thing does while walking that is triggering it. Current plan is the have the unit read in between actual movements to see if that helps or not.

The code was developed in the Arduino IDE using the Orangutan and NewPing libraries. This is my first actual bot code in the Arduino world as everything else has been BASIC language solutions so there is likely a lot of optimizing that could be done to the source. There are subs for each walking direction (walkforward, walkbackward, walkleft, walkright, walkstop) that use a "walktimer" to determine which step or frame the bot should take next so the main code can run without delays. I can change the walking speed by changing the global variable "walkdelay" . About 100ms between each step is pretty good but it can be reduced to walk faster or increased to walk slower. It doesn't actually change the servo speed from position to position but the time between each frame position.

Rear ViewI use a "walkmode" variable to track the current activity so I know to reset the walktimer or not and a "walkrequest" variable that is toggled to different walking modes by the main loop. At the end of the main loop are the statements that call the walking sub depending on what the last pass through the loop says we need to do. It's all with timers and subsumption I guess.

I also always use a "robotmode" variable to determine what the current task is at hand such as roam, seek light, hide from light, rest, wait for people, etc as the controls can then be added as sensors or whatever is desired in the future. It's fun to put the thing in different stances as well such as both legs rearward in an "open" posture or both forward giving an aggressive stance. He can even do tricks such as lift one side and move it's leg forwards and backwards. ;-)

Future plans call for a couple tiny LDR inputs on the front for light tracking, maybe the pager/vibrating motor on a motor channel and possibly a PIR sensor *IF* I can find a good place to put it and keep "the look". I need to pick up some red LEDs as well for both indicators and just to add to the look up front.

I can't put too much weight on the platform, however, with the current leg setup so that pretty much fills it up even through there are many more digital and analog inputs I could use on the Orangutan.

Oh yeah, the bit square button at the butt is the power button. I may replace that with a round one but I like the location and the color. I also will shorten all the wires in the near future once I'm really happy with the layout to get rid of the messy appearance at the rear.

Update 12/23/2012

Ultrasonic working and avoidance code deployed - seems to work so far. Added another video of it working. Actually the legs seems to work better than a roller when getting stuck as the legs help to push it away / around stuff instead of just driving into it unknowingly.

Next is to add a couple LDRs to track lighting with for the ligth seek and avoid modes. Also going to add a couple additional LEDs for indicators and just because there are a couple places that just seem perfect to mount LEDs. :-)

Update 12/26/2012 - Added vid of "attack mode" testing

In this "mode" It just sits and waits for something to get within ultrasonic range and does a full speed run at it. Funny with the extra rear weight it rears up on two back legs which looks kind of cool. Still have to hook up the LDR eyes for the light sensing functions.

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I like it !!

Very nice baby spider, good job.

I like the way it avoids obstacles. Noticed that it always turns to its right. Would have been better if it could turn to both directions. I understand that you would have to add another pair of transmitter and receiver. Anyway, GOOD JOB dude !

Yeah, it's right handed for right now.. You're right, with just one sensor it has no idea which way to turn to clear. I'm working on another timer and a random() call to turn either way. You don't want to just flip right and left avoidance or you're easily trapped in a corner or the "evil five legged chair" situations as David Anderson calls it. A timer, random() and a counter will help make it much smarter and can bail if it sees left and right doesn't work within a short time period. Just harder with one sensor. Notice how it drifts to the left too? The strides are slightly different so the "right out" works better right now. But I am changing the forward / backward portion steps to variables so the stride can be changed on the fly by the bot and easily adjusted to go straight. Even makes it easier to have a slow left or right turn feature by changing each side. Also that way if it sees a lot of stuff in a short period of time (using the counter and hittimer) it can shorten its pace but if the coast seems clear it can open up more. Also if the front legs go too far forward when walking it will actually rear up and drag its butt which looks pretty cool. Right now there is no way to control acceleration and speed of the legs between steps however so it looks a little funky taking short steps. So you're right, always turning to the right. Have a righty Merry Christmas :-) Stephen

Looks very much alive now. Nicely done Stephen.. :)
Can't wait to see more progress.. 

Finally figured out the sonar - had to change pins to get it working. With the Orangutan running at 20mhz the values will need to be re-calibrated but the main concern is there something that close or not for my purposes. Also have all the code running without delays, just a walktimer and an avoidtimer/avoidwalktimer. Next some LDRs and light tracking I think. Quite different that a roller playing with it for sure.

Nice clean simple balanced working piece of robotry you present here. Thank you for sharing this white legged spider.

Just the test walking - normal pace, slightly faster, backup, turn, and take a hike.

Still working on sonar sensing. Haven't figured out how to do serial monitor on Orangutan under Adruino IDE so debugging is not easy. Guess I need to find my TTL serial to USB and drive it off the UART on the Orangutan?

Fun little thing to play with, watch and send after the dogs...

 

-Stephen

That's a pretty neat looking creature, and nice writeup btw.
I'm very interested in different stances you put in the code. Have to wait for the video I guess.. :) 

Looks Good! I've ordered some 14g servos from Hobbyking to build one myself.