Odd 9V Power Drain

Discussion specific to the DIP and TQFP packaged ZX devices like the ZX-40, ZX-44, ZX-32 and ZX-328 series. The differences between these devices is primarily the packaging and pinout so most issues will apply to all devices.
liam.zbasic
Posts: 163
Joined: 24 March 2008, 23:33 PM
Location: Southern California (Blue)

Post by liam.zbasic »

Noise... even shutting down power to the motors & motor controller, and unplugging one of the two IR range sensors, I got the same noise. After extensive googling, I found that noise is a well known issue. This site describes it well:

http://www.robotroom.com/DistanceSensor3.html

Adding the 1,000uF filter dramatically smoothed the distance readings without the butterworth filter. The huge capacitor resembles a tootsie roll. I reactivated the butterworth filter (4th order) on distance, and now the P-control is very smooth and graceful. I was able to increase the gain and tighten the setpoint deadband from +/-0.25" to +/-0.125" for more response (some more overshoot though).

So I had to add D-control with the new circuitry. No butterworth on velocity - seems excessive. The result... it definitely dampens the overshoot about the setpoint when I move a target quickly. Its still jittery, but only in sound and not motion. Without the 1,000uF capacitor, the groundbot is very jittery in motion and very unstable. My next step is to increase the order of the filter (6th, then 8th) to hopefully pacify that whiny motor sound.

I have not programmed the I-control. Once I get the D-control sorted out, I figure the I-control should be simpler (less susceptible to noise!). Thanks for the "wind up" tip. My intial thought was to reset the accumulated I-control error once the setpoint deadband was reached.

When ready, I'll be happy to post a video again with the effects of bang-bang control only, then P-control only, then PD, and finally PID control.

Thanks.
liam.zbasic
Posts: 163
Joined: 24 March 2008, 23:33 PM
Location: Southern California (Blue)

Post by liam.zbasic »

Hello. I've been using the LM2940T voltage regulator with an input voltage of 7.5V (five AA batteries) without a heat sink. Its been working reliably and longer than a 7805 regulator with a 9V battery. Today I switched the 7.5V AA pack with a 7.2V NiMH pack (650mAh) to save battery costs. All was working fine with my GBOT project while I was checking out the recently completed PID control system. Then I shot video of D-control only. At times it was unstable (somewhat expected without P-control). Then quite suddenly, the jumper cables from the 7.2V NiMH pack began to smoke. Then the wire insulation actually melted and bubbled exposing the copper strands. This was litterally shocking. The only parts the battery pack supplies are the ZX-40A, 1 LED, 2 IR range finders, and hi/low signals and PWM to the motor controller. I can not imagine why the unstable GBOT drew so much power since the motor controller & motors are isolated from the ZX-40A. Your comments appreciated.
spamiam
Posts: 739
Joined: 13 November 2005, 6:39 AM

Post by spamiam »

liam.zbasic wrote:Then I shot video of D-control only. At times it was unstable (somewhat expected without P-control). Then quite suddenly, the jumper cables from the 7.2V NiMH pack began to smoke.

Then the wire insulation actually melted and bubbled exposing the copper strands. This was litterally shocking.

The only parts the battery pack supplies are the ZX-40A, 1 LED, 2 IR range finders, and hi/low signals and PWM to the motor controller.
Well, I bet you were dismayed to see that! Are you saying that the battery which melted its cable does NOT feed the motor power, just the motor control signal? If so, you should be drawing very little current just to feed the control/sensor circuitry

I could see that if the motors are rapidly reversing back and forth you could have significant power drain as you collapse and reverse the magnetic field in the motor repeatedly.

I am not all that experienced with PID motor control, but I have never heard of "D" only control. Yes "P" only, and even "I" only, but not "D" only. I can see how "D" only wold have gotten into an oscillation and the motors could have been wasting lots of power.

However, im my experience, when I smoke battery wires (not all that unusual), I simply had a dead short somewhere. When I am particularly worried about it, I will put an incandescent lamp in series as a current limiter. I have also used polyfuses. I have experienced a TVS failure and apparently when they fail, they fail CLOSED (== shorted to ground)!!!

-Tony
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

Odd 9V Power Drain

Post by GTBecker »

You certainly have developed a dead short. Finding it should be easy
with an ohmmeter; determining why it occurred might be more of a challenge.

Regardless of what you find, you've just learned why fuses are used. It
is wise to use one on any significant source of power - and you've
reminded me that I forgot to include one on a low-current LiPo-powered
project I just did.

Tom
Tom
liam.zbasic
Posts: 163
Joined: 24 March 2008, 23:33 PM
Location: Southern California (Blue)

Post by liam.zbasic »

The NiMH battery which melted its cable does NOT feed the motor power. It feeds the LM2940T regulator, which in turn feeds the ZX-40A, 1 LED, 2 IR range finders, and hi/low signals & PWM to the motor controller. The motor controller (Pololu dual VNH2SP30) is powered by a separate 7.2V NiCd pack. Regarding a fuse, I don't have one. I better get one. Thanks.
spamiam
Posts: 739
Joined: 13 November 2005, 6:39 AM

Post by spamiam »

liam.zbasic wrote:The NiMH battery which melted its cable does NOT feed the motor power. It feeds the LM2940T regulator, which in turn feeds the ZX-40A, 1 LED, 2 IR range finders, and hi/low signals & PWM to the motor controller.
Was the regulator hot? It is rated for 1A or something like that, isn't it? That should not melt the wires! I forget, but probably the reg has overcurrent protection too.

