Shop OBEX P1 Docs P2 Docs Learn Events
Heating up an SX while pulsing a servo - what's up here? — Parallax Forums

Heating up an SX while pulsing a servo - what's up here?

Ken GraceyKen Gracey Posts: 7,403
edited 2006-10-11 05:41 in General Discussion
Hey SXers,
I'm doing something pretty basic with SX/B. I'm in the process of setting up a throttle control using a larger Futaba S3302 Servo. I'm using the SXTech Board with only three connections to the servo - Vss, Vdd and I/O pin all in the right places. When I run the code the square waves are perfect - verified on a scope. When I connect a servo the SX gets really hot and the servo doesn't respond (or, erratically at best). When I watch the signal on the scope,·the square waves reduce in voltage all the way down to zero when the servo is connected.

I'm using a 7.5V 1A wall pack power supply, but I have the same problem with a benchtop DC power supply.

I'm stuck. Any idea what I'm doing wrong here? I've replaced chips, boards, etc and I think the problem is staring me in the face.

Thanks,

Ken Gracey
Parallax, Inc.

DEVICE········· SX28, OSCXT2, TURBO, STACKX, OPTIONX
FREQ··········· 4_000_000

'
' IO Pins
'

Servo···PIN·RC.0· OUTPUT
'
' Constants
'

'
' Variables
'

ServoVal··VAR·Word
' =========================================================================
· PROGRAM Start
' =========================================================================

Start:
·For ServoVal = 190 to 130
·PULSOUT Servo, ServoVal
·PAUSE 20
·NEXT

·FOR ServoVal = 130 to 190
·PULSOUT Servo, ServoVal
·PAUSE 20
·NEXT
GOTO Start

