Shop OBEX P1 Docs P2 Docs Learn Events
SX28 Driving Servos on RB0-3 — Parallax Forums

SX28 Driving Servos on RB0-3

Dr FragDr Frag Posts: 6
edited 2009-03-23 00:22 in General Discussion
Hello all, I need a little help figuring out why RB0-2 can't drive my micro servos.
I bought this controller and 3 of these servos. For some reason the servos connected to RB0-2 won't operate properly yet all 3 servos work on RB3. When a servo is connected to RB0-2 the control voltage drops from the normal 300-400mV to around 6mV. I noticed that RB0-2 are also comparator connections and believe there is some interface problem between RB0-2 and the YT5188 chip used in the servo. (here is the datasheet with 5188 circuit as the one on the YT5188 page only lists 5166 circuit)
This page has the controller schematic and source code (at bottom).

I am going to try to investigate the servo chip board more but it's really small and hard to work with.

If anyone has any ideas as to what is going on here both myself and the creator of the quad controller would really appreciate the help.

Thanx,
David

Post Edited (Dr Frag) : 3/22/2009 4:04:18 PM GMT

Comments

  • Shawn LoweShawn Lowe Posts: 635
    edited 2009-03-20 19:15
    Are you sure you have the servo connections right?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Shawn Lowe


    When all else fails.....procrastinate!
  • Dr FragDr Frag Posts: 6
    edited 2009-03-20 21:24
    Yes, I've even opened the servos up to make sure the wires are going where they should.
  • Shawn LoweShawn Lowe Posts: 635
    edited 2009-03-20 21:43
    Howabout what part number and manufacturer are your servos?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Shawn Lowe


    When all else fails.....procrastinate!
  • PropabilityPropability Posts: 142
    edited 2009-03-20 22:42
    If all your· servos work on the RB3 and none work on the· RB0-RB2 then I would guess that the servos you have might be borderline . I would also guess that is why you are dissasembling them.

    Have you tried a different make of servo to see if it is indeed RB0-2 ?

    Has the manufacturer of the board ever used the servos that you are seeing problems with?

    If another brand or type of ·servo works on the RB0-2 and not the ones you presently have then possibly the spec for timing might be off·(board or servo).

    If I was the designer of the board I would·be asking you to send the servos to me ( shipping on me) so that I ·could nail the problem down and not have a customer doing the work.

    Sounds like a headscratcher.

    Pete
  • Dr FragDr Frag Posts: 6
    edited 2009-03-20 22:55
    Shawn, are the links in my post not working for you?

    Pete, I am disassembling them so I can see the chip/circuit in them and do some additional testing.

    I do not have any other servos on hand but the board creator uses Hitec HS-311 I believe and tested the first board I sent back cuz we thought it might be bad but it worked for him. He has not used the servos I have and has asked me to send them to him and actually suggested we swap servos so I have some that he knows works but I want to use the smaller servos and frankly am really curious to see if I can figure out what the problem is.

    Yes, I have a little bare patch already.
  • PropabilityPropability Posts: 142
    edited 2009-03-21 04:04
    I assume that the use of these servos is to switch the crossing mechanism on model railroad junctions ("Y") which means that the servo is driven from one end of it's travel to the other end. I'm also guessing that you do not have these servos actually trying to drive anything but just sitting there and you are observing their movement based on commands that you send the controller board.

    There could also be the possibility that the controller board is not getting the correct command(s) to move the servos on the pins in question.

    Having a scope is about the best tool for looking at servo pulses and prevents damaging servos when driven into their extremes.

    I'm just starting to get into the SX so not much help in the programming end but I have done a lot of servo control in timers (AVR) and before hooking up one I would look at my scope for the correct pulse and spacing of them.

    I would definitely go to a hobby store and get the servo that the designer uses and verify that you can or cannot move it with the software commands on those pins before going thru the hassle of figuring out the inards of those $5 micros. If you can't make that servo work then my bet is in the way you are trying to send the commands.

    Pete
  • PJMontyPJMonty Posts: 983
    edited 2009-03-21 05:54
    Dr. Frag,

    For reasons known only to the webmaster at Parallax, links on this forum are in a color almost identical to normal text. This makes them very hard to see. I recommend making them a distinctive color as well. I use green, but anything that is bright should do.

    Thanks,
    PeterM
  • Dr FragDr Frag Posts: 6
    edited 2009-03-21 22:09
    Yes Pete, these servos are meant to control the throwing of turnouts. Actually the travel of the servos is either ~ +/-15 degrees or ~ +/-70 degrees depending on a jumper. I'm sure I can use the 30 degree movement to accomplish the task. And no they are not hooked up yet, I'm just using the pushbuttons at this point to test functionality and determine direction of operation.

    I have tested all outputs and they are changing when I press the buttons and the manufacturer tested the board I sent back so I have to assume it's working properly at this point.

    I have a couple of oscilloscopes in storage along with some R/C equipment which I hope to pick up tomorrow. Hopefully that will help shed some light on what's happening on the pins.



    Thanx PeterM, I will color my links and try to use a color that says 'click me'. [noparse]:)[/noparse]
  • Dave HeinDave Hein Posts: 6,347
    edited 2009-03-22 13:54
    Have you checked the voltages on RB0-2 without the servos connected?· Maybe these pins aren't·configured correctly by the software.· Do you have a copy of the source code?· Could you post the portion of the code that references the RB port?

    Dave Hein
  • Dr FragDr Frag Posts: 6
    edited 2009-03-22 16:01
    Dave, the unloaded voltage varies between 320mV and 420mV in the 30 degree mode when I press the button. If I connect a servo to RB0, 1, or 2 the voltage drops to ~5mV. If I connect a servo to RB3 the voltage still swings from 320mV to 420mV when I press the button and controls the servo fine.

    Here is another link to the source code. I'm not the programmer so I don't want to make any assumptions about what part to post.
  • Shawn LoweShawn Lowe Posts: 635
    edited 2009-03-22 17:21
    Dr Frag-
    Sorry, my bad. I didnt think you had that in your post. This is a weird problem.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Shawn Lowe


    When all else fails.....procrastinate!
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-03-22 19:04
    RB.3 OK, but RB.0-RB.2 not working, thinking board fault.

    There are J1, J2, J3, J4.· Is there 5_volts from pin_1 to pin_2 of each?

    Post Edit -- You're measuring hundreds of millivolts, but where (at J1-J4·or at the SX-IC)?·

    a.) Servo1-3 never work?

    b.) Servo4 is OK till you plug in 1, 2, or 3 or it's OK regardless?

    [noparse][[/noparse]Yes, it's millivolts because that's PWM on the DC_V.]


    Post Edited (PJ Allen) : 3/22/2009 7:15:20 PM GMT
  • Dave HeinDave Hein Posts: 6,347
    edited 2009-03-22 23:37
    Dr Frag said...
    Dave, the unloaded voltage varies between 320mV and 420mV in the 30 degree mode when I press the button. If I connect a servo to RB0, 1, or 2 the voltage drops to ~5mV. If I connect a servo to RB3 the voltage still swings from 320mV to 420mV when I press the button and controls the servo fine.

    Here is another link to the source code. I'm not the programmer so I don't want to make any assumptions about what part to post.
    Try measuring the voltage with a 1K resistor between the output pin and ground.· If the voltages are low then either the SX is bad or the pins are not programmed correctly.· If the voltages are OK then the servo must have less then 1K of input resistance.· Does the servo spec give a value for the input resistance?
  • Dr FragDr Frag Posts: 6
    edited 2009-03-23 00:22
    Okay PJ, yes there is 5V on pin 2 on all connectors.
    Same voltage at SX-IC as at pin 3. There's only a half inch of board trace between them.
    Outputs RB0-2 have never worked for me with my servos. RB3 always works no matter what the configuration.

    Dave, under a purely resistive load the output does not change significantly.

    Had a brain storm and put a diode in series with RB0 and the servo works. There is some strange interaction with RB0-2 and the servo chip. Wish I had internal schematics for both.

    Was unable to drive up to storage today to get my o-scope due to weather. Maybe tomorrow I can sneak away.
Sign In or Register to comment.