Heating up an SX while pulsing a servo - what's up here?
![Ken Gracey](https://forums.parallax.com/uploads/userpics/937/nHX7GKXF8OR2S.jpg)
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
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
For SX28, servo is on RA.2
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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.
That's weird, everything I bought thought the years has worked!
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
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
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
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?
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.
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
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It's Only A Stupid Question If You Have Not Googled It First!!
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.
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?
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]
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
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.
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
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
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.