Home made Hex

Hi guys,

I’ve been reading the forum for a lil while now, and i’ve decided to join to share experiences (plus comment on the great stuff i’ve been seeing here!)

So, as a way of saying hi, i’d like to post the hex i made as a graduation thesis. Mods, i’m not sure if it’s to be posted here, so please feel free to replace the topic.

Here’s an awkward pic of the robot as-is. Don’t mind the tangle of wires and stuff, it’s completely not finished atm…

Soo a lil tech info; the bot has 1 controller per leg, an ADuC814, and all these are controlled by a “brain” controller, an ADuC832, totalling 7 controllers on an I2C network.

The leg controllers provide PWM pulses for the three servo’s per leg, and the braincontroller provides position info for each leg.

As i said, it’s not completed yet since i’ve had some problems with it.
First off, the servo’s i used were not nearly powerfull enough (30Ncm, dumb…)
Secondly, all controllers are completely coded in assembler, which made it kinda hard to work with array-based lookup tables (though not impossible)

However, i’ve just found a supply of servo’s that are both more than twice as powerful, and are pretty cheap on top, so they’ll gradually be changed to get a robot that can actually support its own weight…

Plus, i’ve just started to learn C (well, for microcontrollers that is, i’ve had some C experience just never embedded) which i’ll use to implement inverse kinematics (hardcoding positions is a drag :imp: )

Also i made a lil excel file to figure out my IK formulas, and i’m looking into the token passing and balance gesturing, but i’ll implement those later i think (since i still have more than enough coding to do…)

Hi and welcome to this forum! :smiley:

I love your hex, but I do not know the controllers so…

Sam

Greetings and welcome to the forums, ScuD! :smiley:

I just looked up that controller on the Analog Devices site and it looks interesting. I see it is only available as a sample in a TSSOP package which I am not familiar with.

Perhaps one of Atom PRO microcontrollers sold by Lynxmotion might be really good for your application and way easier to program too, :smiley: Another option you may want to check out, at least for the future, is a project designed by Pete (sapian59 here) - it is a dual microcontroller board using a powerful 18F4620 (and will most likely work with an 18F4680 also) PIC microcontroller mated with a dsPIC DSP microcontroller.

I use one of the Basic ATOMs (the PRO’s slower sibling), and it has been very easy to work with. Unfortunately, I am running out of code space on the Basic ATOM and will need to upgrade before I can add much more to the software for my rover.

Before you comitt to purchasing new servos, you should checkout the line of servos sold here. The Hitec HS-475HB and HS645-MG servos would very likely be appropriate for your hexapod as they are used in most of the hexapod kits sold here. There is also a very nice line of Hitec digital servos sold here.

8-Dale

Hi all

First off, thanks for the welcoming :slight_smile:

Thanks for the tip on the Atom Pro, it looks like a really powerfull controller, but i’ve built the network especially to have the ability to have each leg calculate it’s own IK, plus have several analog and digital I/O so extra sensory input can easily be included in the firmware, creating some sort of “reflex-based” behavior (so as not to burden the main controller with a multitude of inputs)
Off course, atm the leg microcontrollers are bored to hell half the time, not having anything to do :smiley: but with the IK and stuff that should change…

Plus having designed all boards myself, it’s somewhat a matter of “pride” getting the thing to work as-is 8)

I have been thinking of creating an FPGA robot controller though, since pwm outputs can then easily be implemented in a parallel processing fashion, but FPGA’s aren’t easy to solder by hand :laughing:

Just had a look at the PIC board you mentioned, and…well damn :smiley: Saipan59, hat’s off to you!
Yet i’d still need an SSC-32, which is too bad…

Please, do not get me wrong, i really appreciate the input and i think there are some awesome controller combo’s built around here, but i’d just like to get my own thing running :astonished:

Oh and speaking of the servo’s: the ones i found have about the same torque, yet they only have plastic gears which is kinda too bad…
However, they’re quite a lot cheaper (yes, they are REALLY cheap :slight_smile:) especially since i’m from belgium so i’ll try these on for size
But fear not, i’m already saving up for a Lynxmotion order :smiling_imp:

Oh btw, hereare some more pics and stuff of the bot

I can certainly understand this very well! :smiley:

He does design very cool and useful stuff!

I can relate. :smiley:

You have a very interesting hexapod there. :slight_smile: I will be looking forward to it becoming operational and seeing some videos of it walking.

8-Dale

[quote="linuxguy I will be looking forward to it becoming operational and seeing some videos of it walking.
]
Well… here’s a lil clip of a test run i did a few months ago, not too impressive though…
[/quote]

That’s a wild looking hexapod!! Some monsterously thick components there. She looks like you could drop her off a smal building and it would hit the sidewalk…and keep on walkin’. lol :wink:

