Blinkers as positioning lights, circuit fails on high(er) load.

Thread Starter

crookedspoon

Joined Dec 30, 2020
9
Hi all,

First post here and very much beginner in electronics, trying to dive in.
For my motorcycle, I’m trying to implement positioning lights in the blinkers: When turning on the blinkers, the blinker blinks regularly. When the blinkers is turned off, after a short delay, the blinkers shine dimmed.

Below is the setup I have now; this setup is for either the front or the back of the bike, I’ll eventually need 2 of these. This works fine if I attach 2 LED blinkers (draw about 0.15A each at 14V). For testing, power comes from a 4S 18650 pack for approx 13.5 to 16.5 volts.

R1 and R2 form a voltage divider to feed the Attiny with a suitable voltage
R3 is read by Attiny to set amount of dimming
Attinys code handles debouncing, turning off all functionality when the regular blinker functionality is detected and uses one PWM to control the dimming (as defined by R3) for the positioning-lights functionality. The PWM signal is fed into the MIC5014 (mosfet driver) to control the IRLZ44N in a high-side configuration.

datasheets:
MIC5014 IRLZ44N ATTiny85
circuit-3.png


Questions:

  1. Using automotive LEDs, this all works fine. When I attach 2 (or even 1) regular incandescent bulb (21W, 1.5A) instead of the LEDs something goes wrong and the whole circuit turns off. It seems the BMS of the battery kicks in since the measured voltage at the battery is only between 1 and 2 volts. I’d assume the IRLZ44N would easily handle the 1.5A drawn by a single bulb.
    Any insights why the circuit shuts down with a larger load?
  2. any feedback how to optimize, minimize or secure this setup?

    Thank you!
 

Irving

Joined Jan 30, 2016
2,058
How much current do the LEDs draw?

While the use of the gate driver to use an N-channel MOSFET as a high-side switch is interesting, I suspect thats potentially related to your problem. A P-channel MOSFET would be a more convential solution. Having said that, there's a good chance the battery pack internal protection is playing a role too. What happens if you connect the incandescant bulbs on their own directly to the battery pack? Does it shut down then?

BTW your capacitors are upside down if they're electrolytics...
 

merdobeyz

Joined Apr 21, 2021
4
Hi all,

First post here and very much beginner in electronics, trying to dive in.
For my motorcycle, I’m trying to implement positioning lights in the blinkers: When turning on the blinkers, the blinker blinks regularly. When the blinkers is turned off, after a short delay, the blinkers shine dimmed.

Below is the setup I have now; this setup is for either the front or the back of the bike, I’ll eventually need 2 of these. This works fine if I attach 2 LED blinkers (draw about 0.15A each at 14V). For testing, power comes from a 4S 18650 pack for approx 13.5 to 16.5 volts.

R1 and R2 form a voltage divider to feed the Attiny with a suitable voltage
R3 is read by Attiny to set amount of dimming
Attinys code handles debouncing, turning off all functionality when the regular blinker functionality is detected and uses one PWM to control the dimming (as defined by R3) for the positioning-lights functionality. The PWM signal is fed into the MIC5014 (mosfet driver) to control the IRLZ44N in a high-side configuration.

datasheets:
MIC5014 IRLZ44N ATTiny85
View attachment 236193


Questions:

  1. Using automotive LEDs, this all works fine. When I attach 2 (or even 1) regular incandescent bulb (21W, 1.5A) instead of the LEDs something goes wrong and the whole circuit turns off. It seems the BMS of the battery kicks in since the measured voltage at the battery is only between 1 and 2 volts. I’d assume the IRLZ44N would easily handle the 1.5A drawn by a single bulb.
    Any insights why the circuit shuts down with a larger load?
  2. any feedback how to optimize, minimize or secure this setup? (1)

    Thank you!
Can you tell me how much current the LEDs draw?
 

Thread Starter

crookedspoon

Joined Dec 30, 2020
9
How much current do the LEDs draw?

