Shop OBEX P1 Docs P2 Docs Learn Events
I am using the Prop to control servo motors and I have a question. — Parallax Forums

I am using the Prop to control servo motors and I have a question.

jmbertoncelli@USAjmbertoncelli@USA Posts: 48
edited 2008-07-16 18:30 in Propeller 1
Hello,·

I have a problem that is not linked with the Propeller itself and I do not know what should be the forum for my post...

I have a servo and a turet and I want the turet facing 100% foward (servo position 0) but when I connect the turet to the servo shaft then because of the theets on the shaft I am always a litle bit on the left or on the right......

Any idea on how to setup the servo in order to have the turet facing 100% forward with servo position 0?· (of course the issue is mechanical but if there is a way to tell to the servo what is the new physical position 0???).

thanks a lot.

jm.··

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-15 23:40
    There is no mechanical adjustment for this. You have to adjust the "center" pulse width. Normally, the center position has a pulse width of 1.5ms. This corresponds to a 750 value for the PULSOUT statement (on a BS2). You may need to use a named constant in your program for this (call it Center) and define it initially as 750. Try your program with this value, then try it with other values, say ranging from 745 to 755 and see if you can pick a value that mechanically lines things up for you.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-07-16 17:03
    It's quite possible what you are seeing the deadband of the servo in action. Servos have a window around the target angle where the servo considers it's position as "good enough". There are two solutions to this: use a modern programmable servo and program it's dead band to what you want (expensive) or use a stepper motor (power hungry).

    If the servo is always going to the same "slightly off" angle, Mike's technique will work.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • jmbertoncelli@USAjmbertoncelli@USA Posts: 48
    edited 2008-07-16 18:30
    Thanks for your inputs. I shall go with Mike option but that mean for me to manage the offset when using the servo to locate a new direction.

    I should be able to manage it.


    Thanks again!
Sign In or Register to comment.