BlackWido

The best way to handle the servo offsets is to put them into the SSC-32 registers. Then they are set in stone so to speak. As long as you don’t replace a servo, or move it to another pin sending 1500 will always result in a perfectly centered servo. The only way to break this is to use a software servo offset command after the register one is implemented.

If your talking about a different type of offset then, well, never mind. :slight_smile:

That’s probably correct, but it seems like these offsets affect the pwm values played by the GP sequencer.

But if the servo offsets are set in the registers, any sequences made with the robot no matter what system, will be correct for that robot, or any other similar robot as long as it’s offsets are stored in it’s SSC-32 registers as well. Oh my head hurts…

This sounds like the best approach. Then very simple positions become possible. Neutral becomes 1500. Very simple to use. And the sequences are portable.

Alan KM6VV

Hi KÃ¥re,

That could be better. Of course it could also depend on the compiler. In general, it still looks like there are calcs other then constants in the serout calls. but the dynamic parameters have to be calculated sometime.

If the exported EEPROM sequences incorporate the offsets, then you would have to turn of the SSC-32 offsets. You should be able to prove it one way or the other by generating sequences with and without offsets in the SEQ program. If you capture the SEQ output, you might see the offset commands (I’m probably thinking of “live” streaming output).

Alan KM6VV

Hi,

I’m glad to here that the code makes any sense to you :wink: And you’ve got it right about the gait part.

The last 2 days I spend some time building my Phoenix. On this moment I’m waiting for some parts like batteries and some mounting stuff. Until they arrive I will spend some time upgrading BlackWido. I still need to add the ball bearings which are laying on my desk for over a month now. :open_mouth: I also will upgrade the SSC to V2 so I can help figuring out the offset issues as well. Sorry, I haven’t got any input on that part right now…

I’ve got a few questions about the Phoenix as well:

Zenta,
How did you finally mounted the SSC? With the connector to the front or to the back? The way I’ve mounted it right now is the upper body plate with the switches to the front and the SSC connector to the back. This way the SSC connector is still reachable and I can use the back side of the upper body plate (where the switches are in the tutorial) to mount the voltage regulator.

I decided to go with the same Lipo batteries as you do. I know the global specs of Lipo batteries but I’ve still got some simple questions. Do I need something besides the battery, a universal Lipo charger, and a voltage regulator? Do I need to connect the small 3 pins connector for either charging or working or is this just for monitoring?

Jim,
Personally I think that this is a better way to mount the body and SSC. What is the reason that the SSC is mounted the other way around in the tutorial? Is it possible to change the default SSC setup of the phoenix?

I’ve got some more questions/suggestions about the tutorial. Will send you a PM later his week.

Thanks, Xan

xan,
i might actually be able to offer some info here, rather than just asking questions. :open_mouth:

If you mount the ssc inside the chassis with the switches to the front you reduce the rear coxa range of movement massively when a serial cable is attached - been there done that. If you mount the scc following the LM instructions (switches at the back) the serial cable goes in at the front and doesn’t limit the front coxa range of motion as much. Though this isn’t an issue if you’re using a bluesmirf or if you mount the boards on the top deck.

I ‘did’ start my project using an 11.1v lipoly, but haven’t found a suitable voltage regulator. I tried an MPI HD voltage reg which is supposed to be able to regulate to 6v and in theory handle the high current demands when all 18 servos are moving, but in practice i found that it struggled to supply adequate power and when using it my hex’ would regularly slump.

A regulator like this also generates a huge amount of heat (enough to burn your finger on the heat sink), so finding a suitable mount is also a faff. I think there are better (switching??) regulators which don’t produce as much heat, but i’ve yet to find one suitable for this project - though the ones zenta has on his LM phoenix look interesting.

You will need a specific lipoly charger, i use a pro-peak prodigy with a pro-peak 12v power supply which seems to be a good and safe set-up.

You might also consider adding a low voltage alarm to protect the lipoly pack too, as discharging the cells below a certain level (think it’s 3v per cell) will damage it. I have both an led and an audible monitor by CSM. They’re about £10 each and need to be programmed using an RC stick radio and receiver - though i think the come set-up for 3cell 11.1v lipoly out of the bag.

