Electrical – A circuit to fade-in and -out LEDs (DRLs) only when the car engine is running

automotivebatteriesled

I would like to make a small hobby project to implement in my car.
However, I would like to ask here as I do not have much experience with electronics.

Let's suppose that I have a switch which should turn on or off the daytime running lights (DRL) of the vehicle.
These are separately installed and are consuming ~0,8 A from the battery (14,4 V when charged).

I would like to achieve the following effect (we assume that the ignition is turned on):

  • when I close the switch and the engine is not running, the DRLs are off;
  • when I close the switch and the engine is running, the DRLs are gradually turned on (fade-in for about 5 seconds (configurable));
  • when I open the switch or the engine stops running, the DRLs are gradually turned off (fade-out for about 5 seconds (configurable)).

To me, it should be something like this:

schematic

simulate this circuit – Schematic created using CircuitLab

I think the schematic can get information whether the engine is running via:

  • a voltage comparator – preferable, as it should be simple enough. If the car battery voltage V1 is above a certain (configurable) threshold, e.g., 13,3 V, then turn the rest of the schematic on;
  • an inductive tachometer – shall be a bit harder and comprehensive to install.

Perhaps a time delay relay may also be used, but would not be very suitable as it wouldn't detect the engine stopping.

As possible solutions for the fade-in/fade-out effect, I though of a BJT with a RC (integrating) circuit to set the time constant. Nevertheless, perhaps the losses would be lower if a (MOS)FET is used because of the ~10W LEDs.
I also read that a 555 in monostable mode would be suitable.

It is important that the transistor is positioned "high-side", i.e., it opens or closes the 12 V supply to the DRLs. Their negative pole is connected to ground (chassis) and the positive is currently fed through the simple on-off switch SW1.

Preferably, the solution should be as simple and inexpensive as possible, i.e., no Arduinos or microcontrollers if feasible 🙂

Thank you in advance!

Best Answer

Just an extended comment. EDIT Now here's my solution

"Drivers in Bulgaria must switch their car lights on from 1st November. According to the Traffic Act in Bulgaria, all drivers must put their vehicle's lights on whilst driving at any time, including daylight hours. This applies from 1 November to the 1 March 2010.Failure to have your lights on will result in a fine."

DRL's are mandatory here in Canada for many decades. Not so in the USA!

I read if you want to avoid fines from Bulgarian police you must go to CCI to have a certificate for approved DRL's. Yet for your location, DRL's are illegal at night, I think because too many LED chinese DRL's are very high glare. So I see you are trying to make it legal, yet diffusing the lens can avoid the glare by spreading out the Lumens to reduce intensity causing glare.

My understanding from reading some comments is your 1999 model car does DRL/TFL but does NOT have ability to detect other lights ON and DRL lights cannot be on at night under any condition or if any other headlamps/ park or fog lamps are on.

  • when I close the switch and the engine is not running, the DRLs are off;
  • when I close the switch and the engine is running, the DRLs are gradually turned on (fade-in for about 5 seconds (configurable));
  • when I open the switch or the engine stops running, the DRLs are gradually turned off (fade-out for about 5 seconds (configurable)).

For Ignition On = 1, Engine on=1, Nite(time) = 1 , HL,headlamp On=1, Park Lamp , PL ON=1, (Output) DTL ON=1, slow ON=1+, Off=0, slow off =0+ , TFL signal =0 , 1

Let me try a Truth table if I understand correctly, otherwise copy and fix I am not sure how TFL signal works ( does it detect daylight? or dark ?)

IGN  ENG Nite HL  PkL DTL TFL
 0    x    x   x   x   0   0
 1    0    x   x   x   0   ?
 1    1    0   x   x   1   ?
 1    1    1   1   x   0+  ?
 1    1    1   x   1   0+  ?   (parked)
 1    1    1   0   0   1+  ?   (parked)

As I understand it, you want configurable slow ON/OFF DTR and disabled by Engine OFF sensor. Is that it? Analog or uC digital ? Make or buy?