HELP: switching 12V car relay with flattened PWM

Thread Starter

noyeco7251

Joined Mar 29, 2022
9
Hey guys,

I need to switch 12V car relay with PWM signal. The circuit should switch the relay ON when there is PWM signal available (PWM (amplitude 12V) in wire -> relay ON, NO PWM -> relay OFF). Can you help me and send such circuit scheme? It’d help a lot.

(My idea: To flatten PWM with capacitor and connect it to MOSFET switching the relay. And since MOSFET doesn’t drain current, the Vgs voltage would be stable 12V, if PWM was available. Otherwise capacitor would be discharged through pull-down resistor and MOSFET switched OFF)
 

Alec_t

Joined Sep 17, 2013
14,280
Welcome to AAC!
Your idea should be workable. What is the PWM frequency?
Depending on the load to be driven, perhaps you could even use the MOSFET to switch the load directly instead of via the relay.
 

Thread Starter

noyeco7251

Joined Mar 29, 2022
9
Thank you guys for the response!

Alec_t - It’s PWM provided by the car unit and it is hard for me to measure the frequency. I thought about using MOSFET directly to switch the load, but I need to have it „bulky” so going with a relay is better option for me.

DickCappels - That’s exactly what I’ve had in my mind! Can I use the exact scheme?
 

DickCappels

Joined Aug 21, 2008
10,152
(some text removed for clarity)
DickCappels - That’s exactly what I’ve had in my mind! Can I use the exact scheme?
Yes you can, just choose a MOSFET and a relay. The MOSFET should be able to supply sufficient current to the relay when the gate-to-source voltage is about six volts.
 

Thread Starter

noyeco7251

Joined Mar 29, 2022
9
Sorry for bothering again, but is there a circuit to do it with normal transistor? Let’s say I don’t have any FET on hand at the moment.
 

crutschow

Joined Mar 14, 2008
34,285
Below is the LTspice simulation of a circuit using two BJT transistors in a Darlington configuration to lower the required input current (which could also be one Darlington type transistor):
The relay coil current (yellow trace) flows when the PWM signal (green trace) is applied.
The PWM signal is arbitrarily set to 1kHz.

1648571261602.png
 

Thread Starter

noyeco7251

Joined Mar 29, 2022
9
Hey guys, I didn’t have a 1uF capacitor so I used 2,2uF, but now, even though the circuit switches itself ON, it doesn’t turn off after switching OFF the PWM. Do you have any ideas what is causing it? Thanks!
 

shortbus

Joined Sep 30, 2009
10,045
Do you have any ideas what is causing it?
Where is this PWM coming from in your car? If it is from the ECU or one of the other car computers it probably isn't really 12V but 5V to start with. Very few PWM or other outputs from car computers are at 12V like the battery is.
 
Top