Shop OBEX P1 Docs P2 Docs Learn Events
Servos Reset Propeller w/o a GIANT Cap (>2000uf) - why? — Parallax Forums

Servos Reset Propeller w/o a GIANT Cap (>2000uf) - why?

soshimososhimo Posts: 215
edited 2008-12-21 06:13 in General Discussion
Description of Problem:
Using a propeller I have a servo hooked up to P0 for the data line and +5vdc for Vcc. I've got 4k7 resisters in series with the data signal as suggested by Beau Schwabe in the comments for the Servo object. I placed a 1000uf cap between ground and supply leads to the servo connectors since I have long wires to the servos. Everything works fine when I have just a single standard servo running. As soon as I try a high torque servo or two servos at the same time my prop will reset as both servos draw maximum current. My first thought was low batteries (I'm using alkaline and I noticed under load they were dropping a couple hundred mv) so I replaced the batteries and the problem persisted. I then decided to add a larger cap (next size up I had was 3300uf) and it seem to fix the issue (I ended up having to put a diode in series with the +5 supply so the cap wouldn't discharge into my PS when I turned power off).

Now my question is, why would the larger capacitance make a difference? The only thing I can think of is that two servos are drawing too much current together and the larger capacitor helps the batteries maintain those current surges. I measured current with one servo drawing maximum current (I stalled the rotor) and it was only drawing about 150ma. Is that too much for alkaline? I've got a Breadboard PS on order from SparkFun (I've got the same circuit on a protoboard right now but it's using 12vdc via alkaline batteries as the input) so I'm hoping that won't be an issue. One final note, I noticed the 7805 regulator was getting smokin hot so I ended up putting a heatsink on it - not sure if that made a difference (I screwed up at the end and made two changes at once so I'm still not sure what fixed it - shotgun troubleshooting bit me again).

Thanks in advance.

Post Edited (soshimo) : 12/21/2008 12:13:21 AM GMT
571 x 350 - 3K

Comments

  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2008-12-21 02:13
    soshimo

    The only thing I can think of is that two servos are drawing too much current together and the larger capacitor helps the batteries maintain those current surges.


    The larger capacitor help smooth the voltage sags and voltage surges out




    I ended up having to put a diode in series with the +5 supply so the cap wouldn't discharge into my PS when I turned power off).

    This is not need unless when you remove the power from the Basic Stamp you want it to go·right off
    What I use when I need to this is to use a LED and a Resister then when the led is no longer lite you know it has powered down

    This call a Bleed Down·circuit for a capacitor the LED is not·normally used

    I hope this helps

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 12/21/2008 2:20:59 AM GMT
  • Carl HayesCarl Hayes Posts: 841
    edited 2008-12-21 04:04
    What size wires are you using? They may be too skinny for the full-load current.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-12-21 04:44
    Soshimo,

    You mentioned only the one diode and, assuming your 3.3V regulator is running from the same supply, sags in the +5V servo supply could be pulling your 3.3V supply below the Propeller's brownout threshold. (I'm not sure I believe only 150mA for a stall current, BTW. Are you sure you measured that correctly?)

    Anyway, if my assumptions are correct, try this circuit instead:

    attachment.php?attachmentid=57470

    The extra diode prevents short-term, negative-going spikes on the +5V supply from pulling the Propeller's supply down. You may need to experiemnt with the capacitor value on the input of the 3.3V regulator to make sure the voltage holds up during the longest spike.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Just a few PropSTICK Kit bare PCBs left!
    374 x 214 - 2K
  • soshimososhimo Posts: 215
    edited 2008-12-21 06:13
    @PhiPi - Thanks for the circuit - that works perfectly. I was close - I just needed the 2nd diode at the input to the 3.3v regulator since I've already got the cap there (though I may need to change it out - I've got 100uf there now I believe). As for measuring the current, I was measuring between pin 2 of the servo header and the diode (though at the time I didn't have the diode or capacitor in place). Did I measure in the correct spot?

    ** Update **
    100uf works fine on the input to the 3.3v regulator and at the servo output. The problem has gone away - I even put the old batteries in just to verify and sure enough it worked.

    Post Edited (soshimo) : 12/21/2008 9:34:31 AM GMT
    683 x 341 - 4K
Sign In or Register to comment.