A short is most likely, and it is probably before the regulator.

But, what cap are you using on the output side of the regulator? The pain in the neck of this family of regulators is the need for a 22uf LOW ESR cap. This is an unusual type for a sufficiently low ESR. You need to parallel a bunch of ceramic caps plus an electrolytic, or get a fairly expensive single tantalum cap. If the reg was oscillating, then maybe you could have the observed problem. Still, a short is most likely.

-Tony
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

Odd 9V Power Drain

Post by GTBecker »

> ... tantalum cap...

A reversed tantalum is a good possibility; they usually short if
upside-down. Do you have one on the regulator input?
Tom
liam.zbasic
Posts: 163
Joined: 24 March 2008, 23:33 PM
Location: Southern California (Blue)

Post by liam.zbasic »

I have a 10nF capacitor that comes with the "ZX Parts Kit A". I had extras. The capacitor is connected to the OUTPUT of the regulator. Another 1000uF filter is connect to the output, although away from the regulator and near the IR range sensor power supply on the breadboard. Nothing is connected to the regulator INPUT, aside from the battery.

I did not check the regulator for heat. Frankly, when the battery jumper wires bubbled, and I was focused on defusing the situation. I thought the NiMH pack would blow. I enclosed a picture of the GBOT. Notice the fried wires. Literally fried.
Attachments
gbot.jpg
(113.78 KiB) Downloaded 3327 times
Don_Kirby
Posts: 341
Joined: 15 October 2006, 3:48 AM
Location: Long Island, New York

Post by Don_Kirby »

I agree, it's most certainly on the input side of the regulator. I'd check for bad or cold solder joints, or anything else that can move and touch something it shouldn't. Those rapid oscillations have a tendency to cause purely mechanical failures that, in turn, lead to the electrical failures.

-Don
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

Odd 9V Power Drain

Post by GTBecker »

Also look at the bottom of the breadboard. Is it sitting on metal?
Tom
spamiam
Posts: 739
Joined: 13 November 2005, 6:39 AM

Post by spamiam »

liam.zbasic wrote:I have a 10nF capacitor that comes with the "ZX Parts Kit A". I had extras. The capacitor is connected to the OUTPUT of the regulator. Another 1000uF filter is connect to the output,
Almost certainly the ESR is not low enough. You have enough farads, just to many ohm-equivalents. Check your parts specifications on ESR. You need a lot more capacitance close to the regulator, and a lot less ESR than the electrolytic. Maybe this was the source of some of your "noise".

-Tony
twesthoff
Posts: 247
Joined: 17 March 2006, 6:45 AM
Location: Fredericksburg, VA

Post by twesthoff »

I agree with gtbecker, make sure the breadboard is not directly mounted to metal. You may need a sheet of insulating material under the breadboard. Do any of the wires on the breadboard that were connected to the battery pack show any signs of heat?
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

Odd 9V Power Drain

Post by GTBecker »

BTW, if you don't have a suitable 1Amp fuse for testing, you can
probably use a single strand of #24 twisted wire, which is usually
composed of seven to 17 strands. A short length, perhaps an inch,
looped from one breadboard connection to another, will offer some
protection from an unintentional high-current load. I just tried a few
such pieces, which fused at ~7 Amps, far more than you need but less
than your battery pack supplied, I suspect.

Small fuses are available, like these, the size of a quarter-watt
resistor: http://www.goldmine-elec-products.com/p ... ber=G13627 .
Tom
liam.zbasic
Posts: 163
Joined: 24 March 2008, 23:33 PM
Location: Southern California (Blue)

Post by liam.zbasic »

The breadboard bottom still has the double-sided tape that it came with. Then I attached velcro to that and the GBOT chasis. So contact is not possible. The only wires that fried were the ones from the NiHh battery to the the LM2940T voltage regulator's VIN. All other wires on the breadboard are fine. The "incident" was most likely caused by the input side of the regulator like many of you wrote. Although I still have not found the cause. I assume the regulator got too hot and somehow shorted the input voltage. So last night I discarded the regulator and started with a new LM2940T and put together a circuit board with a very large heat-sink, a 1000uF capacitor for VIN, then a 1000uF for VOUT, and another 10nF filter on the power rail of the breadboard. See enclosed picture. So far, all functions well. No new "incidents". I bought some 1.5A fuses at radio shack. I'll solder one in along the hot jumper wire between the regulator board and breadboard.
Attachments
regulator.jpg
(119.69 KiB) Downloaded 1733 times
liam.zbasic
Posts: 163
Joined: 24 March 2008, 23:33 PM
Location: Southern California (Blue)

Post by liam.zbasic »

By the way, here is a video of the GBOT (Ground-Bot) with recently completed PID control. The first scene shows P-control only, then PID control. You can see that the overshoot about the setpoint is decreased, and the oscillations are decreased. I was also able to increase the P-control gain for more responsiveness. Video here:

http://www.youtube.com/watch?v=uTh2DBWAbPs

The intent of the video was to progressively show the effects of P-control, then I-control, then D-control, and finally PID. However the GBOT went unstable with D-control only and somehow resulted in the fried power wires and this thread. Anyway, I'm sure you get the point.

For me, the most difficult and time consuming part was putting together the hardware. Programming the control system was exciting. The Zbasic language made it very simple and very enjoyable.

Now that I understand the zbasic architecture, the sensors, the programming language, etc., my next project is to rotate the GBOT 90 degrees and have it balance on its two wheels. Thanks for all your comments.
Post Reply