Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PWM replacement for car lighting dimmer

The original spec lamps for these cars are no longer available. Modern lamps of the same from factor have higher power output, which means they are brighter (yay!) but get hot enough to melt the plastic trim (doh!). I have been running LEDs for years in my one car without the dimmer. But I thought it would be nice to have the dimmer working with either LED or incandescent. High-side switching is my only option, however.
 
PlaneCrazy
I assume you're in the U.S.?

Let me know if you need help..

I have a small circuit that can limit current on surges and 2000Hz PWM high-side switch your Lamps.

You won't hear any noise as the PWM isn't driving inductive loads (motors).
 
Well, here is the circuit, possibly in its final form. I hope I have addressed EMI, overvoltage and overcurrent protection. Power is estimated @0.5W @35kHz with a 20W load, so a total of 20.5W max. PWM duty cycle between 5% and 95%

1754974620554.png
 
The op-amp won't work with a capacitor in series with the ground lead.

I can't see what the op-amp is supposed to do. If you are trying to sense current with it, you need a connection to both sides of the sense resistor, and a 741 is not a good choice of op-amp as it won't sense voltages near the power rails.

You need a resistor to limit the base current in Q1
 
A quick further comment, where's the current limiting resistor for the LED, and what's with D4?, wrong way round?, and connected to the wrong place?. Also adding some hysteresis around the comparator, a decent opamp, and wiring it properly,would be good ideas (it's not currently monitoring R-SENSE). There's also no power supply decoupling, and no protection against high voltage supply spikes etc. which are normal in cars.
 
The intent was to protect the circuit against overcurrent as well as load dump. I tried simulating with a LM358 op-amp, but my copy of Proteus doesn't seem to support that, hence the 741. As far as I understand (which I don't really), op-amp input+ should be between the voltage divider RA and RB, with input- measuring upstream of R_SENSE and going to ground via a hysterises capacitor. It feels strange to me to connect a pin to both a non-zero voltage and to ground, but then a capacitor will assume some non-zero voltage in a DC application as well, right?

You're right about D4, I will turn that around. Keep the suggestions coming, I appreciate the help.

1754987019237.png
 

Attachments

  • 1754987004944.png
    1754987004944.png
    66 KB · Views: 7
Last edited:
The op-amp won't work as an overcurrent detector, for several reason.
1) There is no resistor on the output to limit the current
2) A 741 wont work with input voltages near the supply rails
3) The voltage being sensed will be affected by the load voltage as well as the voltage across the sense resistor.
 
Q3 is upside down as well, collector and emitter are swapped!. The emitter resistors are also far too high at 10K, and not really needed at all.

In fact the whole drive stage is wrong, and won't work - I'm on holiday in Scotland at the moment, otherwise I'd post the driver circuit I use - I'll do it when I get back.

The whole point of the driver is to switch the FET ON and OFF as quickly as possible, which your circuit won't do - there's not even any base bias for Q2, D3 and D4 aren't needed, nor are the four resistors.

Where your Q1 is I use a 2N7000 FET, then there's two resistors in series to the power supply from the drain, and the two driver bases connect directly to the mid point of those two resistors - values in the hundreds of ohms, and the ratio depending on the supply voltage. I use the same circuit with 24V and 12V inputs, and it just needs the resistor ratio tweaking. This is in switch-mode PSU/Charger designs, but the exact same reasons apply.
 
You've still got no base bias for Q2, and Q3 is still upside down. I've managed to access my driver via FTP, here it is. This is the 12V version, for the higher voltage version I increased R50 to 680 ohms, so as not to over drive the FET. I compared it with various specialised FET driver IC's, and it worked just as well. Obviously, you don't need D6, C16 or L1.

BTW, Q7 should have been a BC327, to match the BC337 - but at the time it was out of stock, so I used a BC557 instead - which has worked perfectly, with 100% reliability, so I've never bothered switching it back,

FET_Driver.png
 
I would personally go for a PWM frequency of 5-10kHz and just use a BJT inverter to drive the PMOS. A gate driver circuit for low power LED dimming seems excessive to me. PC fans generally use 25kHz because they have coils in them and you would actually hear the PWM frequency if were lower. This is not the case with LEDs so all you need is to make sure the frequency is high enough that there will be no visible flicker when in motion. Depending on the current draw of the LEDs, my first choice would probably be a sziklai pair made from a TIP32C and any small signal NPN as it would run better at higher frequencies without needing any external circuitry. Shown below is a BJT inverter driving a PMOS which works fine at lower frequencies and is very simple to implement.

1755024532401.png
 
Back
Top