LDO Voltage Spike?

Thread Starter

mculik5

Joined May 9, 2018
15
Hi.

I'm an electronics newbie working on a electro-hydraulic control system for an add-on to my tractor. As part of the setup, I'm using a pushbutton switch which has a completely separate LED circuit to light the switch up. In my application, the switch itself will be switching 12V, but the LED is 5V. My plan is to have the NO terminal on the switch energize both the main circuit (obviously) and the LED circuit so the switch is illuminated when it's switched on.

To experiment with this setup, I bought some L7805s on Amazon. They worked great when I sequentially wired everything up initially, with 12V coming from my DC power supply and the power supply powered on the whole time. However, when I hooked everything up first, and THEN turned on the DC power supply, the LED blinked and is now dead. Also, to be clear, in both cases, I was just testing the L7805s and the LED circuit, so the power was running directly from my DC power supply to the L7805 and LED, NOT through the switch.

Clearly, I exceeded the LED's max voltage. Thinking there might have been some kind of startup voltage spike, I took the LED out of the circuit and installed my Harbor Freight multimeter. Sure enough, there does seem to be some kind of voltage spike on startup, but I have no idea how high because the multimeter isn't fast enough.

Now...what I failed to do with the L7805s (because I didn't read the datasheet in enough detail...lesson learned...) is include the before/after capacitors that seem to be a common thing in voltage regulator circuits. Capacitors are in the mail...

So...my questions are... Once I add the capacitors, will this voltage spike still happen? Is this voltage spike normal without capacitors? Could it have something to do with my DC power supply starting up (I was using the DC power supply on/off switch as the circuit on/off) and not be a problem in real life?

Of note, the LDO I'm planning to use in the final setup is this one - https://www.mouser.com/ProductDetail/926-2950CZ-5.0-NOPB.

Thanks in advance!
 

MisterBill2

Joined Jan 23, 2018
18,167
It is a simple matter to power an LED with a 12 volt light source without a voltage regulator. What you need is a properly sized series resistor. As an example, if the LED is rated for a forward voltage ot 2 volts at a rated current of 20 milliamps, then the series resistor must drop 10 volts at 20 milliamps. From ohms law, V=I x R, and so R=V/I=10v/0.02A=500 ohms. The closest standard value is 510 ohms which will work very well.
Your LED may have different specifications, and so you need to do the math yourself.
 

Papabravo

Joined Feb 24, 2006
21,159
Hi.

I'm an electronics newbie working on a electro-hydraulic control system for an add-on to my tractor. As part of the setup, I'm using a pushbutton switch which has a completely separate LED circuit to light the switch up. In my application, the switch itself will be switching 12V, but the LED is 5V. My plan is to have the NO terminal on the switch energize both the main circuit (obviously) and the LED circuit so the switch is illuminated when it's switched on.

To experiment with this setup, I bought some L7805s on Amazon. They worked great when I sequentially wired everything up initially, with 12V coming from my DC power supply and the power supply powered on the whole time. However, when I hooked everything up first, and THEN turned on the DC power supply, the LED blinked and is now dead. Also, to be clear, in both cases, I was just testing the L7805s and the LED circuit, so the power was running directly from my DC power supply to the L7805 and LED, NOT through the switch.

Clearly, I exceeded the LED's max voltage. Thinking there might have been some kind of startup voltage spike, I took the LED out of the circuit and installed my Harbor Freight multimeter. Sure enough, there does seem to be some kind of voltage spike on startup, but I have no idea how high because the multimeter isn't fast enough.

Now...what I failed to do with the L7805s (because I didn't read the datasheet in enough detail...lesson learned...) is include the before/after capacitors that seem to be a common thing in voltage regulator circuits. Capacitors are in the mail...

So...my questions are... Once I add the capacitors, will this voltage spike still happen? Is this voltage spike normal without capacitors? Could it have something to do with my DC power supply starting up (I was using the DC power supply on/off switch as the circuit on/off) and not be a problem in real life?

Of note, the LDO I'm planning to use in the final setup is this one - https://www.mouser.com/ProductDetail/926-2950CZ-5.0-NOPB.

Thanks in advance!
LEDs are NOT Voltage controlled devices, they are CURRENT controlled devices. An LED is not destroyed by too much voltage -- it is destroyed by too much current.

Now to remove the level of confusion you have initiated by foolishly imagining that a paragraph of text can convey the essential details of a circuit, please provide us with an annotated schematic diagram of what you are doing. Only then can we advise you on how to remedy the problems you are experiencing.

One more thing. I am invoking the @crutschow policy of no schematic, no further comment.
 

Thread Starter

mculik5

Joined May 9, 2018
15
@MisterBill2, @AlbertHall, @Papabravo - Thanks!

First, per @Papabravo's request, here's the PCB schematic, with the elements in question highlighted. NOTE - There is a second, identical switch and power setup with the voltage regulator called "5VRM." SECOND NOTE - The entire example switch is called OPCI, with the LED and SW circuits shown separately. The board itself will be comprised of a few components and a bunch of pins to external switches, temp display, etc.

Annotation 2021-10-22 150940.jpg

Now...

Boy do I feel dumb! When I was translating from mockups to the schematic (so I can have a PCB made), I forgot the resistor. I had it in my head that "the LED is 5V" because of the L7805s. The FV of the LED is 2.1V, typical current 20 mA (datasheet: https://media.digikey.com/pdf/Data Sheets/NKK PDFs/UB_Series_with_Guard_Datasheet.pdf).

The reason I went the voltage regulator route is so that the LED brightness is consistent whether the tractor engine is on or off, or whether the RPMs are high or low. I tried just a resistor initially, but this LED is such that tiny changes in voltage/current produce huge changes in brightness. With the resistor sized for the running voltage of the tractor plus some extra room (649 ohm resistor), it was barely visible with the tractor off. So, I decided on a 5V voltage regulator and a smaller resistor (147 ohm).

So, I'll obviously put the resistor back in...BUT...this still doesn't address the voltage spike concern. If the voltage regulator output spikes to, say, 20V on startup and I have a 147 ohm resistor in series for the expected 5V, there will be 20V and 123 mA on the other side of that resistor (if my math and understanding are correct) for the LED to fry itself with.

So...what can I put after the 7805 and before the 147 ohm resistor to "absorb" the voltage spike? I think the answer is a capacitor, which I'll be adding per the voltage regulator recommended circuit diagram. Specifically, this one - https://www.mouser.com/ProductDetail/80-T356C225K035AT-TR.

35V and 2.2uf = 77C = 21.4mAh. This capacitors ESR = 5 ohms. If my math and logic are correct (BIG if...), that means this capacitor could absorb a 35VDC spike for:

35V / 5 ohms = 7amps; 21.4 mAh / 7 amps = 11 seconds before that voltage spike starts to flow downstream (which, in this case is to ground, not through the LED, because the capacitor is parallel to the LED)

Are these two things correct - my logic, and the idea that a capacitor will "absorb" the voltage spike?

If so, the question is back to where I started, which is, "What is a typical output voltage spike for an LDO on startup?" The answer will allow me to ensure the voltage rating for the capacitor I select is adequate.

Again, thanks!
 

MisterBill2

Joined Jan 23, 2018
18,167
Your LED will need a series resistor to limit the current unless it is built into the LED.
I detailed the description of determining the value of that resistor in post #2. so yes, it will indeed be a current limiting resistor IN SERIES with the LED. THus it will limit the current.
 

Thread Starter

mculik5

Joined May 9, 2018
15
@crutschow - If I hook the LED directly to my DC power supply - no resistor or anything - and provide 5V, the current is ~18mA when the LED is cold. If I add a 100 ohm resistor in series before the LED, the current drops to ~10mA, and if I add a 220 ohm resistor, it goes to ~5 mA.

So, if the 7805 didn't spike, the LED would've been fine with 5V despite my stupidity in forgetting the resistor. It lit up for a split second before it fried, so I know it got voltage/current initially. That lead me to the idea of a voltage spike, and sure enough, when I connected my multimeter directly to the 7805 and powered on the power supply, it seemed to spike up for a split second.

Is that not normal?

For what it's worth, I connected my multimeter directly to the power supply to see how it behaved on startup and it did not produce any spikes at all.
 

Thread Starter

mculik5

Joined May 9, 2018
15
@michael8 - Thanks! Learned something new.

Fortunately, it's a very simple tractor and the electrical system is nowhere near as complicated as that of a modern car.

Also, I'm sourcing input power for my entire setup from the "Operator Presence Control Module," which is a box similar (but miles simpler) than an ECU that takes inputs from the various safety switches to do things like stop the tractor if I fall out or prevent me from starting it in gear.

So, assuming load dump is an issue on my tractor, I'm taking power from a downstream device that is presumably protected.

Either that or I'll be back here asking what could've caused my hydraulic control box to spontaneously combust... ;-)
 

Papabravo

Joined Feb 24, 2006
21,159
We can't know exactly what happened. For me, the "schematic" is cluttered and has a a great deal of extraneous as well as missing information. We only have an observation about an LED being destroyed at turn on. The 7805 like all other integrated circuits has a datasheet which specifies some limitations and absolute maximum values. My speculation is that if the 7805 was at fault, it was because of a transient on the voltage input pin that exceeded one of those limits for a short period of time, and affected the output long enough to damage the LED. Power supplies of all types are designed and constructed to very different standards than vehicle electrical systems. IMHO it is not useful to compare the respective behavior of those two systems.

The electrical system of a vehicle is a much harsher environment and extra measures must be taken to avoid problems. The TI paper on specific vehicle problems is a start, but is hardly comprehensive. The vehicle engineers that I know, who work for "the bigs", are well aware of these problems and have been for decades.
 

MisterBill2

Joined Jan 23, 2018
18,167
This is why I suggested just using a series resistor!
In addition, without adequate bypass capacitors, a 7805 regulator can oscillate, which I have had happen rather earlier in my career. That oscillation is capable of producing higher voltages on the output. So if the regulator was not set up with the needed capacitors that could easily have been the source of the problem. I am amazed that nobody else caught that.
Using just a series resistor to limit current that will not be a problem..
READ THE APPLICATION NOTES FOR THE 7805!! They do not claim that it will work correctly without the capacitors! So there is definitely that requirement.
ALSO! If the LED will function correctly and only draw 18mA with 5 volts across it, you do not have a standard LED! OR you do not have an accurate multimeter. We have no mention as to just what type of LED it is. There have been LEDs with a constant current regulator built into the package, I have used them and they were very handy for the application.
 

ElectricSpidey

Joined Dec 2, 2017
2,758
Using a voltage regulator that needs additional parts such as caps seems like overkill when driving a rinky dink little panel LED.

Use something like this instead.

AL5809 (diodes.com)

You will need to add a series diode (standard) to use this particular driver, but you may also find one that works with a lower forward voltage.

EDIT:
After rereading the data sheet I'm pretty sure the additional standard diode is not needed.
 
Last edited:

crutschow

Joined Mar 14, 2008
34,281
Another relatively simple way to control the LED current is with a constant-current source consisting of two transistors and two resistors (LTspice simulation below):
Note that the LED current (green trace) varies less than 1mA for a battery voltage variation of from 10V to 15V.

The circuit will generate no significant output spikes for a battery voltage spike.

1635000683702.png
 
Last edited:

RPLaJeunesse

Joined Jul 29, 2018
252
The AL5890-20D-13 requires at least 7 volts across its terminals to work. Add that to the LED voltage and that tells you what voltage it requires as a minimum. The part is intended for off-line use, not for 12V battery use. I would suggest using the 2-transistor circuit above from crutschow which uses 65V rated transistors, more than good enough for a load dump, and it needs only a few volts to properly current limit.
 
Top