Shop OBEX P1 Docs P2 Docs Learn Events
need help w/ 4 servos — Parallax Forums

need help w/ 4 servos

Patrick DPatrick D Posts: 62
edited 2007-10-02 01:24 in Robotics
I am trying to make this bot work with 4 servos - they are connected to the p12-15 on my BOE (rev c). (using BS2)

p12 Left Front
p13 Left Rear
p14 RightFront
p15 RightRear

I was trying to use the boebot robotics docs as a guide - but then tried adding my extra servos. The rear servos are mounted 180 degrees differently from the front ones - so to get both servos on one side to go the same direction I was sending PULSOUT 650 to right rear and PULSOUT 850 to right front.



I tried for a few hours but never could get it right - and when the program starts, every wheel is turning. When I make changes to the code, it affects that particular servo, but the others continue to spin unless I send a 750 to them.

for example - you would think this would make both wheel turn the same direction

DO
PULSOUT 12, 850
PULSOUT 13, 650
PAUSE 20
LOOP

but this makes the left wheels stop, while the ones on the right keeps turning.




I have centered and tested the servos -

Post Edited (Patrick D) : 9/30/2007 5:21:58 PM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-30 17:32
    You've certainly thought this out and what you're trying to do makes sense. A servo pulse of approximately 750 (1.5ms) will make a continuous motion servo stop (if it's properly centered which just means that its control circuitry is adjusted to stop with a servo pulse of 1.5ms). A pulse shorter than that (like 650 = 1.3ms) will make it turn in one direction while a pulse longer than that (like 850 = 1.7ms) will make it turn in the other direction. With servos mounted in opposite directions, they should work as you've planned. A servo that's not receiving pulses may jerk initially, but shouldn't run continuously.

    Your code fragment should make the left front wheel move in one direction and the left rear wheel move in the opposite direction (relative to the motor itself). The way you've mounted them, their wheels should move in the same direction. If they're badly out of adjustment (centering), they could behave the way you describe. Anything else doesn't make sense. You'll need to post your program (as an attachment please) to figure out why it's behaving the way you describe.

    What happens when you center and test the servos using the current setup?
  • Patrick DPatrick D Posts: 62
    edited 2007-10-02 01:07
    Well - I think I know what was wrong... (see post here http://forums.parallax.com/forums/default.aspx?f=5&m=220798)

    I was using an AC power source - and now my BOE is DOA.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-02 01:24
    Condolences. Call customer service at Parallax. Often they will repair or replace what's needed for a discounted price.
Sign In or Register to comment.