How to trigger a relay when the signal voltage slowly rises from 0v to 12v?

Thread Starter

jayendra

Joined Dec 20, 2021
8
Hi all,
My requirement is to connect an additional light in parallel to my car's interior cabin light. My car supports upto 10w and I already have a 2W LED bulb inside, and the additional light is about 25W, so connecting it directly is not an option.

So I connected a 12v relay with the signal port connected to the interior cabin light. However when I turn on the cabin light, my car is designed to slowly increase the brightness by increasing the voltage slowly from 0v to 12v. So during these few seconds, the relay continuously closes and opens, making a noise and flickering the relay output.

So requesting help and a solution to this problem
 

Tonyr1084

Joined Sep 24, 2015
6,861
Welcome to AAC.

I don't know this for a fact, but I suspect the light growing from dim to bright is done via a Pulse Width Modulation (PWM) source. It's a common way of controlling the brightness of lamps, LED's included. Likely the chattering you're hearing is the relay getting full voltage for a moment, then losing it, as that's how PWM operates.

PWM operates (basically) as an average output device. For 10% of the duty cycle power is on and for 90% of the cycle power is off. This results in an average output of 10%. In the case of an ever increasing brightness, that 10% slowly increases to 100%, where the lamp is fully lit. And when power is shut off, it degrades from 100% back down to 0%. If your relay is chattering, and again, this I don't know for a fact, adding a capacitor across the relay control coil might help. And no, I can't give you a good value. But I can tell you this: It MUST be rated for voltages higher than your cars electrical system will see. It's normal for your car to potentially see up to 15 volts, so a capacitor rated for 133% or higher would be recommended. Anywhere from 133% to 200% (twice the voltage). If you find a capacitor that is rated for 35 volts - that would be absolutely no problem to use. But there's no sense in going crazy with the voltage. Still, even 50 volts wouldn't be a problem. As for the value? Maybe 4.7µF. But again - this I don't know. A large cap will have a heavy draw on the power source at startup. So going with a big cap might hurt your light controller. Start with a 0.1µF cap. Its inrush current will be so short that it shouldn't be a problem. However, it might be too small to provide the desired result of limiting the chatter.

Relays like to have their rated operating voltage. They typically will pull in at about 70% of their control voltage and hold as low as 35% of their voltage before dropping out. But that vary's with every different relay type. You Could opt for an electronic means of controlling the lights by using an opto-isolator circuit; one that will act like an LED of very low current, thus not harming your lamp control circuit, and its output can then either drive a relay or a MOSFET to provide power to the additional light. 25 watts at 13.8 volts (common operating voltage of a vehicle) is going to be under 2 amps. A MOSFET that can handle that would work nicely. And it works fast enough that it might even allow the new light do dim to bright and bright to dim just like the rest of the circuit does.

I'm sure others here will have more information for you. Again, welcome.
 

Tonyr1084

Joined Sep 24, 2015
6,861
Wouldn't that turn it on briefly then turn it off when it should be at full brightness? I'm not asking for me, I'm asking for the TS. Hence, not hijacking the thread.

IF the light control circuit is PWM - then an N type MOSFET as a follower should be able to control the secondary light. Shouldn't be a need for a comparator.
 

Tonyr1084

Joined Sep 24, 2015
6,861
The light controller circuit controls the OEM Dome Light (OEM = Original Equipment Manufacture). The addition of another 12 volt light likely already has current limiting circuitry inside it, so an N type MOSFET pulling the additional light to ground to turn it on would make sense to me. And as (but if) the PWM increases the brightness over a period of 2 or 3 seconds then the MOSFET will do the same for the additional light. At least that's what I'm envisioning. Correct me if I'm wrong.
1640000197013.png
 

peterdeco

Joined Oct 8, 2019
461
On your schematic above, assuming the controller is a PWM and assuming positive pulses are turning on the dome light, I would add a series diode to the gate and a cap plus high value resistor from gate to source. The positive pulse would turn on the mosfet, the diode preventing the negative pulse from turning it right back off. The cap charge would keep the mosfet on during the absence of a pulse for a continuous glow. Adjust the resistor/cap values for the secondary light to shut off in a short time.
 

Tonyr1084

Joined Sep 24, 2015
6,861
We have to assume a lot of things here. The last PWM light control circuit I messed with came out of a 1987 Toyota Celica. It was a source follower (to ground) type. We don't know what type of PWM - or even IF it's PWM - the TS is working with. It, too, could be PWM follower, meaning the light has power all the time and is only lit when the ground is present via PWM or by opening a door - or however the vehicle is set up. My circuit could be completely wrong. Remember, we're only assuming what sort of control this is.

BTW: MY PWM was both positive going and negative going. Hence, no need for a cap, resistor or diode. And IF (and that's a BIG IF) IF the PWM is supposed to be at 100% duty cycle during the time the light is supposed to be on then there would be no need for any additional circuitry. Even if the PWM is pulling the lights to ground.
 

Thread Starter

jayendra

Joined Dec 20, 2021
8
Firstly, Thank you all for the very quick responses.


I don't know this for a fact, but I suspect the light growing from dim to bright is done via a Pulse Width Modulation (PWM) source. It's a common way of controlling the brightness of lamps, LED's included. Likely the chattering you're hearing is the relay getting full voltage for a moment, then losing it, as that's how PWM operates.
I never thought about this, but now I know it definitely uses PWM. The oem bulbs were Halogen and when I changed to LED, there is slight flickering during the dimming duration, caused by the same PWM reason. I will try out the simple method you suggested.





On your schematic above, assuming the controller is a PWM and assuming positive pulses are turning on the dome light, I would add a series diode to the gate and a cap plus high value resistor from gate to source. The positive pulse would turn on the mosfet, the diode preventing the negative pulse from turning it right back off. The cap charge would keep the mosfet on during the absence of a pulse for a continuous glow. Adjust the resistor/cap values for the secondary light to shut off in a short time.
The Dome light has a constant positive 12V source and the dimming is controlled through the negative going to the lights. Any suggestions for this change?




meaning the light has power all the time and is only lit when the ground is present via PWM or by opening a door
Yes, this is how it is setup in my car. Positive power is on all the time and light turns on though Ground control only, when the door is opened. Based on the other responses and behavior of the LED bulb, I can say that it does use a ground controlled PWM for the dimming. So does your existing circuit work for this too?




Here's a solution.

1.png

Nandu.
Thank you for sharing this circuit. However as said above, the cabin light has constant positive supply and the dimmer sends PWM signals through ground when the door is opened. So it would be great if you could help me with the circuit for this setup. Thanks in advance
 

MisterBill2

Joined Jan 23, 2018
11,556
A simpler approach will be to add a capacitor across the relay coil and a series diode between the dimmed lighting circuit and the relay + capacitor. Then the voltage will rise as the duty cycle increases, but not be pulsating at the relay coil. That will provide a solid engagement and dropout. The capacitor should be rated at least 25 volts and the diode rated one amp and 50 volts, (such as a 1N4000 or 1N4001). A higher voltage diode is OK if tat is what is available.
 

Thread Starter

jayendra

Joined Dec 20, 2021
8
A simpler approach will be to add a capacitor across the relay coil and a series diode between the dimmed lighting circuit and the relay + capacitor. Then the voltage will rise as the duty cycle increases, but not be pulsating at the relay coil. That will provide a solid engagement and dropout. The capacitor should be rated at least 25 volts and the diode rated one amp and 50 volts, (such as a 1N4000 or 1N4001). A higher voltage diode is OK if tat is what is available.
Thanks for this very simple approach to try out. Just a couple of questions:
1. I already have some 6A4 diodes lying around, can I use them?
2. For the capacitor part, I am clueless on the capacitance value. Considering I chose 25v or 36v, what capacitance should I take?
 

ElectricSpidey

Joined Dec 2, 2017
2,140
I would ditch the relay and use the existing PWM to drive a transistor and use that to drive the new lamp.

That way the new lamp will ramp up with the existing lamp.

As per Tony's suggestion in post #5, but with some circuit modification.

But, this assumes the new lamp is PWM dimmable.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
11,556
Thanks for this very simple approach to try out. Just a couple of questions:
1. I already have some 6A4 diodes lying around, can I use them?
2. For the capacitor part, I am clueless on the capacitance value. Considering I chose 25v or 36v, what capacitance should I take?
For the capacitor, any value from 47 MFD up to 470 will be useful. Below 47 MFD may allow some relay chatter. I am thinking of the standard black automotive cube relay with a coil rated for constant duty, not intermittent horn duty. I am not familiar with 6A4 diodes, not sure what they are normally used for. But this application is not very demanding. If others are familiar with the ratings of a 6A4 diode a comment would be useful here. The diode needs to be rated for twice the relay coil current, 500mA should be OK, and at least 25 volts. There will be no relay inductive spike with the capacitor connected across the relay coil, so the max battery system voltage is all it would ever see.
 

ElectricSpidey

Joined Dec 2, 2017
2,140
I have a lot of experience with PWM drivers and some of them don't like capacitors on their output.

I'm not saying that this particular one won't like it...but why take the chance?
 

Thread Starter

jayendra

Joined Dec 20, 2021
8
For the capacitor, any value from 47 MFD up to 470 will be useful. Below 47 MFD may allow some relay chatter. I am thinking of the standard black automotive cube relay with a coil rated for constant duty, not intermittent horn duty. I am not familiar with 6A4 diodes, not sure what they are normally used for. But this application is not very demanding. If others are familiar with the ratings of a 6A4 diode a comment would be useful here. The diode needs to be rated for twice the relay coil current, 500mA should be OK, and at least 25 volts. There will be no relay inductive spike with the capacitor connected across the relay coil, so the max battery system voltage is all it would ever see.
Okay. I am attaching the specifications of the 6A4 Diode below. It definitely has much higher rating than required, hope this doesn't cause any issue by being too high.
1640016488723.png


I would ditch the relay and use the existing PWM to drive a transistor and use that to drive the new lamp.

That way the new lamp will ramp up with the existing lamp.

As per Tony's suggestion in post #5, but with some circuit modification
Will you or someone be able to help me with the circuit in that case?
 

Thread Starter

jayendra

Joined Dec 20, 2021
8
I have a lot of experience with PWM drivers and some of them don't like capacitors on their output.

I'm not saying that this particular one won't like it...but why take the chance?
Is it safe if I use a diode in between the PWM and Relay terminals? The capacitor discharge should not cause any reverse flow of current in this case. Will I be risking something?
 

Tonyr1084

Joined Sep 24, 2015
6,861
adding a capacitor across the relay control coil might help.
A simpler approach will be to add a capacitor across the relay coil
Already suggested. Post #2. Or am I ignored and you didn't see my comment?
I have a lot of experience with PWM drivers and some of them don't like capacitors on their output.
I'm not saying that this particular one won't like it...but why take the chance?
Yeah, I worry about that as well. And like the other suggestions, a transistor or MOSFET will work better than a relay. After having shaken off some dust from my brain, the PWM and semi-conductor is the way to go. Forget the relay.
 

Thread Starter

jayendra

Joined Dec 20, 2021
8
Appreciate your suggestions towards going with the MOSFET or transistor. However I am totally new to this side, and just doing my engineering now. So I would greatly appreciate if someone could help with designing the circuit, as simple as possible.
TIA
 
Top