#1309 LED PWM (part 1 of 2)

preview_player
Показать описание
Episode 1309
My friend wants me to design a circuit. 0-1A 0-100% PWM LED driver.
Рекомендации по теме
Комментарии
Автор

A mosfet gate and its nice capacitance (hundreds or thousands of pF) on an op amp output needs at least an output-to-negative-input stabilizing capacitance. The gate series resistor needs to be sufficient since it provides isolation as well. A few tens of ohms is the ballpark. For better results with a capacitive load, the op-amp needs nonlinear feedback. A squarer in the feedback, although the exponent can be tweaked. Most feedback analysis is unfortunately done as linearizations, but reactances are nonlinear - their behavior depends on their state. Just as you’d use a Park transform to minimize error and improve response of a BLDC current controller, so you can use a monomial model in the feedback loop to linearize a reactance.

Slow op amps (<3MHz) do just fine with no gate series resistor - their output impedance is plenty high to damp the gate. If the negative feedback comes from the drain or source of the mosfet, the gate capacitance stabilizes the circuit. For example, an LM224 driving almost any mosfet that way is inherently stable. And slow as expected.

absurdengineering
Автор

Your 1 Khz triangle won't triangle. It's lacking positive feedback and hysteresis.

leosbagoftricks
Автор

You can use a couple schmitt triggere and a simple transistor to limit the current like a what it's done to limit current in power supplies. You are using open collector comparators. Then get rid of the MOSFET and 10k and connect the output of your oscillator directly to non-inverting input. One of the things I learned in college (good prof) was the difference between schmitt trigger and opamp. The op-amps besides not having the hysteresis, always ring in the low frequency because it has a gain issue. Schmidt trigger should not ring because it has a hysteresist and RS flip flop in it.

You are like me an old fashion designer and don't like the simulators like spice to simulate your circuits :D

Just thought about it again tonight. Your design requirement has a hole in it. It does not specify whether the current should 1A max or RMS. If you want to calculate the RMS current using a low pass filter, the output current limit will depend on the switching frequency.

You can use one of the 100s pwm switching powers chips in the market. They have all you need in them.

A software guy may tells you all you need is an Arduino controller and an h bridge!

bayareapianist
Автор

The first pwm led control is just an ON- OFF ratio modulator...since there's no led voltage sense..vis-a-vis the min-max led operating voltage range...so only the peak brightness
"duration time" is varied...so it cannot be called a brightness or dimming controller...
Since even at very low duty cycles the peak brightness is always the same...this is the reason for the irritating glare and eye strain @ any pwm setting ...
The second modulator..can and does always override the first when active ...but here too
led current variable reference is not scaled to compare actual led cueernt min- max range..

analoghardwaretops
Автор

For op amp PWM I use a singe op amp and a transistor. It's a common square wave generator with a voltage input to the positive op amp input through a resistor (usually the same value as the feedback resistor). It will be variable frequency in this configuration (like 500 Hz around 1 and 99%, 1 KHz at 50%) but that usually does not matter. I've ran motors, high power COB array LEDs and heating elements with this circuit.

I'll often then use another op amp for P control (or PI, PID, etc) of the PWM op amp assuming I have an analog sensor like a thermistor. I've tightly temperature stabilized a wide variety of things with this.

roboanalogtom
Автор

Besides the concept of linear control at higher currents there might be an option to control the max current with a module of the type: "LM2596 LED Driver DC-DC Step-down Adjustable CC/CV Power Supply Module".
.. and to override the control input of the LM2596 with the signal of a 555 module that is controlled at input 5.

Manf-ftzk
Автор

I presume you put the cap on pin 6 of the op amp instead of pin 5? That problem in audio amps is transient intermodulation (TIM) distortion - it occurs when the feed back loop has higher frequency response than the amp circuit. So did I guess right. You coulda told us; but then you'd have to kill us! Ha!

rfburns
Автор

Your use of a saw tooth wave and a compaitor is a classic. Do you know thise buildinging blocks - or look them up? And how do EE get so many tricks up thieri sleves ?

GeorgeGraves
Автор

What resistance is between pin 7 and the gate? Combined with the gate capacitance, that forms a first-order pole. Try 30 pF in parallel to cancel the pole with a LF zero... across the resistor might work, but I would go straight to the inverting input.

byronwatkins
Автор

Hmm. Maybe put the LED between the two FET's? The upper one doing the PWM, and the lower one setting the maximum current. Maybe that's a terrible idea -it's late, I'm tired.

PhattyMo
Автор

The current source MOSFET has capacitance from the gate to source and gate to drain. The effective gate to source capacitance is small, since the mosfet acts as a voltage follower. The resistor in the gate along with the MOSFET capacitance introduces phase shift into the feedback loop that may make your current source unstable. I would try eliminating the gate resistor and drive the gate directly to reduce the loop phase shift.

Chris_Grossman
Автор

With feedback i always have problems with my poles and zeros, no matter how i place the poles the little zeros just keep falling off.

TheEmbeddedHobbyist
Автор

Kelvin hertz (KHz), should be kilo hertz (kHz) 😊

RideGasGas
Автор

That triangle generator is not gonna work. First, you need to take the output across the capacitor so that approximately constant charging current gives constant slope, dV/dt = I/C. Next, you need some positive feedback to establish hysteresis and the triangle peaks. Given +12 V and ground, you need the center to be +6 V and I would arrange about 1 V hysteresis. Given 10 k, the average charging current will be 60 uA. For 1 kHz, dt = 0.5 ms and C = (60 uA)(0.5 ms)/1 V = 30 nF. You can tweak the parameters to obtain convenient component values. There is also no overwhelming need for the triangle to be symmetric to generate PWM and this can allow you to reduce the center (average) voltage some if the resulting range is inconvenient for the comparator... but this will complicate the math a bit.

byronwatkins
Автор

So where did you find the best place for the Cap please ? so many ways to do this !...cheers.

andymouse
Автор

you could replace the first two opamps with a 555

ViniciusMiguel
Автор

WHAT NO MICRO?
LOL, fun to see how other people solve problems.
There are so many approaches for solution.
And yes I would resort to Spice first. Other engineers may disagree and that is fine.
At the very least Spice removes the base level of stupidity like getting +/- reversed etc.
But correct, it does not reveal issues of stray LCR or layout problems.
cheers dan

mrenrollment