For the moment, i’ve switched back to a self built 6v 2100mAh nimh pack for VS and a 800mAh 7.4v lipoly for VL. This is a rough and ready set-up because i just want to get the hex’ walking around. I will eventually go back and tidy up this solution

Hi Xan,

Well, finaly I mounted the SSC with the serial connector to the back and the switches to the front. I tried to do it the other way (like LM) but the long/large LiPo’s cell made some conflicts to the rear coxa servos. I think everyone who is building a Phoenix should make their own decision in how to place the SSC, it all depends of the hardware (battery and regulators) and your personal opinion of what you like. :wink: This picture show how I finaly mounted the SSC:

I’m soon gonna post some new pictures, I just have to make an holder/bracket for the PS2 receiver first.

After much walking and testing I’ve found the Turnigy switch regulator very handy. They don’t get hot at all! And have strong led showing the voltage status (but a sound alert would be great too :wink: ). The 3 pins connector are for charging with a balance charger (monitoring), you don’t need it else. LiPos often comes without power connectors, so you might need that too. I don’t think you need anything else.

If you’re referring to this one.
lynxmotion.com/Product.aspx? … egoryID=48

Its specs say it needs to be derated as the input voltage increases. It’s really designed to be connected to a 7.4vdc lipo not a 11.1vdc lipo. In fact connecting the 11.1vdc battery is hurting the situation. To deliver 6.0vdc at the output the regulator needs to get rid of 5.1 vdc with as much as 10 amps being drawn. E x I = P, 5.1vdc x 10 amps = 51 watts! It’s no wonder it’s failing. :open_mouth:

We always mount the SSC-32 with the DB9 in the front and the power connections in the rear. When we finally get to adding programming info to the tutorial we will take another look to see if there is a better way. We always welcome feedback!

Hi Xan,

I’ve been playing around with your gait code. And have made a 12 steps ripple gait and also a 8 steps tripod gait code for my LM Phoenix. Pretty cool to see her “dance” with the tripod gait too. Both the 12 steps and 8 steps gait are made with 3 swing positions.

My code for a 12 step ripple:
From the main section, initiate Ripple 12 steps pattern:

[code];Calculate Gait positions
gosub Gait [1, LRGaitPosX, LRGaitPosY, LRGaitPosZ, LRGaitRotY]
LRGaitPosX = GaitPosX
LRGaitPosY = GaitPosY
LRGaitPosZ = GaitPosZ
LRGaitRotY = GaitRotY

gosub Gait [3, RFGaitPosX, RFGaitPosY, RFGaitPosZ, RFGaitRotY]
RFGaitPosX = GaitPosX
RFGaitPosY = GaitPosY
RFGaitPosZ = GaitPosZ
RFGaitRotY = GaitRotY
		
gosub Gait [5, LMGaitPosX, LMGaitPosY, LMGaitPosZ, LMGaitRotY]
LMGaitPosX = GaitPosX
LMGaitPosY = GaitPosY
LMGaitPosZ = GaitPosZ
LMGaitRotY = GaitRotY
	
gosub Gait [7, RRGaitPosX, RRGaitPosY, RRGaitPosZ, RRGaitRotY]
RRGaitPosX = GaitPosX
RRGaitPosY = GaitPosY
RRGaitPosZ = GaitPosZ
RRGaitRotY = GaitRotY
	
gosub Gait [9, LFGaitPosX, LFGaitPosY, LFGaitPosZ, LFGaitRotY]
LFGaitPosX = GaitPosX
LFGaitPosY = GaitPosY
LFGaitPosZ = GaitPosZ
LFGaitRotY = GaitRotY

gosub Gait [11, RMGaitPosX, RMGaitPosY, RMGaitPosZ, RMGaitRotY]
RMGaitPosX = GaitPosX
RMGaitPosY = GaitPosY
RMGaitPosZ = GaitPosZ
RMGaitRotY = GaitRotY[/code]

And the 12 steps ripple gait sub:

[code];[GAIT]
Gait [GaitLegNr, GaitPosX, GaitPosY, GaitPosZ, GaitRotY]