Do you have any recent footage of the progress?

Well it has tipped over on several occasions, and hasn’t cracked anything yet, but i don’t think i’ll try dropping it from a building :stuck_out_tongue:

No recent footage though, since i haven’t made any further progress… still wrestling with the C, it’s getting pretty obvious that realtime IK will be impossible with the 8051 controllers, so i’d have to use lookup tables for cos and sin functions etc.

But i’ve been busy with work, so it won’t be anytime soon unfortunately…

Wow, that’s one solid hexapod.
How much does it weigh?

Here, here!

I know exactly what you mean…
I’m almost done with the assembly code for a PIC18F2620 that I’ll be sticking on a 6DOF biped.
I have an SSC-32, a BotBoard, and saipan’s dual PIC board, but it just comes down to wanting to do it all myself, for this project.
:smiley:

There’s some table instructions in the 18F family, but I haven’t given them a try.
I’ve just been hard coding the steps of each sequence (yucky) into RAM (too lazy to use EEPROM, and RAM is REAL big) and calling them with pointers.

Good luck with the IK!

Actually, that’s a good question… i don’t have scales with enough accuracy to say for sure :unamused: it is pretty beefy though, originally i had planned on shaving some weight from the parts but since it was cut on a home made CNC router the accuracy was off too much to get clean cuts, as you can see in the pics. If i’d have to guess i’d say about 2 Kg, dunno how much that is in pounds or whatever scale you guys use :smiley:

I used hardcoding combined with tables to get the legs to work as seen in the lil clip, took me forever to get it to move as jerkily as you see there :smiley:
Took ADC readings from the pots in the servo’s on an uninitiated leg which i moved about to get some “standards”, then combined these to get it to dance around a lil…

Still, too bad i can’t get the IK crammed into a 8051, i’d have to change all leg controllers to 32-bits to get full-fledged IK which would be a shame… there has to be a way to get IK without floating point, but i just can’t seem to find it…

Would it be possible to just tack on a floating point coprocessor onto your 8051’s?

If that’s not doable, then you can still stay with 8-bits.
Microchip’s 18F family of micros has a free C compiler (imaginitively named “C18”) that comes with a header file (“math.h”) that contains trig functions.

For that matter, doesn’t Motorola’s C compiler have trig functions?

I’m sure that there’s a way to implement basic trig functions in 8-bit assembly…
But, then again, I have no idea how it’s done in 32 bit assembly.
:stuck_out_tongue:

I’ve tried using SDCC to get some simple trigs, but i just made a simple HEX file doing nothing but asking a number and returning an ACOS, turns out the file is too big to fit the controller :confused: I’m not sure if the problem is with SDCC (bad algorithms for 8-bit?) or just with the fact that 8-bit controllers weren’t made to ‘think’, just act…

Yeah, i have a few ARM’s lying around somewhere, maybe i’ll whip up a lil board to change the main controller with the arm and make it do all the IK, since it’s 32bit it should be able to handle the math pretty decently…

That does imply i’d have to get a lot more sensors to get those leg controllers to actually do stuff though, but that’s where the fun comes in :stuck_out_tongue:

Using an 8051… thesis… this wouldn’t be anything to do with 6.115, would it?

if you have a separate controller in each leg then you must also have a communication bus to talk to each other (distributed processing) or a host controller/interface (more conventional.) Wouldn’t it be possible then to make a single 32-bit controller as another device on your bus that each leg controller can request IK computations from? this is sort of like Nick’s idea of tacking a math coprocessor on each 8051, but instead focuses on using a single highly optimized coprocessor and having each 8051 make calls to it when values are needed. It certainly doesn’t seem like it would be any slower than each 8051 computing its own IK unless your communication bus is really slow. :wink:

Uhmm…no idea what you’re talking bout actually :smiley:

Yeah, i was thinking among the same lines, but instead of getting an extra processor just replace the main 8051 processor with a 32-bit one.
I’ve ordered some ARM7’s from analog devices but i still need do design a simple board to get to the testing, which might take a while since i’m in sweden next week (explosives training, woohoow!)
I’m using an I2C bus btw, the slaves can handle 1MHz yet the master can only throughput @ 400kHz since it’s not hardware based, but i’m betting that ARM can crank that up a lil…

um… The IK involved for a 3DOF servo based hexapod robot does not require floating point… It can all be done with integer math. :stuck_out_tongue:

Yeah, but how? :d

Is there an example around here somewhere? cause i think i’m just looking too far (yet again) :angry:

Look at any of the programs in the Complete H3-R tutorial. :stuck_out_tongue:

Thanks !! i’ve been looking through the example code and it really helped. I’ll need to get into it a lil deeper, but i’ve been in sweden for a while (work :confused: ) but i’ll get there… and you guys 'll be the first to know