Shop OBEX P1 Docs P2 Docs Learn Events
get information of angle from servo — Parallax Forums

get information of angle from servo

ArchiverArchiver Posts: 46,084
edited 2004-04-11 03:19 in General Discussion
Hello

Does it is possible get information of angle from servo motor?.

for example , twist the horn and then information of angle will

shows in screen.

I tried serin and serout, and it seem didnt work.

If possible, would you tell me more about detail? Like schematic

and example.

(someone told me that I can use encoder or some sort of resistor
circuit.But I dont understand what he said(I major in biology)


Thanks in advance!

ps: my stamp is 2sx and 2

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-04-10 18:15
    No, that is not possible without first putting some kind of encoder
    (including a method of getting the information back to the host) onto
    the servo. If you can mechanically link a potentiometer to the servo
    shaft, you could use the RCTIME instruction or an external A2D converter
    to read the position.

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: john [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=9TnkpLR2UteF0XfJKXQZX3ON6iccyyW3bRqb2yIMcHoVw7ze97vLJTutHgMPmGQXOChbsZef8Xn9oS-O4nMVTjt_jmr8uw]w3102008@m...[/url
    Sent: Saturday, April 10, 2004 5:36 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] get information of angle from servo


    Hello

    Does it is possible get information of angle from servo motor?.

    for example , twist the horn and then information of angle will

    shows in screen.

    I tried serin and serout, and it seem didnt work.

    If possible, would you tell me more about detail? Like schematic

    and example.

    (someone told me that I can use encoder or some sort of resistor
    circuit.But I dont understand what he said(I major in biology)


    Thanks in advance!

    ps: my stamp is 2sx and 2
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-10 22:17
    > Does it is possible get information of angle from servo motor?.
    > for example , twist the horn and then information of angle will
    > shows in screen.

    Not without modifying the servo. Servo's are "open loop" in that you tell
    them where you want them to be and they turn to that position; There isn't
    any feedback to you that it's actually at the position unless you add
    hardware + electronics to do that.

    > If possible, would you tell me more about detail? Like schematic
    > and example.

    Internally to the servo the electronics work by comparing a voltage that's
    represents where you want the servo positioned to another voltage that's
    generated by a variable resistor that's connected to the shaft of the servo.
    If these two values differ then the electronics drive the motor in the
    direction that will make these two values equal. (It's uses the difference
    between the two values to drive the motor. The bigger the difference the
    faster it drives the motor.)

    If you could connect a wire to the wiper arm of the variable resistor then
    you could read its voltage to determine the position of the servo shaft from
    that. You would then need some kind of analog to digital (AD) converter to
    get a value into the computer that you could use.

    --
    Enjoy,
    George Warner,
    Schizophrenic Optimization Scientists
    Apple Developer Technical Support (DTS)
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-11 01:51
    --- john <w3102008@m...> wrote:
    > Hello
    > Does it is possible get information of angle from
    > servo motor?.
    > for example , twist the horn and then information
    > of angle will
    > shows in screen.

    Servos are output devices only. So you can't read the
    position with an encoder. Perhaps a shaft encoder.



    =====
    Chris Savage
    Knight Designs
    324 West Main Street
    Montour Falls, NY 14865
    (607) 535-6777

    http://www.knightdesigns.com

    __________________________________
    Do you Yahoo!?
    Yahoo! Tax Center - File online by April 15th
    http://taxes.yahoo.com/filing.html
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-11 03:19
    Not all servos operate with a pot. Some use pulses to pick up information
    and direction (two opto-couplers on a disk can tell direction info). Those
    are closed-loop servos. Others have lookup tables and simply position
    without feedback. Those are open-loop servo's.

    >
    Original Message
    > From: George Warner [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=PD-VWoK5pJmMglTyyEdzcZyvN2nYeYWmdxjmmBssZv_Ou_c_vjorDSA7lWO8nGNBwTgI-3C3_EU]geowar@a...[/url
    > Sent: Saturday, April 10, 2004 5:18 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] re: get information of angle from servo
    >
    > > Does it is possible get information of angle from servo motor?.
    > > for example , twist the horn and then information of angle will
    > > shows in screen.
    >
    > Not without modifying the servo. Servo's are "open loop" in that you tell
    > them where you want them to be and they turn to that position; There isn't
    > any feedback to you that it's actually at the position unless you add
    > hardware + electronics to do that.
    >
    > > If possible, would you tell me more about detail? Like schematic
    > > and example.
    >
    > Internally to the servo the electronics work by comparing a voltage that's
    > represents where you want the servo positioned to another voltage that's
    > generated by a variable resistor that's connected to the shaft of the
    > servo.
    > If these two values differ then the electronics drive the motor in the
    > direction that will make these two values equal. (It's uses the difference
    > between the two values to drive the motor. The bigger the difference the
    > faster it drives the motor.)
    >
    > If you could connect a wire to the wiper arm of the variable resistor then
    > you could read its voltage to determine the position of the servo shaft
    > from
    > that. You would then need some kind of analog to digital (AD) converter to
    > get a value into the computer that you could use.
    >
    > --
    > Enjoy,
    > George Warner,
    > Schizophrenic Optimization Scientists
    > Apple Developer Technical Support (DTS)
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    > Body of the message will be ignored.
    >
    > Yahoo! Groups Links
    >
    >
    >
    >
Sign In or Register to comment.