IF (GaitStep=GaitLegNr) & ((ABS(TravelLengthX)>2) | (ABS(TravelLengthZ)>2) | (ABS(GaitPosX)>2) | (ABS(GaitPosZ)>2) | (ABS(GaitRotY)>2)) THEN ;Up
;Up middle position:
GaitPosX = 0
GaitPosY = -LegLiftHeight
GaitPosZ = 0
GaitRotY = 0
ELSE
;Up start position:
IF (GaitStep=GaitLegNr+1) & ((ABS(TravelLengthX)>2) | (ABS(TravelLengthZ)>2) | (ABS(GaitPosX)>2) | (ABS(GaitPosZ)>2) | (ABS(GaitRotY)>2)) THEN
GaitPosX = TravelLengthX/2
GaitPosY = -LegLiftHeight
GaitPosZ = TravelLengthZ/2
GaitRotY = TravelRotationY/2
ELSE
;Up end position:
IF (GaitStep=GaitLegNr-1 | GaitStep=GaitLegNr+11) & ((ABS(TravelLengthX)>2) | (ABS(TravelLengthZ)>2) | (ABS(GaitPosX)>2) | (ABS(GaitPosZ)>2) | (ABS(GaitRotY)>2)) THEN
GaitPosX = -TravelLengthX/2
GaitPosY = -LegLiftHeight
GaitPosZ = -TravelLengthZ/2
GaitRotY = -TravelRotationY/2
ELSE
;Down start position:
IF (GaitStep=GaitLegNr+2 | GaitStep=GaitLegNr-10) & GaitPosY<0 THEN
GaitPosX = TravelLengthX/2
GaitPosY = 0
GaitPosZ = TravelLengthZ/2
GaitRotY = TravelRotationY/2

 	;just walk:   
	ELSE
	  GaitPosX = GaitPosX - (TravelLengthX/8)     
	  GaitPosY = 0
	  GaitPosZ = GaitPosZ - (TravelLengthZ/8)
	  GaitRotY = GaitRotY - (TravelRotationY/8)
	ENDIF	
  ENDIF
ENDIF 

ENDIF

;Advance to the next step
IF GaitLegNr=11 THEN ;the last leg in this step (RM leg)
GaitStep = GaitStep+1
IF GaitStep>12 THEN
GaitStep = 1
ENDIF
ENDIF

return[/code]

For the tripod gait I had to add a bit variable called LastLeg since the initation (your GaitLegNr) repeat itself for a tripod.

8 steps tripod code from the main section:

[code];Calculate Gait positions
LastLeg = FALSE
gosub Gait [1, LRGaitPosX, LRGaitPosY, LRGaitPosZ, LRGaitRotY]
LRGaitPosX = GaitPosX
LRGaitPosY = GaitPosY
LRGaitPosZ = GaitPosZ
LRGaitRotY = GaitRotY

gosub Gait [5, RFGaitPosX, RFGaitPosY, RFGaitPosZ, RFGaitRotY]
RFGaitPosX = GaitPosX
RFGaitPosY = GaitPosY
RFGaitPosZ = GaitPosZ
RFGaitRotY = GaitRotY
		
gosub Gait [5, LMGaitPosX, LMGaitPosY, LMGaitPosZ, LMGaitRotY]
LMGaitPosX = GaitPosX
LMGaitPosY = GaitPosY
LMGaitPosZ = GaitPosZ
LMGaitRotY = GaitRotY
	
gosub Gait [5, RRGaitPosX, RRGaitPosY, RRGaitPosZ, RRGaitRotY]
RRGaitPosX = GaitPosX
RRGaitPosY = GaitPosY
RRGaitPosZ = GaitPosZ
RRGaitRotY = GaitRotY
	
gosub Gait [1, LFGaitPosX, LFGaitPosY, LFGaitPosZ, LFGaitRotY]
LFGaitPosX = GaitPosX
LFGaitPosY = GaitPosY
LFGaitPosZ = GaitPosZ
LFGaitRotY = GaitRotY

LastLeg = TRUE
gosub Gait [1, RMGaitPosX, RMGaitPosY, RMGaitPosZ, RMGaitRotY]
RMGaitPosX = GaitPosX
RMGaitPosY = GaitPosY
RMGaitPosZ = GaitPosZ
RMGaitRotY = GaitRotY[/code]

And code for the gaitsub:

[code];[GAIT]
Gait [GaitLegNr, GaitPosX, GaitPosY, GaitPosZ, GaitRotY]

