Please Help ! Looking for a circuit to control relay 12V or 6V DC from RPM (PMW) signal.

Thread Starter

taimurkhantk

Joined Mar 15, 2017
1
Hi I have been looking every where to find a circuit or a device that I can use to convert digital signal like PMW to a constant power.

Brief History:

So I am an automotive technician and I do know some basic electrical stuff. not like circuit making but I am good in automotive. so I just did an transmission swap and the new transmission needs a 12V power to lock or unlock the reverse lockout solenoid. Now there are a couple modules available online but are all for 2 wire pulse sensors. I have a 3 wire hall effect sensor on my transmission. 1- 5V ,2-Signal (PMW) ,3-Ground.

Now I need a circuit that would convert the PMW signal that I get when the car moves to a constant power and when the vehicle stops it stops producing power. i cant have anything interrupting the pmw signal because that will effect the speedo. I have both 6V and 12V relays if that helps.

Honestly i would really appreciate any help that i could get from any one.

Thank you in advance.
 

LesJones

Joined Jan 8, 2017
4,190
Are you trying a circuit to convert the duty cycle of the PWM signal to an analogue voltage that is not effected by the frequency of the PWM signal. (As the same singnal also drives the speedometer it's frequency must change as this is what the speedometer will measure.) What is the amplitude of the signal from the hall sensor ?
One of the two wire units should work providing one of the wires can be connected to ground and the signal level is the same and it's input impedance is high enough not to load the signal. Posting the specification of these units may help in providing answers

Les.
 
Last edited:

Sitara

Joined May 2, 2014
57
Hi,
From reading your circuit description it appears that you are looking to switch on the relay whenever the pwm signal is present (regardless of its duty cycle) and switch off the relay when the pwm signal is absent. You have not specified either the pwm frequency or the relay characteristics (holding current and resistance). Nonetheless, if my understanding of your needs is generally correct then the circuit shown in the screendump below may help:

upload_2017-3-15_20-52-41.png

I am assuming that the pwm frequency is 20 KHz, and that the relay is a 12v automotive relay with a holding current of 100mA and a resistance of 100 ohms. The circuit comprises a CD4093 CMOS quad Schmitt NAND ic and a couple of transistors. All the components used in this circuit should be easily available worldwide.
Circuit operation is as follows:
R1, C1, D1 and the CD4093 together make up a pulse stretcher. This converts the pwm input into NAND gate U1 (regardless of its duty cycle) into a 20 KHz square wave output with around 95% duty cycle. The integrator made up of R2 & C3 converts this into a steady, continuous DC voltage. The emitter follower Q1 buffers this voltage and feeds the relay driver Q2. Diode D2 dissipates the back EMF spikes produced when the relay switches off.
When the PWM input signal is turned off, the output from the pulse stretcher also drops down to zero volts, turning off the relay. The key design equation for this circuit is the design of the pulse stretcher (which I lifted from the Fairchild/ONSemi app note AN140):
https://www.fairchildsemi.com/application-notes/AN/AN-140.pdf

Page 9 of the app note describes the details of the stretcher. The essential points for your application are the pwm frequency and the circuit power supply voltage. I am assuming this voltage is +12V. At this voltage the +ive Threshold voltage (Vth+) of the 4093 Schmitt trigger is +5.5V (derived from from the CD4093 datasheet), V_BE = 0.6V so the equation which relates the stretched pulse time interval T to my circuit's R1 & C1 boils down to T = R1 x C1 x Ln(1.753846) = 0.562 x R1 x C1. Always choose this time to be greater than the inter-pulse time of your pwm frequency (that is T >> (1/F) where F is the pwm frequency). In my particular case, pwm frequency = 20000 Hz so interpulse time = 50 microseconds. My R1, C1 are 180k & 1n giving T= 0.562 x 180,000 x 1e-009 = 101 microseconds, ie twice the interpulse time. You also need to ensure that the inverter output can sink the current from R1 & C1 (keep C1 = 1n and adjust R1 to match your pwm frequency and it should be okay). Good luck!
Edit: Instead of a pulse stretcher you can also use a monostable (easily implemented using the NE555 & its clones or the CD4098). Again, the on-time of the monostable should exceed the interpulse time interval in your application
upload_2017-3-15_20-52-41.png
 
Last edited:
Top