Pssst! Wanna see my robot?

I’ve wanted to build robots for ages, but never really got around to starting, however, I recently scooped a fantastic bundle of electronic stuff on eBay, including an OOPIC microcontroller and sop work is now underway…

I’m building a two-wheeleds educational turtle-thing, but at the same time, I thought I’d have a go at making a walking hexapod. Trouble with walking beasties is that there’s a heck of a lot of construction of structural components before you can even start putting the thing together. I decided to cut right past all of that by making the legs out of K’Nex. here and here are a couple of (blurry, sorry - taken on my phone’s camera) pictures of the thing as it currently stands.

I managed to get it walking last night, if walking is the right word… hobbling or limping might be a better description. Problem is that all those servos are quite heavy and although each of them is capable of supporting it’s own share of the combined weight, when you lift even a single leg to take a step, the other five legs not only have to share the total weight between them, but in fact the dynamic balance of the whole thing shifts so that the legs immediately adjacent to the one lifted are subjected to much greater load.
Some of this is because of the inherent flexibility of the materials (the K’Nex - now I see why other people made their hexapods out of machined alloy), but it does actually work! Sort of.

BTW, to anyone thinking about tinkering with microcontrollers, I can heartily recommend the OOPIC - it isn’t like the others on the mearket in that it is Object-Oriented and you can use these objects to set up something they call ‘virtual circuits’ - for example, you can attach a debounce (virtual)object to an input line that has a physical push button attached, then you can attach a counter object to the output of the debounce object, then you can attach the value of the counter object to the value of a servo object, then attach the physical servo to an output line and for every press of the button, the servo will advance a single step - quite independently of any code execution in your main program.

There are a whole bunch of different objects you can use to simplify the process of talking to external hardware, such as the aforementioned Servo object, but also things like a Pulse Width Modulation object for controlling the speed of a DC motor (or dimming an LED), a Sonar object which handles all the nitty-gritty of timing the return pulse of a sonar range finder and so on, It’s programmable in C, Java or Basic from the same IDE.

Cool stuff. I’ve admired the OOPIC for a while as the logical next step from the LEGO mindstorms controller I have now, but it’ll probably be quite a while before I go there.

I’m in the process of building a 3D plotter right now. The circuits are built, the stepper motors running, the chassis designed, but then BabyFantsyPants came along, free time dropped to about an hour a month, and all such projects witnessed a crashing halt.

3D plotter? Sounds interesting… Is that going to be like a relief-carving milling machine sort of idea? (I was going to attempt that myself a while ago).

Another idea I want to play with is a large-scale 2d paint jet printer/plotter - maybe a 6 foot square frame with an x/y axis head, carrying four aerosol paint cans (CYMK) with solenoid valves - clamp the thing to a wall and sit there sipping your cappuccino while the machine creates beatiful graffiti for you.

Mangetout, congratulations for doing something not one in ten thousand of us could do.

Sure, I want beautiful graffiti in my home. But what I’ve really been looking for is a two-wheeled, educational turtle-thing. Let me know when you’re ready to go mass-production.

Why settle for graffiti when you can get art?

I, for one, welcome our new hexapod masters.
Ooh - I’ve been dying to use that line since I’ve joined!

I have a sumo bot that is about 1/2 complete, but has been sitting in a box for about 3 years now. I’m tempted to try finishing it since I can’t build my model railroad in my apartment…

It’s a 2 wheeled wedge with infrared opponent detection, and is based on a BASIC Stamp. I want to paint it hot pink, and name it Floyd.

Super cool.

How much software can you put on one of those? What sorts of logic are typical? “when you run into a wall, reverse yourself” seems obvious, do you do more advanced things like having it do tricks or interact with it’s Master or it’s environment in more complex ways? What sorts of sensors are typical? I.e. sensors to detect distance to an object, microphones, etc.

Super cool. I must build one one day.

I’ve threatened that Bot Mark 2 will be programmed to seek out and goose the family cat…
:wink:

The module I’m using can read up to 64K of code and data stored in EEPROM - this doesn’t sound like much by today’s standards, but in fact it is enough space for a truly massive program - mostly because the code compiles down to a couple of bytes per line. The code can be as complex as you like and as it is possible to write to memory, the thing can be programmed to learn about its environment etc.

Sonar distance sensors are available as modules that just plug in, bump sensors are just switches with a whisker attached, phototransistors or similar can easily be interfaced, along with more exotic stuff like passive infra red for motion detection, flame detectors, magnetic compass and global positioning modules, to name but a few. The limit is typically in the imagination of the experimenter.

We used these in the lab I teach for a year. I found them to be very easy to program due to the object orientation. Much of the low level programming is done for you, and that leaves more time to make intelligent systems instead of wasting time integrating the hardware to the controller.

The main drawbacks of the OOPic are that the ease of programming comes at the expense of speed, there is a limited amount of program memory, and the use of a proprietary programming language. We have since moved on to using Atmel AVR’s in the lab, which blow away the OOPic in every one of these catagories, but are much harder to program.
Mangetout, could some of the instability be from the fact that each leg is attached to the base, while the top servo is trying to move the leg foward? It seemes that the bottom servo is firmly attached to the base, and would seriously limit the range of each leg.

Also, it sounds like you have two sets of three legs that move together. It would also be a little more stable if you had each leg move independantly, with only one or two legs moving at a time. This is harder to code up, but it looks really cool when the robot is walking. I’m not sure if the new OOPics can control 12 servos at a time though, which version are you using? Hopefully it is the newest one, as the older ones don’t have all of the neat objects to control sonar, and things like that.

