# How to replace bulb with LED in a PWM circuit (car)

acdcledopen-collectorpwm

I want to replace a light bulb in a Peugeot 308 SW with a LED. The bulb works (lights) normally, but the LED blinks. I thought they are controlling the bulb in alternative current but my digital voltmeter shows 9V on DC scale.

And no. It is not a blinking LED (I also thought it was). I have tried it with a battery and works perfectly. The blink must come from the dimming system – yes, the car dims the lights instead of suddenly turning them off.

I have tried also to use a diode and a capacitor to convert from AC to DC but it is not working. Maybe they are suing an open collector circuit?

My guess is that they control the bulb in DC pulses (PWM), and the circuit is an open collector.

It sounds like the system is using PWM dimming at a slow rate (1Hz, 50:50 duty cycle, and that this is fast enough that the decay in an incandescent bulb is not very noticeable (thermal time constants are long). If the car has a 12V electrical system, then the fact you measure 9V at this bulb is odd... Perhaps the ratio is 75:25?

You could try adding a (large) capacitor in parallel with the LED to create a lowpass filter with the R. The problem is that when the supply is off, all the LED current must be sourced by the capacitor. This will require a big capacitor. From a quick LTSPICE simulation, to bias a 2V LED 20mA average current from a 75:25 duty cycle 12V supply, this takes a 330 ohm series resistor and a shunt capacitor on the order of 100,000uF (in parallel with the LED). It's a little better with a blocking diode in series with the resistor, but not much. There is still a variation in the LED current of about 20%.

Perhaps you can trace this back and figure out what is providing the PWM to the light bulb and run the LED circuit from 12V with something else switching it on. For example, with a few transistors, you can build a nearly constant current source for the LED and turn it on with the PWM'd signal filtered with a series R and smaller C. I can post a diagram of this approach if you are interested.

Here's the circuit with no added capacitor, a 12V supply switched at 75% duty cycle, and about 20mA through a Vf=2V LED with R=360 ohm. The LED current just shuts off when the supply is off.

With a 100,000uF cap you can still see droop in the current, but the average is better. This would probably still have noticeable dimming. Note the current scale is different. Partly the current drops here because the LED is effectively regulating the voltage on vled when the supply is on. So the current drops rapidly when the supply is off.

Based on that observation, you really want an RC filter first and then the LED and its series resistor. This has much less ripple, and the cap can be a little smaller. Here it's 33,000uF.