Comments

  • Mike CookMike Cook Posts: 829
    edited 2006-10-01 18:25
    Try this one, I've used it with the standard servos ya'll sell.

    For SX28, servo is on RA.2

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike
  • Ken GraceyKen Gracey Posts: 7,403
    edited 2006-10-01 20:22
    Thanks Mike -

    Also causes the SX to get burning hot. Hmm. Must be a problem with my SX Tech Board. Swapped the servos out and same issue.

    How is it that I could get a bad SX Tech Board [noparse]:)[/noparse] ? Checked the power, Vss connections and they seem okay, too.

    I'll have to bring this setup to Chris tomorrow morning to see what he can figure out.

    Ken Gracey
    Parallax, Inc.
  • Mike CookMike Cook Posts: 829
    edited 2006-10-01 20:46

    That's weird, everything I bought thought the years has worked! tongue.gif

    Are you sure you resonator is the same frequency that you are defining in the program? I would expect if it wasn't then the servo would not move as expected.

    Does the SX get hot with the servo unplugged?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike
  • NateNate Posts: 154
    edited 2006-10-01 20:58
    From your description, it sounds as if the servo I/O pin is drawing too much current - are you sure you have the correct pinout/in for the servo?

    I assume you have determined that the power supply is adequate for the power needs of the servo (Vdd).

    I would try the servo with a BS and different board (ie HomeWork or whatever) and see if it works.· If it does and you have replaced all the other parts (SX, power supply, perfboards), then the problem must be the SX Tech Board.· Divide and conquer!!!!



    Nate
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2006-10-01 21:04
    Ken,

    do you power the SX and the servo from the same 5V regulator, i.e. the one on the SX Tech Board? I once tried this and it did not work because the servo "eats" a lot of starting current when it begins movement, causing the SX to reset, or bringing it into some other fancy state. This is why there is this huge elcap attached on the BoeBot and SX-TechBot assemblies. In my application, instead of using a big cap, I use two separate voltage regulators, one for the servo, and one for the SX, both powered from the same wall wart supply (9V DC, minimum 500 mA).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • YendorYendor Posts: 288
    edited 2006-10-01 21:54
    I agree Nate, the Since/Source current is 30mA per pin, right?
    Would hooking up an AmpMeter in series with the Pin and Servo control work to see how mutch it's drawing help?

    Maybe also check the specs out on the current drain on the servo.

    Another alternative is to use a different power supply as Gunther recommended, and a MOSFET or eqivalent to turn it on (back in my day I used an IRF-212 on a 12v solonoid w/a kickback, but couldn't find a equivalent), buffering the ouputs may help depending on the dran, too, but requires an additional IC.

    Also, are kickback diodes needed w/ Servos?
  • ForrestForrest Posts: 1,341
    edited 2006-10-01 23:09
    Ken,
    How old is your SXTech board? I remember having a discussioin with Guenther about a year ago, concerning the size of the tantalum capacitor on the output of the LM2940 regulator on the SXTech board. I believe SX Tech board from a year ago only had a 1 uF Tantalum on the output, while the datasheet for the LM2940 recommended more capacitance. I noticed the current SX28 Protoboard and the SX48 Protoboard are both using 47 uF Electrolytic's on the output side of the regulator. You might try swapping the Tantalum for a 47 uF to see if it helps.
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2006-10-01 23:48
    One of my recent SX projects deals with controlling one of the larger Futaba servos. The only problem I initially had was the servo's starting current which was high enough to pull the regulated 5V supply low, causing the SX to perform a reset. Therefore, I added another voltage regulator, like a 7805 or an LM2940 just for powering the servo. On the other hand, I never had problems driving the servo's PWM input directly from an SX output pin.

    I don't believe that the size of the LM2940 output tantalum capacitor on the SXTech board is an issue here, as even a 47µF capacitor would be too small to buffer the servo's starting current. So, IMO, using separate regulators for the servo and the SX might be the best solution.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    Günther
  • Ken GraceyKen Gracey Posts: 7,403
    edited 2006-10-02 00:05
    Hello all,

    You nailed it - it's the lack of capacitors on the SX Tech Board. This explains why the LED was dimming and no amount of benchtop power supply would fix my situation. I remember that Guenther used a big 3300 uF capacitor in the power supply when he put the SX Tech Board on his Boe-Bot chassis.

    I'm going to use the SX 28AC/SS Proto Board - we put a couple of larger caps across that power supply and added servo ports.

    Good call by everybody. I'll report back with results after I get a new circuit built on the SX·Proto Board. Like Guenther suggested, I'll add an additional power supply if this fails.

    You don't want to know how much time I spent on this simple problem.

    Thanks,

    Ken Gracey
    Parallax, Inc.

    Post Edited (Ken Gracey (Parallax)) : 10/2/2006 2:00:37 AM GMT
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2006-10-02 02:35
    Ken, if you are using this aplication in cold country, you wont have to heat the enclosure [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • Ken GraceyKen Gracey Posts: 7,403
    edited 2006-10-02 04:19
    altitudeap-

    The application is in cold country, so the SX's heat is welcome at 50 MHz!

    To all:

    The SX28AC/SS Proto Board's capacitors are adequate for driving servos. I'm powering a large 1/4 scale Futaba S3302 servo from the Proto Board's servo port and it works fine now. I also measure current draw of the servo and it was about 400 mA on startup, but runs about 300 mA in operation loaded with a small Honda engine throttle cable.

    Thanks to everybody. I'll be back to ask about interrupts Monday or Tuesday.

    Ken Gracey
    Parallax, Inc.
  • John KauffmanJohn Kauffman Posts: 653
    edited 2006-10-10 16:15
    As per above discussion, has anyone seen on the SX Tech board the phenomenon of
    overdraw of current >> low voltage >> reset
    when using a Parallax standard servo with its power from Vs & Vdd?

    Nothing is hot. SX chip encased in SXKey is warm.

    Thanks?
  • ForrestForrest Posts: 1,341
    edited 2006-10-10 16:38
    John,
    I think your problem is related to the same issue listed above - the capacitor on the output side of the LM2940 isn't big enough. The data sheet lists a MINIMUM recommend output capacitor of 22 uF. My SX Tech board had a 1 uF Tantalum. I recently swapped it out with a 22 uF Tantalum - but haven't tried it with a Parallax servo yet. Sounds like a project for this evening [noparse];)[/noparse]
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2006-10-10 17:11
    Even when you replace the output capacitor on the SX Tech board with a 22 µF cap, or put one in parallel to the existing 1 µF cap, this is not enough to buffer the servo's starting current which can go up to 500 mA (or even more), depending on the type of servo you are using. This starting current will definitely cause the regulator output voltage to drop low enough to reset the SX, especially when you have included a BOR option in your program.

    Therefore, you either need to add an output cap of some thousand µF, or - this is my preferred solution - a separate voltage regulator, just for the servo. With this second regulator in place, still keep in mind that the power supply you are using to feed both regulators must be capable of at least 500 mA peak. Otherwise the regulator's input voltage would drop low enough to cause an output voltage drop on the regulator supplying the SX. This is why I prefer switching type wall-wart supplies with an output of 9V @ 1000 mA.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    Günther
  • John KauffmanJohn Kauffman Posts: 653
    edited 2006-10-10 17:22
    Thanks Guenther.

    I understand your suggestion that a second voltage regulator is the best answer. But I need to stick with a set of parts and the SX Tech tool that the students have. They do have one 3,300 and one 1,000 uF electrolytic cap.

    Can we add the cap into the circuit on the breadboard rather then replacing the existing cap soldered to the PCB?

    Can you explain how to wire the cap on the breadboard with the:
    SX TEch Tool headers
    the servo three-wires?
    Thanks.
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2006-10-10 21:38
    Hi John,

    ok, I got you.

    Please find attached the diagram copied from my book how to install the buffer cap to the SX Tech board. You can place the capacitor at any other position but make sure that the plus lead (usually the longer one) goes to a header socket named Vdd, and that the minus lead (usually the shorter one marked with a white band) to a header socket named Vss.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
    1022 x 601 - 89K
  • Ken GraceyKen Gracey Posts: 7,403
    edited 2006-10-11 00:59
    John,

    It's pretty clear that you have the "What's a Microcontroller?" Parts Kit. We've used the approach Guenther identified with the 3300 uF capacitor in your WAM kit and it will do the job perfectly. All of the remaining projects in the WAM book should be portable to the SX with SX/B. I can't think of any that would be a problem.

    Ken Gracey
  • John KauffmanJohn Kauffman Posts: 653
    edited 2006-10-11 05:41
    Guenther:

    I'm embaressed. I try hard to search my resources before posting a question on the forum, but this time I failed. Your book is sitting right in front of me, but I thought of it as covering topics close to the chip architecture. It never occured to me to check it for something so high-level (and trivial) as powering a servo.

    So let me give you a double thanks for the answer and for the patience of your answer.

    Ken:
    Yes on the WAM kit. We use WAM kit + SX TEch Tool kit.
    Thanks for thinking through possible future hitches.
Sign In or Register to comment.