# Voltage controlled voltage regulator?

I have a voltage that's used to dim a 12V bulb and I'd like to use it to dim an LED instead. My plan so far is to use a triangle generator and a comparator to make a PWM signal with varying duty cycle.

I'd like to build everything into a PCB that replaces the bulb, so there wouldn't be a fixed voltage available but a varying voltage from 9V-11.5V, so the circuit needs to operate from that. All is going well, but I need to alter the signal used by the comparator so that it has a steeper slope.

In the circuit I've split the voltage into two sources in order to make it all work, and it looks like what I need would be have a steeper slope. The green line is the 9V-11.5V, and the purple line is what I need to convert it to for comparison with the triangle.

Is there a simple circuit that can do something like that? Maybe something using an adjustable voltage regulator?

Thanks!

• With LED's you want a current regulator, not a voltage regulator. – Harry Svensson Jan 12 at 20:47
• No need to worry about driving the leds, I'll handle that downstream. The problem at hand is really how to create a 0-100% duty cycle PWM signal based on a 9V-11.5V signal. That's what the circuit posted will do if I can get the reference voltage for the comparator sorted out. – mojozoom Jan 12 at 21:32
• Your triangle wave (not sawtooth) mean-voltage drifts with the supply rail. (You also don't have any hysteresis and you probably should have enough to handle expected noise levels.) One implication for your varying light bulb voltage could be that there might be a potentiometer involved (other possibilities exist, of course.) You could just arrange a circuit with a reference to produce $1.8\cdot \left(V-7\frac13\right)$. But without more information it's hard to know if that's helpful. – jonk Jan 12 at 23:45
• My bad, yes that is a triangle isnt it. But you're right, what I need is a circuit to provide a voltage function exactly as you indicated. Would you be able to point me toward something like that? – mojozoom Jan 13 at 0:45
• Would regulating the supply voltage to the triangle generator be helpful here? – ThreePhaseEel Jan 13 at 14:49