PDA

View Full Version : Help! Problem driving LD1117V33 from my ESC's BEC...


DeaminRacing
Feb 14, 2009, 12:31 AM
Hi,

I hope someone can help me with a problem I'm having.

I've built a circuit where I am using the BEC output of my Mtronics Brushed ESC to power a AVR microcontroller. I'm also running the BEC output through a LD1117V33 voltage regulator to power a 3.3V sensor board and provide the analog reference voltage for the microcontroller's ADC.

The BEC voltage seems to hold steady at 4.91v at all times, through the entire throttle range of the ESC. However, the output of the voltage regulator is all over the place, based on I'm assuming the current draw of the motor attached to the ESC. At zero throttle I get 3.25v, but as the speed of the motor increases the voltage regulator output also increases. If I hold the drive wheels and increase the throttle I've seen up to about 3.37v from the regulator. The BEC voltage seems to hold steady at 4.91v though.

Since I'm using the voltage regulator output as the analog reference voltage for the microcontroller, my ADC values jump around as the vehicle is driven.

I'm a software engineer by trade, so I do ok with programming the microcontroller, and I have a decent handle on the digital electronics side of things, but I don't much about the analog side.

Can someone explain why this is happening? And perhaps suggest a better way of providing power to my 3.3v sensor board, and a steady reference voltage for the ADC?

By the way, I'm using a separate 4cell pack to power the receiver and the steering servo. It's a rather large steering servo and the ESC's BEC could supply enough current to drive it. I chose not to power the Micro from the same battery pack because I worried about the voltage dropping out from the servo drawing too much current.

Thanks for any help you can give!!
Dave

David T
Feb 14, 2009, 05:22 AM
Can you let us have your circuit diagram and photos of how it's built.
David.

rich smith
Feb 14, 2009, 02:52 PM
Assuming you are not drawing power near the 1117s limit next suspect would be oscillation due to missing or incorrect type bypass caps.

DeaminRacing
Feb 14, 2009, 02:58 PM
I'll work on a circuit drawing so I can post it. For now all I have is some scribbles on a piece of paper...

However, I just disconnected everything from the rest of the circuit so all I have connected to the BEC output is the voltage regulator. As soon as I push the throttle far enough to start the motor turning, the regulator output rises from 3.25v to 3.75v. If I disconnect one of the motor leads from the ESC the voltage will stay at 3.25v... Voltage output at the BEC stays between 4.91-4.92v.

I did notice that I mistakenly used a 100uF cap on the input pin of the voltage regulator as opposed to the 100nF that the datasheet calls for. I'm using a 10uF cap on the output side. Could that cause this type of problem??

Thanks,
Dave

rich smith
Feb 14, 2009, 03:01 PM
It's not how much capacitor on the output but more importantly what type. 10mf is fine if it's a tantalum. Otherwise you might want to tack on a .1mf ceramic in parallel.


I'll work on a circuit drawing so I can post it. For now all I have is some scribbles on a piece of paper...

However, I just disconnected everything from the rest of the circuit so all I have connected to the BEC output is the voltage regulator. As soon as I push the throttle far enough to start the motor turning, the regulator output rises from 3.25v to 3.75v. If I disconnect one of the motor leads from the ESC the voltage will stay at 3.25v... Voltage output at the BEC stays between 4.91-4.92v.

I did notice that I mistakenly used a 100uF cap on the input pin of the voltage regulator as opposed to the 100nF that the datasheet calls for. I'm using a 10uF cap on the output side. Could that cause this type of problem??

Thanks,
Dave

DeaminRacing
Feb 14, 2009, 03:07 PM
It's not how much capacitor on the output but more importantly what type. 10mf is fine if it's a tantalum. Otherwise you might want to tack on a .1mf ceramic in parallel.

Both caps are electrolytic...

rich smith
Feb 14, 2009, 03:17 PM
Both caps are electrolytic...

I believe that's your problem. LDOs like that are orders of magnitude more sensitive to ESR. Myself and dozens of others have been bitten. Try my advice.

Please be courteous and post a followup so other can benefit.