IF (GaitStep=GaitLegNr) & ((ABS(TravelLengthX)>2) | (ABS(TravelLengthZ)>2) | (ABS(GaitPosX)>2) | (ABS(GaitPosZ)>2) | (ABS(GaitRotY)>2)) THEN ;Up
;Up middle position:
GaitPosX = 0
GaitPosY = -LegLiftHeight
GaitPosZ = 0
GaitRotY = 0
ELSE
;Up start position:
IF (GaitStep=GaitLegNr+1) & ((ABS(TravelLengthX)>2) | (ABS(TravelLengthZ)>2) | (ABS(GaitPosX)>2) | (ABS(GaitPosZ)>2) | (ABS(GaitRotY)>2)) THEN
GaitPosX = TravelLengthX/2
GaitPosY = -LegLiftHeight
GaitPosZ = TravelLengthZ/2
GaitRotY = TravelRotationY/2
ELSE
;Up end position:
IF (GaitStep=GaitLegNr-1 | GaitStep=GaitLegNr+7) & ((ABS(TravelLengthX)>2) | (ABS(TravelLengthZ)>2) | (ABS(GaitPosX)>2) | (ABS(GaitPosZ)>2) | (ABS(GaitRotY)>2)) THEN
GaitPosX = -TravelLengthX/2
GaitPosY = -LegLiftHeight
GaitPosZ = -TravelLengthZ/2
GaitRotY = -TravelRotationY/2
ELSE
;Down start position:
IF (GaitStep=GaitLegNr+2) & GaitPosY<0 THEN
GaitPosX = TravelLengthX/2
GaitPosY = 0
GaitPosZ = TravelLengthZ/2
GaitRotY = TravelRotationY/2

 	;just walk:   
	ELSE
	  GaitPosX = GaitPosX - (TravelLengthX/4)     
	  GaitPosY = 0
	  GaitPosZ = GaitPosZ - (TravelLengthZ/4)
	  GaitRotY = GaitRotY - (TravelRotationY/4)
	ENDIF	
  ENDIF
ENDIF 

ENDIF

;Advance to the next step
IF LastLeg THEN ;the last leg in this step (RM leg)
GaitStep = GaitStep+1
IF GaitStep>8 THEN
GaitStep = 1
ENDIF
ENDIF

return[/code]

When running the 12 steps ripple gait you can clearly see that calculation speed has to be improved. Not visible at 6 steps ripple.

I hope you didn’t mind me doing this. I just had to try. :wink:

Agian, thanks for sharing your code!

Hi,

The cable I’m using hasn’t got a housing in the connector. I removed it for that reason :wink: There are also connectors with flatcables which might work. I want to place the regulator on the place where LM has got his switches that’s why I want to change the setup.

Jim did send me this regulator It is not a switching regulator so it will get hot. I’m using a 7.4V lipo, saying that the phoenix will draw 7 amps, it will dissipate about 10W on heat. It sure is more efficient to use a switching regulator. I’ll try out this one first and maybe I’ll switch to a better one later on.

I’ve ordered a simple charger that I can just plug into the wall. It is suitable for 1 to 2 cells lipos. It only has got 2 wires running out so I guess it isn’t a balanced one :smiley: I hope it works out…

Good you’ve mentioned! I didn’t know that it would damage the lipos. Is it also possible to use the analog inputs on the botboard?

I’ve looking for options to mount the receiver to. I was thinking of loosing the housing and just mount the much smaller PCB. I’m sure that you will come up with some kind of solid, prof-looking bracket again. Maybe I’ll wait for that :wink:

Here is the first picture of my phoenix waiting for more parts…

BlackWido is now upgraded with ballbearings and SSC V2! I didn’t tested the SSC…

Wow, you send some good time with my code! :smiley: I’ m looking forward to see some more videos and, even better, try them out myself! Maybe I missed something but what improved the calculation speed? The offset calculations? I didn’t had time (and a running SSC V2) to check that.

I don’t mind at all! My code isn’t perfect and I’m sure that it can be optimized in a lot of ways! And adding more functions is also great! This was the reason that I released the code :smiley:

Thanks! Xan