Is it a GIRL robot???

You’re right, hightechburrito, for any serious project, particularly one that will be assembled permanently for a specific purpose, there are much better, simpler, faster solutions, but for me, the hobbyist who doesn’t want to spend hours and hours designing, the OOPIC is hard to beat. The one I’ve got has the B.1.0 firmware (the middle version) - it has the oServoX object and can control a dozen servos and has the Sonar stuff (in fact the bundle I picked up on eBay included a couple of SRF04 sonar modules). I’m thinking about upgrading the chip to the latest version; it seems to be a fairly cheap thing to do.

The walking robot uses a modified alternate tripod gait, i.e.

-Lift & step leg R1 fully forward
<wait a moment>
-Lift & step leg L2 fully forward
<wait a moment>
-Lift & step leg R3 fully forward
<wait a moment>
Pull all legs back half of their travel (pushing the robot forward)
<wait a moment>
-Lift & step leg L1 fully forward
<wait a moment>
-Lift & step leg R2 fully forward
<wait a moment>
-Lift & step leg L3 fully forward
<wait a moment>
Pull all legs back half of their travel (pushing the robot forward)
<wait a moment>
Repeat

So at any one point, no more than one leg is off the ground

The bottom servo raises and lowers the leg in an arc that is near as dammit straight up and down, the top servo tilts the leg forward or back, swiveling the joint where the bottom servo attaches - it isn’t a bad system, all in all - other possibilities I considered include:
Making an up-down assembly, then rotating the whole assembly, servo and all with another servo (rejected due to the complexity of engineering)
Moving the leg back and forth with the bottom servo and up and down with the top one (rejected mainly because this makes it harder to actually mount the servos, possibly including extra hardware, which means more weight).
Most of the instability comes from the simple flexibility of the K’Nex components and the play at the joints.

I’m pretty sure I can overcome some of this by tweaking the gait and stance- initially, I was trying to keep all the legs as near vertical as possible, but I’m staring to see that it might help to keep the front and back ones reaching outwards a bit (most of the instability was dipping and lurching at the ends). However, the weight of the battery pack is a problem - at the moment, all 12 servos (not all of them active at any one time, of course) are powered from just 4 alkaline AAs - it may be that they simply aren’t man enough to supply the current to allow this many servos to develop their proper torque.

I’ll most likely take a short break from the walking machine as I’ve been working on another one at the same time; I put it all together in a couple of hours this evening - here’s (sorry, another crappy photo) what it looks like so far - it’s made from a couple of servos, hacked for continuous rotation, sandwiched between those clear blanks you get at either end of a spindle of CDRs - it seems to work really nicely as a basic turtle - I haven’t added any sensors or adaptive programming yet, but there’s plenty of scope (I might sandwich on a couple more discs as building platforms, the hole through the middle is just perfect for routing all the cables).

I want to make this one kid-friendly for programming (just as a turtle, perhaps with a pen for drawing on the floor) - there won’t be room for a keypad and display on it, so I’m toying with the idea of using an infared remote control - I have a little receiver board that I hacked out of a bit of surplus equipment and I managed to interface it to my controller last night (using an asynchronous buffered serial input) and I’m definitely receiving a stream of digital pulses when I point my TV remote at it. I haven’t worked out how to decode it yet though - I suspect it might not be easy (if possible at all) with the OOPIC without dedicating all of the processor cycles to the task, but until I get myself an LCD display module, it’s hard to monitor exactly what the OOPIC is seeing.

Maybe use an external battery pack with beefier batteries? Yes, it isn’t as “pure” and you have the power cord trailing but I’d thought I would mention it.

Brian

“Brain the size of a planet, and they make my ankles bright orange. Typical…”

This and this are my two robots.

I have them battle each other.


For Christmas, there was this big wrapped box for me and my wife wouldn’t let me touch it. For some reason, I started thinking she got me a robot, Robo-sapiens to be exact. I didn’t want a robot or need a robot nor do I have any reason to think she would waste our money on a robot. I just started thinking that it would be cool to get a robot for Christmas, and I’d pretty much convinced myself that it was a robot.

She even wanted me to open it on Christmas Eve so I could use it that night.

It was a frickin’ pillow.

From Hecht’s.

I told her, “I thought maybe you got me a robot.”

Her: “What the hell are you talking about?”

Cool robots. I’d compliment you in a more meaningful way if I knew anything about robots. But still: cool robots.

Minor digression:

Isn’t that a strange feeling? You have a hobby (mine is something else). Wife gets what you suspect is an extravagantly expensive monstrosity related to your hobby that you don’t even want. You open it. It’s something else. Wife did not, as it turns out, spend a lot of money for a gift you didn’t even want. Great. But somehow there’s this trace of disappointment --where did that come from?

I was just trying to be funny.

I don’t actually have those robots. One of them is the “vaccuum cleaner” robot you can get on QVC. The other is the “robosapiens” I was talking about. It’s basically a toy that has a few pre-programmed features, not a real hobbyist robot like Mangetout is talking about.

Still, it would have been better than a pillow.

I just had a flash of inspiration; I was wondering how I can protect my two-wheeler from debris and small fingers, when it dawned on me; I should build it in an empty CD ‘cakebox’ - fix the wheels on the base and all the electronics on CD ‘platters’ as it is now, then turn the central column into the pen holder - a 50-CD box should easily hold everything I want to put on it and there’s a nice clear plastic cylinder that locks on the top to keep it all clean and safe.