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.
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.
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.
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.
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.
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.
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?
- Low Q3 MOSFET Losses (Less than 1m on to off transition at the end of the timer)
- 40v compliant
- reverse voltage compliance
- 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
- LTSpice is a registered trademark of Linear Technology Corporation
Hey Mark, I looked at the Eagle schematic and read the description and I was wondering why the positions for C2 and R2 aren’t switched (I’ve never seen the resistor on the GND side)? I did a simulations in LTspice and with the configuration you have and I got the voltage of the gate of the Nmosfet (Q2 in this case) staying at zero volts. I know you proved the validity of the circuit in your simulation so I would like to know if there is something I’m missing here. I appreciate the upload btw 🙂
In the simulation, look for the V(cap) voltage. This will be similar to V(Vg3) and is the gate voltage of the Q2 transistor (using the eagle reference designator format). Sorry these reference designators from the eagle schematic to LTSPICE are not matched. In any case, This voltage should have an exponential decay from 12v once it is applied. C2 and R2 are in the order they are so that Q2 will initially turn on when 12v is applied. ONly when the C2 capacitor voltage reaches about 10v will the Q2 transistor turn off. If you can’t see this in the simulation let me know. I’ll try to load the files on another computer to see if there is an issue. On my computer V(Cap) is showing the proper exponential decay. Thanks for the comment.
BTW: Salt Creek was fun today… water warm, Not many out
What’s the worst case scenario if some element in this circuit fails? Just some magic smoke and the lamp working as if without this scheme?
Interesting, the E36 is already equiped with a ‘relief relay’ that cuts out power after 15 minutes.
Hi Don, I have seen the relief timer work for cabin lights , But this relief timer does not apply to the trunk light. As a result my battery was slowly draining over time.