Hey Xan,
After looking at zenta’s use of the Turnigy switching regs and having done some reading-up, it would seem that they are probably the better solution to go for, so I ordered a couple yesterday. (£33 including 3 day shipping from his link). As an aside they have a built-in battery monitor - meaning you wouldn’t need an additional unit.

I also think the way he’s installed them is much more elegant than the way i had things - trying to find somewhere for a reg with a bulky (and hot) heatsink.

I had similar thoughts about the PS2 receiver and having had it in pieces i wondered about removing the bulky connector, soldering a shortened cable directly to it and having it mounted on a smaller deck above the BB2.

It also would be great if you and zenta could agree/advise on a “standard” for mounting the SSC-32 for use with your code and PEP. This would mean that we’re all ‘singing from the same song sheet’ (so-to-speak).

I have no preference and am happy to go with which ever way you chaps think is most appropriate, but i think it would be helpful to get this agreed. :smiley:

Hi plingboot,

Maybe I should also reconsider to get them as well :wink:

That’s what I’m thinking about :smiley:

I also think that it makes it much easier that we’ve decide in some kind of standard on the SSC mounting. That’s why I brought it up. Both Zenta and I have got the SSC mounted with the connector to the back. I suggest that use this setup as “standardâ€

I’m more than happy to go with whatever you chaps are suggesting - so i’ll re-fit my SSC over the weekend.

I’ve had years building and tinkering with RC cars, rock crawlers and helis and am pretty good at the building and ‘fettling’ side, but at this point in time i’m still on a very steep learning curve as far as picking up the LM electronics and programming goes - so i’m more than happy to simply be able to implement the great work you and zenta are doing on my hex - for the moment. :wink:

As a total aside…
Any thoughts on creating an app for the iPhone - so you could use it (instead of a PS2 controller) to control a phoenix/blackwidow via bluetooth? :open_mouth:

I can think of lot of my fellow geeky graphic designer friends who couldn’t resist buying and building a phoenix if they could control it with their iPhones. :smiley:

Hi plingboot,
Not a bad idea, I drilled a hole under the PS2 receiver hosing and soldered wires directly. But where you thinking of also removing the connector that where soldered on the receiver card? That would make the the receiver box even smaller. I have not come up with a good design for a holder, just a smaller deck above the BB2 (have not made it yet).

But I think I’ll keep the original PS2 receiver hosing, I like its design.

Hi Xan,

Nice picture, now you’ll have to fight with the servowires again :wink:

Ok, so you solved the ballbearing part in another way then I did, I placed the ballbearing inside the lowest coxa bracket part. But your solution has a very solid bearing. Great work!
Noticed your rubber pads, not a bad idea when lowering the body in fast speed. Or what was your intensions with the pads?

Yeah, you have to try them. I didn’t improve the speed (more the other way I think :laughing: ). But since you mentioned earlier that you would try to work on improving the calculation speed, I think that would be great when running the 12 steps ripple gait (twice as many calculations in one gait cycle).

Hi plingboot,

It is easy to control it with bluetooth. BlackWido in combination with the Wii Remote gets his commands over bluetooth. So that side is totally done :wink:.

The bleusmirf that i’m using uses SPP (serial port protocol) If your phone can do that as wel you can make a connection to it. If not, you need to find another embedded solution for the bluetooth connection. I’ll tried to find a embedded HID unit but without any succes :frowning:

If that’s done, you need to build a small application on you phone. I did that once on a Sony Ericson phone for another bluetooth project. It was build in JAVA and worked perfectly!!

Xan

Hi Zenta,

Yep I know, and calibrating… :unamused:

I’ve got a cool casing but most of the time BlackWido is sitting peacefully on my desk. After a few months my desk was getting black and scratched from the aluminium. That’s when the pads that where already lying around cached my eye :wink:

Ah, now I’ve got it :wink: I think that the calculations can be more optimized to increase the speed. I didn’t see the it running with the 12 steps gait. I’m curious what it does with the speed :slight_smile:

Did you already tried to put the servo offsets in the registers of the SSC? I want to play with that tomorrow.

Xan

Shows what I know. :blush: I thought it was a switching regulator. :frowning:

I don’t know why not. :wink:

I removed the connector and soldered the wires direct in my CH3-R project. I retained the housing, but you don’t have to.
lynxmotion.com/images/html/proj088.htm