Shop OBEX P1 Docs P2 Docs Learn Events
Servo voltage — Parallax Forums

Servo voltage

SumoBoterSumoBoter Posts: 8
edited 2005-01-05 04:12 in Robotics
Still having problems with my servos (see earlier·thread).· What voltage do the control pulses work at?· According to the SumoBot manual it says that the pulses are at 5 volts, if this is true I must have a problem with my board as I only get around 300 millivolts, or is this just because of the short pulses.

Comments

  • dandreaedandreae Posts: 1,375
    edited 2005-01-01 15:12
    Make sure that you have VS1 and VS2 plugged into Vss·in the header using jumper wires·(top of your bread board).· Check your power supply with a volt meter across Vdd and Vss in the header (top of your bread board).· Make sure that the battery pack wires are properly installed (the lead with a white stripe is positive).· The power switch needs to be be in position 2.· If you just purchased this Sumo-Bot from Parallax you should have a hole near the bottom of the servo for adjustment.· If not, please contact Parallax at support@parallax.com.

    Dave


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Tech Support
    dandreae@parallax.com
    www.parallax.com



    Post Edited (Dave Andreae (Parallax)) : 1/1/2005 7:08:54 PM GMT
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-01-02 13:47
    I think the duty cycle on that +5 volts is very small due to the Pulse Width Modulation.

    Your comment about short pulses is on the right track. At 1.5 millisec out of 20 millisecs, it comes in under 8 percent in an idealized standard or 800millivolts. [noparse][[/noparse]The BasicStamp's software probably doesn't support these figures and 300 millivolts may be in the ballpark]

    Your meter is likely averaging the readings of the on/off and coming way down. You really need a scope to read the voltage accurately.

    A similar thing happens with AC and we use a value of 0.707 to adjust the duty cycle [noparse][[/noparse]this is a sine wave, not a digital square wave] or about 71% of the peak voltage - so 120 volts Ac requires insulation for roughly 170 volts [noparse][[/noparse]the actual peak voltage] minimum.

    In other words, though most people think that household AC is 120volts, it is really 170 volts at its peak, but we commonly accept the average because it is what is displayed on a meter AND it is the useful figure for calculating power consumption.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan
  • SumoBoterSumoBoter Posts: 8
    edited 2005-01-05 01:25
    Everything is as you suggest, I have tried to get the right servo to stop rotating by changing the program settings, but it seems to be hit and miss.· Sometimes it will respond and stop or almost stop and sometimes it slows down a little and then will resume rotating, sometimes following the programing (SumoBot Motor Test Program)·and changing direction sometimes it will not change direction.··Yes it was just·purchased just before Christmas (it was a present), but there are no adjustment pots on the servos.

    Just·tried it again with a new set of batteries, the right servo started rotating clockwise (forward), then slowed down (my attempt·to get it to stop using the programing changes), it then reversed and then continued to run in reverse.· I then hit the reset button to restart the programing and the servo continued to run in reverse neither changing speed nor direction.· Any·ideas, or·are both servos shot.·
  • SumoBoterSumoBoter Posts: 8
    edited 2005-01-05 01:32
    Forgot to mention, after running the servo for even just a short time (30 - 60·seconds) the top (side opposite the drive) gets very HOT!· is this normal.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-05 01:33
    Please attach the code that is giving you trouble to a message. Don't copy and paste a fragment, post the WHOLE program. This will make it easier to spot a code error that may be giving you troubles.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA


    Post Edited (Jon Williams) : 1/5/2005 1:37:19 AM GMT
  • SumoBoterSumoBoter Posts: 8
    edited 2005-01-05 01:55
    I don't think that it is a programing problem as the servo doesn't respond the same way consistently, if it was a programing problem wouldn't it consistently do the wrong thing?

    I have attached a copy of the program to the message

    ' Mini Sumo 2.1 : Motor Test

    ' {$STAMP BS2}

    '
    [noparse][[/noparse] I/O Definitions ]

    LMotor CON 13 ' left servo motor

    RMotor CON 12 ' right servo motor

    '
    [noparse][[/noparse] Constants ]

    LFwdFast CON 1000 ' left motor forward; fast

    LFwdSlow CON 800 ' left motor forward; slow

    LStop CON 750 ' left motor stop

    LRevSlow CON 700 ' left motor reverse; slow

    LRevFast CON 500 ' left motor reverse; fast

    RFwdFast CON 500 ' right motor forward; fast

    RFwdSlow CON 700 ' right motor forward; slow

    RStop CON 760 ' right motor stop

    RRevSlow CON 800 ' right motor reverse; slow

    RRevFast CON 1000 ' right motor reverse; fast

    '
    [noparse][[/noparse] Variables ]

    pulses VAR Byte ' counter for motor control

    '
    [noparse][[/noparse] Initialization ]

    Start_Delay:

    PAUSE 20 ' time to disconnect cable

    '
    [noparse][[/noparse] Main Code ]

    Main:

    FOR pulses = 1 TO 2000 'stop right motor

    PULSOUT RMotor, RStop

    PAUSE 20

    NEXT

    FOR pulses = 1 TO 50 ' forward slow - about 12 inches

    PULSOUT RMotor, RFwdSlow

    PAUSE 20

    NEXT

    FOR pulses = 1 TO 50 ' pivot turn - left wheel (ccw)

    PULSOUT RMotor, RRevSlow

    PAUSE 20

    NEXT

    FOR pulses = 1 TO 50 ' forward fast

    PULSOUT RMotor, RFwdFast

    PAUSE 20

    NEXT

    FOR pulses = 1 TO 30 ' spin turn - clockwise

    PULSOUT RMotor, RRevFast

    PAUSE 20

    NEXT

    Hold_Position:

    PULSOUT RMotor, RStop

    PAUSE 20

    GOTO Hold_Position

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-05 02:25
    Well, you got lots of code in that deals with the right motor, but nothing for the left. What gives?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • SumoBoterSumoBoter Posts: 8
    edited 2005-01-05 04:12
    Sorry, I think that the left servo is dead and has been dead from the start. I have tried changing leads, tried changing program setpoints ect., nothing seems to work, no sound nothing. So I have been just working on the right servo trying to determine if this servo also has a problem. I did set up an LED connected to the P12 connection and to ground (VSS) via the breadboard, and I can detect noticeble flickering that changes, so I'm reasonably certain that the code is getting through, but without one good servo I can't be positive.
Sign In or Register to comment.