While the use of the gate driver to use an N-channel MOSFET as a high-side switch is interesting, I suspect thats potentially related to your problem. A P-channel MOSFET would be a more convential solution. Having said that, there's a good chance the battery pack internal protection is playing a role too. What happens if you connect the incandescant bulbs on their own directly to the battery pack? Does it shut down then?
Thanks for your feedback @Irving. The LEDs are about 0.15A each, incandescent about 1.5A each. Battery pack is actually 4S2P, so easily handles the 3 amps of 2 incandescent bulbs - tested by connecting them directly.
As for the P-channel Mosfets, as far as I understood and learned here, there might be quite some heat build-up when dealing with up to 3 amps. Since all of this is going into a metal headlight, fully exposed to sunlight - I was reluctant to add even more heat there.


BTW your capacitors are upside down if they're electrolytics...
Thanks, good catch! They're not electrolytics -it's the other kind! (dielectric?)
 

Irving

Joined Jan 30, 2016
2,058
Your battery is not charged or it is an old or fake one.
The TS already said that the batteries power the bulbs OK when directly connected , so not sure how you can make that assertion.

@crookedspoon Your link doesn't work so I can't see what was said, but for only 3A P-channel would be fine. The issues with P-channel geometry only kick in at much higher currents. See here
 
Last edited:

Audioguru again

Joined Oct 21, 2019
3,505
The TS already said that the batteries power the bulbs OK when directly connected , so not sure how you can make that assertion.
Sure, the two incandescent bulbs work fine without the Mosfet circuit.
He said, "the measured voltage at the battery is only between 1 and 2 volts." He did not measure the BMS, instead he measured a dead battery. Maybe the Mosfet is connected wrong and shorts the battery?
 

AnalogKid

Joined Aug 1, 2013
9,351
Incandescent bulbs have a large inductive component, and there is no flyback protection anywhere in the circuit. Light bulb noise could be causing the erratic behavior.

AND << I can't believe I'm saying this >> regulator IC1, attiny, and MIC5014 can be replaced by one 555 (and changing Q1 to a p-channel FET).

Two options for a 555 circuit:

a) dimming adjustment range: 5% to 50%

b) dimming adjustment range: 5% to 95%

ak
 

Thread Starter

crookedspoon

Joined Dec 30, 2020
9
@crookedspoon Your link doesn't work so I can't see what was said, but for only 3A P-channel would be fine. The issues with P-channel geometry only kick in at much higher currents. See here
Thanks @Irving! This is the link I was referring to:
I checked some tutorials but I honestly didn't figure out what to do with the gate of the P-Channel Mosfet. I'd need another transistor to drive the P-Channel? Then I might as well bootstrap an N-Channel again.
But yeah, I can give the P-Channel another try. I have a few NDP6020P (https://www.onsemi.com/pdf/datasheet/ndp6020p-d.pdf) lying around. Any good for this? Recommendations on how to control the gate?

Thanks again!
 

Thread Starter

crookedspoon

Joined Dec 30, 2020
9
Sure, the two incandescent bulbs work fine without the Mosfet circuit.
He said, "the measured voltage at the battery is only between 1 and 2 volts." He did not measure the BMS, instead he measured a dead battery. Maybe the Mosfet is connected wrong and shorts the battery?
Thanks @Audioguru again! I tried two different known-good batteries. How can I know the Mosfet is connected wrong? Is the schedule above right? The top connector is the Drain, left is Gate and bottom is Source - This transfers to the physical mosfet: left is Gate, middle is Drain, right is Source.

thanks!
 

Thread Starter

crookedspoon

Joined Dec 30, 2020
9
Incandescent bulbs have a large inductive component, and there is no flyback protection anywhere in the circuit. Light bulb noise could be causing the erratic behavior.

AND << I can't believe I'm saying this >> regulator IC1, attiny, and MIC5014 can be replaced by one 555 (and changing Q1 to a p-channel FET).

Two options for a 555 circuit:

a) dimming adjustment range: 5% to 50%

b) dimming adjustment range: 5% to 95%
Thanks @AnalogKid. That's interesting feedback! In the sketch attached, I added a Flyback diode in the right bottom corner. Would that be the right way to go about it?

