Shop OBEX P1 Docs P2 Docs Learn Events
pulsout on a bs1 — Parallax Forums

pulsout on a bs1

DgswanerDgswaner Posts: 795
edited 2007-06-17 19:11 in BASIC Stamp
I have working BS2sx code for a servo (HS-303), pulsout at 2250 centers the servo. I want to get the servo to work on a bs1
my manual says that the bs1 pulsout command is in 10μs units. and the bs2 is in 2μs units, so 2250x2 = 4500 / 10 = 450.

450 doesn't center the servo. no matter what I send to the servo it is out of range and turns the servo counter clockwise. to it's limit.

any thoughts? I usually just guess a couple of times to get in the right rang and then fine tune it to get the limits. but I can't seem to find anything in the working range.

any help would be appreciated.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-06-17 16:49
    The BS2sx is faster than the BS2, so its units are actually 0.8us. 2250 x 0.8us = 1800. With the BS1 this should be 1800 / 10 = 180. This corresponds to 1.8ms which is about right since the pulse width range for a servo is 1-2ms although many work over the range 0.5-2.5ms.
  • Robert SmitheRobert Smithe Posts: 2
    edited 2007-06-17 17:00
    The servos I use have a centre closer to 1.5 milliseconds , so for the stamp 1 try pulsout 150
  • DgswanerDgswaner Posts: 795
    edited 2007-06-17 18:09
    ok I'm a noob! I was using 2 power supplies one for the servo and one for the bs1 I forgot to tie the grounds together. but I would have needed to know the .8us so thanks for the help.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
  • Larry~Larry~ Posts: 242
    edited 2007-06-17 19:11
    Well don't beat yourself up, I have forgotten to hook up the one and only power supply on many occasions

Sign In or Register to comment.