When you have had one car for as long as I have, you get to know all its quirks. While I love my 1996 BMW M3 E36, some things can be improved. The BMW E36 is designed so that if you leave the trunk or door open, The corresponding lights will remain on.  For 1996, this design feature was adequate.  For 2017, we can do better and is the focus of this hack.    I designed a back to basics analog timer circuit that will turn off the trunk light after 15 minutes of operation in the case the trunk is left open. It is robust enough to handle a reverse voltage connection and a 40v load dump surge on the 12v power. While a 555 timer could be made to do the same function, This implementation is simpler and more efficient.

Testing the Timer Prototype in the Trunk

This BMW E36 trunk light characteristic caused me some grief a little while ago.  The trunk lid closed detector switch was not working correctly, leaving the trunk light ON all the time. Because it was in the truck, I never saw the light and eventually, my battery started to die.  I noticed that if I did not drive the M3 over the weekend,  I would need a jump start each Monday before work.  When I went the shop to get the battery fixed, a kind mechanic knew of this flaw with the E36 and fixed it for free by just disabling the truck light.  I recently repaired my trunk harness so the truck sensor is working,  so now would be a good time to upgrade the trunk light so that if it is on for more than 15 minutes it will turn off, saving the battery and upgrading performance to the 2017 era of cars.

TrunkLightSchematic1
BMW Trunk Light Switch Schematic

As expected, the schematic shows that when the trunk is open, the ground connection is closed and 12v is applied to the trunk light turning it on.   So lets improve this.

Analog Timer Hack

The analog timer hack is shown in the schematic below.  The Kicad schematic, BOM with Digikey(TM) parts numbers,  and a full LTSpice (TM) simulation circuit are available on GitHub.  Download this for a full reference.

TrunkLightHackSchematic
Analog 15minute Timer for the BMW E36 M3 Trunk Light

The original 10W lamp is now replaced with 17 additional circuits that provide the turn off switch (Q3), the 15-minute timer (C2), and the timer reset (Q1).  The circuit is also reverse voltage protected and 40v surge compliant.      When the trunk is opened, the trunk switch closes, and 12v is applied to the circuit.    Because capacitor C2 is near zero volts, transistor  Q2 is on.   This will fully turn on Q3 and provide 12v to the Lamp.     The timer capacitor C2 will charge through the 5.6Meg R2 resistor until the voltage reaches the threshold voltage (Vt) of Q2 around 2v.   The time it takes to reach 2v, ton, is a function of C2, R2, the input voltage and the Vt of Q2.

 

At this point, Q2 will go into the saturation region and the Q2 drain voltage will rise.   When the drain voltage rises Q4 will turn on providing hysteresis and ensuring that Q3 is fully turned off quickly and the voltage to lamp.  The circuit will remain in this state as long as the trunk is open and the switch is closed.    Once the trunk is closed again and the trunk switch is opened, the C2 timer capacitor will be reset by transistor Q1.   This part of the circuit took me a little while to pull together. Can you figure out how it works?

There are several components added to the circuit to ensure the circuit can withstand a 40v surge dump.  Can you figure out which component these are?   (see the end for details)

Simulating operation for Compliance

The LTSpice (TM) simulation below shows the negative terminal of the timer capacitor (C2) will drop from 12v to around 2v.  At this point, the lamp voltage turns off.     In the simulation, the 12v supply voltage is cycled one time, so the capacitor voltage repeats.

TimerSimCheck
Simulation Voltage showing Lamp Voltage, Vin, and Capacitor voltage operation

The simulation also helps to confirm the circuit will not be damaged with a reverse 12v supply or a 40 surge supply.  In both cases, all the MOSFET Vgs voltages were monitored to ensure they remained less than +/-12v.

MaxGateVoltageCheck
All MOSFET Gate voltages are less than +/-20v.   Circuit is reverse voltage and 40v surge compliant

Experimental Verification

Because the timer is based on extremely low currents flowing through the 5.6MEG resistor, the biggest requirement of the circuit was to verify that leakage currents were minimized.   As you can see, all the devices connected to the 5.6MEG net are extremely low in leakage currents.    The gate voltage of Q2, zener diode Q1, the drain of Q4 will all have low amounts of leakage current.   While not zero, They are somewhat offset by the drain to source leakage through Q1.  Experiments showed the timer was approximately 15 minutes.

I also wanted to verify the turn off transition was quick enough to minimize the power dissipation in transistor Q3.   With the hysteresis circuit, this turn off time was less than 20uS, plenty fast.

 

Any Improvements?

Let me know if you have any questions on the implementation or suggested improvements.    Can you suggest a way to reduce components and still meet the following specs?

  1. Low Q3 MOSFET Losses (Less than 1m on to off transition at the end of the timer)
  2. 40v compliant
  3. reverse voltage compliance
  4. A quick reset of the C2 timer capacitor.

If you don’t need the 40v surge capability, R1, D1, D3 and D4 can be eliminated from the circuit.

Add your thoughts in the comments  below

References

  • LTSpice  is a registered trademark of Linear Technology Corporation