Controlling a hexapod robot using pure mixes on the openTX

Electronic projects that are either related to the firmwares for the 9x, or simply great for radio control applications.
Post Reply
slebetman
Posts: 6
Joined: Tue Mar 25, 2014 9:04 am
Country: -

Controlling a hexapod robot using pure mixes on the openTX

Post by slebetman »

I just got my Taranis last week and wanted to see how far I could push the programming. After reading the manual I realized that I can use the TIM function in the custom switches to implement a walking gait.

The basis of the logic is this custom switch setting:

Code: Select all

CS1: TIM     0.6   0.6     CS3
CS2: XOR     CS1   CS3     ---
CS3: |a|>x   Ele   1       ---
This sets up a 1.2 second cycle that is triggered by the elevator stick.

The full mix for two legs walking is:

Code: Select all

CH01    (+100%) MAX Switch (CS1) Slow (u0.2:d0.2)
        (-100%) MAX Switch (CS1) Delay(u0.4:d0) Slow(u0.2:d0.2)
        (-100%) MAX Switch (CS2)Slow(u0.2:d0.2)
        (+100%) MAX Switch (CS2) Delay(u0.4:d0) Slow(u0.2:d0.2)
CH02    (+100%) Ele Switch (CS1) Delay(u0.4:d0) Slow (u0.2:d0.2)
        (+100%) Ail Switch (CS1) Delay(u0.4:d0) Slow (u0.2:d0.2)
        (-100%) Ele Switch (CS2) Delay(u0.4:d0) Slow (u0.2:d0.2)
        (-100%) Ail Switch (CS2) Delay(u0.4:d0) Slow (u0.2:d0.2)
CH03    (-100%) MAX Switch (CS1) Slow (u0.2:d0.2)
        (+100%) MAX Switch (CS1) Delay(u0.4:d0) Slow(u0.2:d0.2)
        (+100%) MAX Switch (CS2)Slow(u0.2:d0.2)
        (-100%) MAX Switch (CS2) Delay(u0.4:d0) Slow(u0.2:d0.2)
CH04    (-100%) Ele Switch (CS1) Delay(u0.4:d0) Slow (u0.2:d0.2)
        (+100%) Ail Switch (CS1) Delay(u0.4:d0) Slow (u0.2:d0.2)
        (+100%) Ele Switch (CS2) Delay(u0.4:d0) Slow (u0.2:d0.2)
        (-100%) Ail Switch (CS2) Delay(u0.4:d0) Slow (u0.2:d0.2)
CH1 and CH2 represent two servos on one leg while CH3 and CH4 represent two servos on the other leg.

For additional legs you can simply reimplement the above logic or simply copy the channels.

I've posted a full discussion of how I derived the logic for the mixes on RCGroups: http://www.rcgroups.com/forums/showthre ... st27890660

User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Controlling a hexapod robot using pure mixes on the open

Post by jhsa »

Video please? ;)
It would be interesting to make a multirotor with legs :mrgreen:
walk to the runway and then takeoff..
Something similar was made quite a while ago when the open source firmwares for the 9x radio were still at an early stage.. I think open9x/opentx didn't even exist then :)

http://www.rcgroups.com/forums/showpost ... count=3694

Joao
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
slebetman
Posts: 6
Joined: Tue Mar 25, 2014 9:04 am
Country: -

Re: Controlling a hexapod robot using pure mixes on the open

Post by slebetman »

Cool, hadn't seen that before.

Unfortunately I haven't built any actual hardware yet (so the mixes may be buggy since they're untested). I just don't have that many servos. Part of the reason I posted it online is to see if I can tempt anyone to actually build one ;)

For now, just load the eepe file onto your radio (or companion) and look at the channel monitor screen. Note that the mix in the eepe file uses the SF switch as a sort of throttle hold.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Controlling a hexapod robot using pure mixes on the open

Post by jhsa »

will do that a little later.. And with the taranis you could even have enough channels for a tricopter or quadcopter that walks to the flight line :D
I would like to do something like that. the guys from my club would love to know that their high end radios aren't able to do the same he he..
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
LTMNO
Posts: 1049
Joined: Fri Nov 30, 2012 9:31 pm
Country: Canada
Location: Toronto, Canada

Re: Controlling a hexapod robot using pure mixes on the open

Post by LTMNO »

Simply amazing! I would love to do a project like that as well. Consider this thread subscribed too.
Custom 9x with M64/Telemetry Mod

slebetman
Posts: 6
Joined: Tue Mar 25, 2014 9:04 am
Country: -

Re: Controlling a hexapod robot using pure mixes on the open

Post by slebetman »

Hmm.. actually, just for a demo (and to see if there are any bugs in my mix) I can simply build a two legged robot that drags itself on its belly across the floor. Definitely got enough servos for that. Maybe I'll post a video after all :D
slebetman
Posts: 6
Joined: Tue Mar 25, 2014 9:04 am
Country: -

Re: Controlling a hexapod robot using pure mixes on the open

Post by slebetman »

Here's the eepe file I've been talking about. Saves people a trip to RCGroups
Attachments
hex_robot.eepe
(76.03 KiB) Downloaded 379 times
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Controlling a hexapod robot using pure mixes on the open

Post by jhsa »

slebetman wrote:Hmm.. actually, just for a demo (and to see if there are any bugs in my mix) I can simply build a two legged robot that drags itself on its belly across the floor. Definitely got enough servos for that. Maybe I'll post a video after all :D
Yes please :)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

Post Reply

Return to “General RC Electronic Projects and Discussion”