Sounds great with the 555. Less is more! Any insights how you would set that circuit up?
circuit-4.png
 

shortbus

Joined Sep 30, 2009
8,797

Thread Starter

crookedspoon

Joined Dec 30, 2020
9
Strange way of making a "flyback diode" in a circuit. They normally go to the supply not ground.
https://en.wikipedia.org/wiki/Flyback_diode
mmm... The Flyback diode goes from the negative side of the load to the positive side of the load? That's what this is doing, no? I could position the diode somewhere else - see circuit attached, but flyback1 and flyback2 (as in the attached circuit) do the same thing, no?
 

Attachments

AnalogKid

Joined Aug 1, 2013
9,351
Strange way of making a "flyback diode" in a circuit. They normally go to the supply not ground.https://en.wikipedia.org/wiki/Flyback_diode
Only because "normally" the load is tied to V+ and switched to GND. This is shown in the first image on the Wiki page. BUT, under "Operation", Figure 3 shown a high-side switch and the diode anode grounded. This works because when a high-side switch opens, the inductive kick is negative-going. The voltage polarity of the kick always is opposite of the voltage polarity of the switch.

The post #12 schematic is correct.

The "normal" case is normal because n-channel FETs and NPN transistors cost less and work better than their p- equivalents, going back to when the performance and cost differences were large enough to matter. There is a measurable amount of societal-exposure training going on here; we think that way because that's the way everyone else does it, and our teachers did, and ...

But not in cars. In cars, a low-side switch means either putting the switch out at the load, or running a return wire back to the controller. Way easier and cheaper to ground the load to the chassis out there, and switch the high side at the controller. This reduces the wire count per load from 2 to 1, a huge amount of money in million-car economics and reliability.

ak
 
Last edited:

Irving

Joined Jan 30, 2016
2,058
Something like the below;

There is absolutely no need for a flyback diode on an incandescent bulb. The inductance is measured in nanoHenrys and generates little back-emf.

1619104817662.png
 

AnalogKid

Joined Aug 1, 2013
9,351
First pass at a 555 solution.

R1-C1 determine how long after a turn signal stops flashing the lights go into position mode.

Q1 holds the Trigger input low, which holds the Q output high, which turns off Q2. U1 should be a CMOS 555, not bipolar.

When R1 discharges C1, Q1 turns off and allows C1 to charge up and the 555 to start oscillating.

R4 sets the dimming percentage between 5% and 50% -ish. Q2 can be any p-channel power MOSFET rated for the job. Same for D1-D2-D5-D6.

NOTE - This is a ***first pass*** at a concept schematic. It uses parts already in my design libraries. You must evaluate all components for suitability.

ak
Bike-Light-Dimmer-1-c.gif
 
Last edited:

Irving

Joined Jan 30, 2016
2,058
Q2 can be any p-channel power MOSFET rated for the job
If youre going to use the IRFR9024, in the TO-251 cased version you'll need a heatsink (don't even think about the D-Pak version). When on the MOSFET is dissipating around 3.75W (at 3A and assuming a junction temp around 120degC) at 80% duty cycle. With an ambient of 30degC, you'll need a heatsink of better than 20degC/W. This is becuse the device has a max on-resistance of 0.28ohms which increases to 0.42ohm at a junction temp of 120degC

The NDP6020P is actually a better device, having an on-resistance at 25degC of 0.05ohm max, rising to 0.07ohm at 120degC., which together with a thermally better TO-220 case means a dissipation of 0.65W and safe operation without a heatsink up to 80degC ambient. The only reservation I have with this device is its max Vds of -20v, a little close to the maximum battery volts.

There's plenty of better devices out there - e.g. IRF4905 fits the bill perfectly, should run 'cold' and is only £2/$2 at Mouser.
 

shortbus

Joined Sep 30, 2009
8,797
The "normal" case is normal because n-channel FETs and NPN transistors cost less and work better than their p- equivalents, going back to when the performance and cost differences were large enough to matter. There is a measurable amount of societal-exposure training going on here; we think that way because that's the way everyone else does it, and our teachers did, and ...
OK then, and to quote Emily Litella, "never mind".
 
Top