Finding mid position

Hi, I’m running a Bot and Atom Pro 28. I’m trying to setup the servos on a Hexpod 3R … so I’m looking for the mid position of the HS-475HB servo. I send a pulse to the servo and it moves… but it’s doesn’t look like it’s the middle of the rotation… it seems to be closer to the end.

I’m using

pulsout p0, 1500
pause 20

Should a pule of 1500 be smack in the middle of the rotation? Or so I have to include and offset? If I add +800 to the pulse ie.

pulsout p0, 1500 + 800

it seems to be more in the middle… then I losen the output wheel and move it etc.

But this just doesn’t seem right… when 1500 should do it?

What am I missing?

Thanks!

In BASIC languages the PULSOUT command usually goes as follows.

PULSOUT (pin#, duration)

On standard servos the center duration of the PWM is usually 750us. 1500 is probably making it go way left.

Are you sure about that? Of the 21 servos I have used so far on my hex, they all have 1500 as center. That’s three differrent models from two different brands.

Mike

standard RC servos have 1500 uS as center with a 20mS frame rate. If you have a different frame rate your center value may vary.

I don’t think that the SSC-32, and thus, the BotBoard, can operate servos with any other frame rate.
The SSC-32 sends out it’s pulses every 20ms.

So, 1.5ms is the rule of thumb.

Please explain how you are positioning this servo.

Is it attached to a limb of your bot, or is it just lying on the table?

i run the same mid posn program on a bot board and it sets my mid posn all the way clockwise. i also tried it at 750 and there was no difference. what’s going on? my batteries are charged, my jumpers are set, maybe its got something to do with being in the southern hemisphere? anyone?

This will only send a sinlge pulse. While it will move the servos output slightly, it will not be enough to finish the move. Try this…

start:
pulsout p0, 1500
pause 20
goto start

This will make the pulses into a continuous stream. Try it…

You are probably thinking of the value you use for a BS2. The pulsout resolution is 2uS so a value of 750 is 1500uS.

Ug… The frame rate does not effect the actual position. Only the on time effects the position…

The SSC-32 has a preset 20mS frame rate. The Bot Board as a programmable microcontroller can set the frame rate to whatever you want.

Um, maybe on newer or a digital $ervo but on a standard analog servo (specifically I use futaba in planes) the frame rate will influence the position. They used to just rectify the signal in the servo so changing the frame rate is equivalent to changing the duty cycle. I checked with another EE here who has also designed systems controlling rc and industrial servos and this is what he recollects as well. On the other hand if newer analog servo amplifier designs have changed to some sort of pulse width locked loop design in the servo amplifer maybe it works the way you describe.

OK, I resubmit that the frame rate does not appreciably effect the servos output shaft position. Especially in the contect of this thread. What I was referring to is that the pulses on time is what is used to command the output shafts position. The frame rate my have some influence on the final position, but it’s not designed to do this as a control method. :wink: okie?

Yup, that did it. I think I need a stronger battery as well. This is fun! :-=)

yep i ran the program in the tutorial written by beth frye and the one suggested by head honcho (without the ‘low p0’ at the top) and still the same. the servo posn goes just short of full right. i have hi-tec hs-422 servos…and am running two battery packs in series

If you’re using an Atom you must put the low p0 in there. It makes sure the servo pulses are low/high/low. Without it the pulses usually revert to the high/low/high output which will cause the servo to move full right. It does this because it is seeing a 20mS pulse. This is out of range, but the servo still tries.

Would you need to do this with the Atom Pro as well?

Yes, any Atom controller requires you set the output pin the the desired level before sending pulsout commands to that pin. It can be done once at the top of the program.

am running the basic atom, with the low p0 code, have applied vs jumper to the first i/0 bus p0-3 (i.e not the +5v dc jumper configuration - ref. abb manual - p.2)., the pulses are generated and the servo resists turning, but still sets mid posn full right.

Please submit the code you are running. Also please tell us again, you’re using the Atom 28, not the Atom Pro correct? Do you have another servo you could try?

i also dug up an old sanwa servo, and after a bit of rewiring, it did the same thing…all the way right