DeaminRacing
Feb 14, 2009, 05:17 PM
Rich, Thanks for the help on this.

I assume that the proximity of the cap to the regulator is important with this as well, correct? I hope to have time later on tonight to add a .1uf ceramic cap in parallel with the current one.

Just as a quick test, I put a .1uf ceramic cap in the circuit, but it's a good 48" of 22awg wire away from the regulator. It did hold the voltage down a few mV lower than what I see without it. I expect it should have a greater effect if inserted with the electrolytic at the regulator?

Thanks again,
Dave

rich smith
Feb 14, 2009, 05:22 PM
Yeah, distance matters. We're talking RF here. 1 inch may be too much. Spec sheet says single tantalum but during the shortage couple years ago I found 1 electrolytic and 1 ceramic did the job.

Rich, Thanks for the help on this.

I assume that the proximity of the cap to the regulator is important with this as well, correct? I hope to have time later on tonight to add a .1uf ceramic cap in parallel with the current one.

Just as a quick test, I put a .1uf ceramic cap in the circuit, but it's a good 48" of 22awg wire away from the regulator. It did hold the voltage down a few mV lower than what I see without it. I expect it should have a greater effect if inserted with the electrolytic at the regulator?

Thanks again,
Dave

DeaminRacing
Feb 17, 2009, 01:25 AM
Rich,

I can't thank you enough for the excellent advice!!

I added the .1uF ceramic capacitor to the regulator output as you suggested. The output voltage now holds steady at 3.25v regardless of how the ESC is driving the main motor. Guess I've got some learning to do on proper filtering, and the analog side of things... Though for now the ADC inputs are as expected and my algorithm seems to be doing it's thing. :)

Now I can get back outside tomorrow and attempt to run the system again.

Thanks again!
Dave

DeaminRacing
Feb 18, 2009, 01:25 AM
Oops! It appears I was a bit premature in my previous post. Adding the additional cap appeared to correct the problem I was experiencing earlier. However, when everything was again assembled, the issue just came back...

It appears that attaching the heatsink tab of the regulator to the aluminum frame of the vehicle is what is causing the problem now. As soon as I insulated the regulator from the frame everything goes to back to "normal"...

Dave

Ron W3FJW
Feb 18, 2009, 01:54 AM
The tab is common with one of the three pins. I can't remember which one (getting old). So the tab has to be insulated from the heatsink (vehicle ground in your case).

Ron W3FJW
Feb 18, 2009, 01:56 AM
Deleted

Hell-e-Guy
Feb 18, 2009, 06:04 AM
The heat sink tab is always connected to the center pin (2). In your case this is the output voltage. Connecting it to the chassis shorted the output.

Hell-e-Guy

pldaniels
Feb 18, 2009, 07:11 AM
I find with LDO's, it really helps to decouple with a few combinations. 100nF + 1uF ceramic on the input side (perhaps a 10uF electrolyte or tant as well), then make sure the output is decoupled well too, 10nF, 100nF, 1uF an 100uF, all depends yes.

I, like others here have been through it. Take note that different brands of the regulator tend to want different levels of decoupling. ST seems to be fine on lower end of capacitance where's cheaper ones go haywire without a decent level.

All in all, make sure you read and abide by the datasheet that applies explicitly to the part at hand :)

Good luck!

rich smith
Feb 18, 2009, 01:04 PM
Hell-e-guy hit the nail on the head. LDO not similar to 7805 here.

Generally all LDOs are deisgend to work with 10mf tantalum on output. Out of two dozen different part numbers I've yet to see an exception. Generally the Ler the DO, the more they oscillate due to high side PNP or P-chan and it gets worst at high current. 10mf aluminum w/.1 ceramic always fixed it even though not officially sanctioned.

DeaminRacing
Feb 27, 2009, 11:51 PM
Hey guys,

Just wanted to say thanks again for helping me figure this one out!
The hardware side of things is now working great.

Now as soon as I get this PID control tuned to react the way I need w/o the crazy overshoot I might have something to show... :rolleyes: