LED light trigger from a PWM circuit

Thread Starter

CaptainDad

Joined Nov 10, 2023
16
I have a 2023 Chevy Silverado 2500HD, I want to add LED light strips above my running boards on the driver and passenger side exterior to illuminate when I lock or unlock my vehicle. I want the lights to stay on for the duration of the approach lighting which is controlled by the BCM. I am planning on using the dome light power wire as the trigger wire for a relay to turn the LED light strip on and off. I know how do crudely do this but I know that the BCM uses PWM to dim the dome light in and out which will cause relay chatter.

I can find posts elswhere with how to eliminate the relay chatter which is great but what I really want to do is to allow the PWM to also dim the exterior LED light strip that I'm adding. Is this possible without spending a ton of money or should I just be satisfied with not dimming the added on LED light strip.
 

k1ng 1337

Joined Sep 11, 2020
1,038
Use an opamp buffer and transistor to drive the external load. An opamp won't affect the PWM input signal.

The duty cycle and frequency at the high impedance input of the opamp will appear at the low impedance output. Add a power transistor to drive the LEDs.

There are more ways to do what you want but an opamp draws almost no current and allows you to set the gain if desired. You could make a high quality module for $10-20.
 

Thread Starter

CaptainDad

Joined Nov 10, 2023
16
So a lot of that is over my head but i see the schematic that you drew and can decipher the parts. I don't understand which pins of the LM358 that I should connect to. I assume that the battery connects to pin 8, the ground connects to pin 4. The PWM input connects into pin 3, do pin 1&2 both connect to R1?

And just to confirm, this will not backfeed the 12V battery power into the PWM pulse output?

Wouls I be better suited to try this with an Arduino instead?
LM358.png
 

Thread Starter

CaptainDad

Joined Nov 10, 2023
16
I was just making sure I was understanding correctly as your route sounds to be the easiest. I only mentioned the Arduino in case it was possible that somehow the voltage from the battery would backfeed to the wire from the BCM. I appreciate all of your help and the explination that you provided. It helps out alot.
 

k1ng 1337

Joined Sep 11, 2020
1,038
I was just making sure I was understanding correctly as your route sounds to be the easiest. I only mentioned the Arduino in case it was possible that somehow the voltage from the battery would backfeed to the wire from the BCM. I appreciate all of your help and the explination that you provided. It helps out alot.
The only case I can think of where a fault might occur is if the PWM signal is not referenced to 0V ground. My simulation ramps from 0-12V which may not be what your dome light is doing. In any case, an opamps inputs are protected (think of them as extremely high resistance). It will be almost impossible for the battery voltage to find its way back into the PWM signal. All this being said, it will take some investigating on your part to make sure the truck's computer isn't alien technology. I'd try a truck forum to get the details of how to figure that out. If you get ahold of the specs for your truck and your LEDs, we can help you calculate component values.
 
Last edited:

Thread Starter

CaptainDad

Joined Nov 10, 2023
16
The only case I can think of where a fault might occur is if the PWM signal is not referenced to 0V ground. My simulation ramps from 0-12V which may not be what your dome light is doing. In any case, an opamps inputs are protected (think of them as extremely high resistance). It will be almost impossible for the battery voltage to find its way back into the PWM signal. All this being said, it will take some investigating on your part to make sure the truck's computer isn't alien technology. I'd try a truck forum to get the details of how to figure that out. If you get ahold of the specs for your truck and your LEDs, we can help you calculate component values.
So I know which wire it is, I hooked up a volt meter to ground and when I unlock the truck it ramps from 0-8 volts then takes about 2 seconds give or take to go from 8-12.5 volts, the reverse is true for when it turns the lights off, about 2 seconds from 12.5-8 volts and then 8-0 volts.

I was planning on using these lights https://a.co/d/8HuQs5B on both sides of the truck which I will likely have to cut down, its a crew cab.
 

Thread Starter

CaptainDad

Joined Nov 10, 2023
16
If you get ahold of the specs for your truck and your LEDs, we can help you calculate component values.
The LEDs look to pull about 3 amps each, so 6 amps together. So I assume that I would need a transistor rated for at least 8 Amps to be safe, is my thinking correct?
 

Thread Starter

CaptainDad

Joined Nov 10, 2023
16
I couldn't find a datasheet for those LEDs which is always suspect. The PWM signal sounds normal. Where did you measure the voltage at? The dome light itself or from the computer?
At the connector at the BCM.


Also, do you know how to generate a PWM signal for testing?
I do not.

Thanks for the detailed schematic. I really appreciate it as I could not have done it myself...or at least not this decade.
 

k1ng 1337

Joined Sep 11, 2020
1,038
Here is an analog PWM generator using a 555 timer which if supplied by 12V will output 0-12V. This works by generating a square wave. Wherever the potentiometer is set defines the pulse width or duty cycle. 50% at the pot will be 50% duty and therefore 6V at the output. 25% will be 3V and so on.

The 555 circuit is a true PWM signal generator but you can use a bench power supply as well. By increasing 0-12V at the non-inverting input you can see how bright the LEDs get.

pulse-generator.gif
 
Last edited:

Thread Starter

CaptainDad

Joined Nov 10, 2023
16
If you apply 12V to the strip then measure the voltage drop across a resistor, Ohm's law predicts the power dissipation of the whole strip.
I’m lost with what you want me to do, are you saying to measure one of the resistors in the light strip or to add a resistor? I’m sorry for the basic questions I know enough to be dangerous, LOL.
 

k1ng 1337

Joined Sep 11, 2020
1,038
If there is a single LED and resistor in series, the voltage across the LED will be:

Forward voltage (LED) = 12V - Voltage Drop (Resistor)

Then divide the voltage drop at the resistor by the resistance value to find the current through each LED.

? A = Voltage Drop (Resistor) / Resistance

Assuming each segment has a single LED and resistor in series, you simply multiply the previous value by the number of segments you have.

You already told me your current requirements but this information allows you to calculate how many LEDs (total current) you can add before you need to upgrade the MOSFET. Here's how I calculated the size MOSFET you need starting with a 6A load.

With a 12V gate signal and a current of 6A flowing, the MOSFET resistance is ~0.025ohm. To find the power dissipated by the MOSFET:

? Power Dissipated = 0.025ohm * 6A^2 = 0.9W

The maximum device temperature given in the datasheet is 175C. To find the temperature at 1.26W:

? Operating Temperature = Power Dissipated * Junction to Ambient Thermal Resistance

0.9 W * 62 C / W = 56C

Therefore, the MOSFET will get warm to the touch but is within spec. Adding a heatsink will help. If it feels burning hot or starts to smell strongly then something is wrong.
 
Last edited:

k1ng 1337

Joined Sep 11, 2020
1,038
Not unless your meter has that functionality. I'll test this circuit on the breadboard later with a frequency generator.

Untitled.png

Edit: I deleted some of my previous posts to keep things brief. I can go over how each component contributes to the circuit.
 
Last edited:

Thread Starter

CaptainDad

Joined Nov 10, 2023
16
Sorry I’ve been busy with the holiday and work. Did you have a chance to test this? I’m just wanting to buy the parts to make it and wanted to wait until you gave me the go-ahead.

Also, since some of these components are chips I assume I need to put them on a breadboard I know that I can buy it and do it myself but I’m thinking of scaling this for more than my truck in my company so I’d like to see if I can get boards made so I can essentially solder in the components and wiring to make them more plug and play for my co workers. Any suggestions?
 
Last edited:

eetech00

Joined Jun 8, 2013
4,704
you can probably just use a peak detector (a diode,cap,resistor, and mosfet).
The pwm signal charges the cap above the gate threshold of the mosfet, turning it on until the pwm signal stops.
 
Top