PWM'd voltages for Automotive lighting.

mrb

Newly Enlightened
Joined
Dec 8, 2009
Messages
47
Location
UK
I often see advice given that a relay harness or wiring upgrade is beneficial, this I certainly do not doubt, just questioning if it's possible to have them work with modern "CANBUS" equipped cars.

Specifically these newer cars that use pulse width modulation techniques to keep excess alternator voltages down for longer bulb life.
I've certainly heard that the E90 BMW 3 series employs this technolgy as well as some newer GM models, even for their headlights.

Just wondered how widespread the use of PWM is. I've heard it used for other lighting functions before, in fact my own car seems to use it for stop/tail light functions from a single 21W bulb.

So, is it now common for PWM to be used in the powering of main automotive forward lighting and the advantages of increased bulb life and DRL functionality must only come at the cost of a reduction in lumens?

If one had such a car would this techonolgy mean relay harnesses cannot easily be installed as the car would detect this and throw an error code/disable the output?

I seem to remember reading that for BMW 1 series and newer, once the bulb check warning for a particular circuit has been issued a certain number of times that output is permanently disabled and a new light contol unit is then needed.:eek:
 

-Virgil-

Flashaholic
Joined
Mar 26, 2004
Messages
7,802
A relay harness is beneficial in those cases where the original headlamp circuit has excessive voltage drop. You need to include capacitors and diodes at the relay coil connections (terminals #85 and #86) to smooth the PWM and avoid burning out the relay coil, but that's about all it takes.

Just wondered how widespread the use of PWM is.

Wide and getting wider. The present Jeep Wrangler is one model that goes a long way towards evidencing that relay harnesses and PWM get along just fine as long as you put together the harness correctly.

I've heard it used for other lighting functions before, in fact my own car seems to use it for stop/tail light functions from a single 21W bulb.

That's another increasingly-popular strategy. The benefits are a less expensive single-filament bulb, faster rise time for the brake light at night (because the filament is preheated by operating in tail mode), and one less wire to run. The disadvantage? Lose one function = lose both functions because they're on a single filament.

DRL functionality

Yeah, that's a potential hurdle with installing relays in cars with PWM-operated headlamps and headlamp DRLs. You have to disable the DRLs (and if necessary, relocate the DRL function to a non-headlamp component such as the turn signals).
 

mrb

Newly Enlightened
Joined
Dec 8, 2009
Messages
47
Location
UK
Thanks for your interesting reply.
A relay harness is beneficial in those cases where the original headlamp circuit has excessive voltage drop. You need to include capacitors and diodes at the relay coil connections (terminals #85 and #86) to smooth the PWM and avoid burning out the relay coil, but that's about all it takes.

I took apart my old pre-xeon light control module to see what's inside, a big array of Siemens High-side solid state switches and a big ol' Motorola microprocessor. The high-side switches have detection for open/shorts (hence no traditional fuses for my lights) so to get around this and 'fool' the switches/MCU do you simply draw just enough current for them to see a good circuit and not an open? Would the BFD still work then?

That's another increasingly-popular strategy. The benefits are a less expensive single-filament bulb, faster rise time for the brake light at night (because the filament is preheated by operating in tail mode), and one less wire to run. The disadvantage? Lose one function = lose both functions because they're on a single filament.

Again, don't know if this is common either but if my H6w sidelight goes out my (amber) front turn signal/indicator is run at reduced brightness, also occurs if a headlight is out.

I have brake force display or whatever it's called and so for tail/brake have 2 p21w bulbs, tail light = both PWM fed with equivalent of 5w of power, normal braking gives one full power and ABS or some high decceleration rate lights them both up fully, the pre-heat does make the turn-on noticeably faster. Certainly a feature worth having I'd say.
 

jtr1962

Flashaholic
Joined
Nov 22, 2003
Messages
7,506
Location
Flushing, NY
Anyone here know exactly what BMW is doing as far as PWM goes? The reason I'm asking is I've been involved designing drivers for LED AngelEye retrofits for one of my customers. The PWMing issue is causing a ridiculous number of problems. We needed to stick a filter cap and diode in the driver to keep the LED from flickering when the PWM is on. Unfortunately, too large a cap causes a bulb out warning, so we can't completely solve the issue that way ( i.e. LED is dimmer when PWM is on ). Anyone know exactly how BMW is detecting a bad bulb? And why using too large a cap should cause the car to give a bulb out warning? And the constant charging/discharging of the cap eventually causes it to fail. We've had a ridiculous amount of drivers fail.

Any way for the end user ( i.e. the car owner ) to turn off PWM using whatever tools they might have handy? If so, then that could be put in the installation instructions. The problem would have been a lot more tractable if BMW had used a much higher PWM than the ~30 Hz they're using. We could have used much smaller filter caps and solved the dimming issue completely. I imagine if more cars start using PWM then LED retrofits ( and also relays ) of any kind are going to be increasingly problematic.

And before anyone mentions safety or beam patterns, the LED retrofits I'm talking about here are purely cosmetic. The LED matches the HID headlight color better than the stock halogen. The Angeleyes are bright enough to be daylight visible, but don't project any light onto the road. Safety isn't compromised with LED retrofits in this case.

Also, please don't suggest connecting the driver to some other 12V source in the car which doesn't PWM. That is NOT an option. One of the selling points of these retrofits over others on the market is that they're plug-and-play. We therefore can't require the user to install a wiring harness.

To say this issue is frustrating is an understatement. We're going on a year now and are nowhere near having it solved.
 

-Virgil-

Flashaholic
Joined
Mar 26, 2004
Messages
7,802
And before anyone mentions safety or beam patterns, the LED retrofits I'm talking about here are purely cosmetic. The LED matches the HID headlight color better than the stock halogen. The Angeleyes are bright enough to be daylight visible, but don't project any light onto the road. Safety isn't compromised with LED retrofits in this case.

Yeah? What about the part where you have to break open the headlamp to install them? Bet the modified headlamps no longer pass (US or EU) environmental-resistance tests for water and dirt ingress, no mater what kind of a re-sealing procedure is suggested in the instructions.
 

jtr1962

Flashaholic
Joined
Nov 22, 2003
Messages
7,506
Location
Flushing, NY
Yeah? What about the part where you have to break open the headlamp to install them? Bet the modified headlamps no longer pass (US or EU) environmental-resistance tests for water and dirt ingress, no mater what kind of a re-sealing procedure is suggested in the instructions.
You don't have to touch the headlamp. You remove the stock halogen bulb used ONLY to light the Angeleye, stick in the LED heat sink ( it's shaped to match the base of the halogen bulb ), and connect the H8 plug to the LED driver. That's it. The stock HID headlights aren't touched or opened at all. Also, the access to the halogen bulb is from under the hood. You remove a cover ( which isn't sealed to begin with ) install the retrofit, and screw the cover back on. You're not messing with the headlight or DRL lenses from the front of the car at all.
 
Last edited:

Alaric Darconville

Flashlight Enthusiast
Joined
Sep 2, 2001
Messages
5,377
Location
Stillwater, America
And before anyone mentions safety or beam patterns, the LED retrofits I'm talking about here are purely cosmetic. The LED matches the HID headlight color better than the stock halogen. The Angeleyes are bright enough to be daylight visible, but don't project any light onto the road. Safety isn't compromised with LED retrofits in this case.

Probably the only case in existence where one of those horrific "kewl blue" bulbs might make sense, if the angel eyes don't have to conform to any particular safety standard. Then you get the color to match the HID's (whoopty-do) and none of the PWM issues with LEDs.

I also see some H8 angel eye LED kits on that well-known auction site that says they include ballasts -- perhaps the ballast is what overcomes the bulb out indicator problem.

On the other hand, does this BMW owner not have anything better to spend his money on? Gasoline? A fine tie? New shoes? Getting the vehicle detailed? Donating to his favorite charity?
 
Last edited:

jtr1962

Flashaholic
Joined
Nov 22, 2003
Messages
7,506
Location
Flushing, NY
One of those cases where one of those horrific "kewl blue" bulbs might make sense, if the angel eyes don't have to conform to any particular safety standard. Then you get the color to match the HID's (whoopty-do) and none of the PWM issues with LEDs.
Well, they were doing that for a while except those have pretty short life, and are nowhere near as bright as the LED retrofits ( how can they be when you're taking a 35 watt halogen bulb which is already inadequate for the task, and then throwing away about 85% of the light? ). That's the reason LED retrofits are so popular these days.

I also see some H8 angel eye LED kits on that well-known auction site that says they include ballasts -- perhaps the ballast is what overcomes the bulb out indicator problem.
All the retrofits use ballasts. They have to or the LED would be destroyed. The problem is that putting a large enough cap in the ballast to get rid of the dimming causes the bulb out warning. If I knew exactly what algorithm BMW used here to detect a bad bulb then I might be able to design around it.

On the other hand, does this BMW owner not have anything better to spend his money on? Gasoline? A fine tie? Helping needy (American, even) children?
I make ballasts for a company which sells the retrofits. If BMW owners want to spend money on something which in turn makes me money nothing wrong with that. ;) Last I checked, I'm far from rich, so in fact they are helping the needy.

But seriously, if anyone has the answers to any of my questions, it would be greatly appreciated. We recently had another rash of driver failures.
 
Last edited:

Hilldweller

Enlightened
Joined
Dec 17, 2009
Messages
671
Location
Hog Waller, GA
Wide and getting wider. The present Jeep Wrangler is one model that goes a long way towards evidencing that relay harnesses and PWM get along just fine as long as you put together the harness correctly.
Works GREAT in my Wrangler ---- but we don't have a "bulb out" idiot light like the BMW does.

My voltage drop change was .57v for the better after the harness.
 

mrb

Newly Enlightened
Joined
Dec 8, 2009
Messages
47
Location
UK
All the retrofits use ballasts. They have to or the LED would be destroyed. The problem is that putting a large enough cap in the ballast to get rid of the dimming causes the bulb out warning. If I knew exactly what algorithm BMW used here to detect a bad bulb then I might be able to design around it.

I can only offer you some small insight into the way I went when I wanted to work out the criteria for bulb failure detection on the older last-of-the e46 and e85 z4 BMWs.

I custom made a (home-brew) replacement LED side light using top M-bin Cree MCEs when they first came out. I abandoned that project after heeding advice Scheinwerfermann had previously given about bulb compliance to other members and it never made it onto car, infact I only finished one after dome was knocked off the second MCE.

Anyway, after reading numerous posts across many forums it became clear that most of the reasoning as to how BFD worked were just stabs in the dark not related to the actual hardware in hand. Recently I had my lights changed to OEM bixenon and so had a spare light control module, I pulled it apart and went datasheet hunting. Found the main work was done by lots of Siemens BTS710L 4 channel high side switches and M68HC11 MCU.

Just a few minutes looking at the BTS710L sheet revealed a wealth of infomation, it explained why there is a lack of headlight fuses in my car. I wanted to see what rating my fuses were as the initial current draw of xenon could blow them and I read advice that suggested to bump them to next rating up. That wasn't even required or possible, the high side switches are able to tell the difference between a proper hard short and just a heavy initial current draw, I measured about 11 Amps at initial strike then maintained at roughly 3.75 Amps.

Back to the main point here, the sheet contains the graph below of minimum current draw requirements in order for the switches to not report open-circuit, and finally told me at what point a load was considered good.
graph.gif

Also available is timing diagrams for open-circuit detection, for these switches the open-circuit is typically flagged to the MCU 30 microseconds later following an open-circuit fault. The problem with the situation you refer to is the PWM'd output voltage is dynamically adjusting to compensate for differing loads on the car's electrical system and rpm to stay at 12.5 Volts. For my side light experiment I was only running a single MCE so just a simple CC driver giving 500mA at 3 odd volts was fine but for your application it's obviously not that simple.

Perhaps if you've not done so already you could find the equivalent infomation for the E90/E92s high side switches and see if that helps at all.

Finally, are you familiar with Navcoder? Originally was a tool to change various settings on BMW navigation systems but the author found that through the i or k-bus (of the cd-changer port) access to the parameters of the LCM can also be done. It currently seems able to enable/disable various bulb checks - more interestingly is you can enter a PWM duty cycle to allow you to run highbeams as DRL at a chosen intensity, I know this isn't what you're after but it shows there might be a 'software' solution/aspect to your problem, if the Navcoder developer knows or could find an address/register for the PWM function you'd be closer to winning the battle though not really a simple plug 'n' play solution.:(
 

jtr1962

Flashaholic
Joined
Nov 22, 2003
Messages
7,506
Location
Flushing, NY
Also available is timing diagrams for open-circuit detection, for these switches the open-circuit is typically flagged to the MCU 30 microseconds later following an open-circuit fault. The problem with the situation you refer to is the PWM'd output voltage is dynamically adjusting to compensate for differing loads on the car's electrical system and rpm to stay at 12.5 Volts.
I think that may be the source of the problem. In my application I'm driving a single LED at 2000 mA. If I use a large enough cap, then the LED + driver might be powered from the cap alone for > 30 microseconds. Zero current draw as far as the LCM is concerned, and bingo, dead lamp indicator. Now the question is how to fool the LCM into thinking there is a load when the cap is powering the LED. When I experimented on a car, nothing except a resistance near that of a 35 watt lamp was sufficient. Needless to say, there's no way to dissipate that much power in the available space and keep temps cool enough for the LED. However, at least I know what's going on now. I had figured the LCM was using some sort of open circuit detection, and now it's finally confirmed that it does indeed do exactly that. Thanks!

Finally, are you familiar with Navcoder? Originally was a tool to change various settings on BMW navigation systems but the author found that through the i or k-bus (of the cd-changer port) access to the parameters of the LCM can also be done. It currently seems able to enable/disable various bulb checks - more interestingly is you can enter a PWM duty cycle to allow you to run highbeams as DRL at a chosen intensity, I know this isn't what you're after but it shows there might be a 'software' solution/aspect to your problem, if the Navcoder developer knows or could find an address/register for the PWM function you'd be closer to winning the battle though not really a simple plug 'n' play solution.:(
I'm not familiar with it but I sent my customer a link to this thread so he could follow it. Yes, reprogramming the LCM seems to be our only hope. Disabling the bulb checks would solve one problem obviously. And if we can alter not just the PWM duty cycle, but also the frequency, then the other problem can be solved. Because MOSFETs are doing the PWMing, the frequency can be set much higher if the LCM allows it. I was actually looking to keep the duty cycles the same, but ramp up the frequency by a factor of 100 or so, to several kHz. This would allow use of much smaller, non-electrolytic filter caps. Question is can it be done with Navcoder? If my customer or someone he knows is familiar with it, that might be an answer if it can be readily done to his customer's cars.

Anyway, thanks a bunch for all the useful info. :twothumbs Truth is I feel awful I haven't been able to provide a solution as I consider my customer a good friend also. Whether or not we can ultimately fix this problem, at least now I know a bit more why things are happening the way they are. It seems the plug-and-play solution we're after isn't as easy coming as we thought at first. :(
 

mrb

Newly Enlightened
Joined
Dec 8, 2009
Messages
47
Location
UK
Had a good look at navcoder, sadly it seems that it does not support the newer E90 and E92 models.
It looks as though the light control module from earlier e46/e85 is now the footwell module and all light (and doubtless other functions) are performed by it.
Unfortunately, at present navcoder has no support for such module.
I would imagine though the general architecture of the footwell module for lighting would be similar, a microprocessor driving using PWM an array of 'smart' MOSFET/high-side switches.

I've also had a bit of a search for available LED replacement modules for the E90/E92. From what I can see not many seem to use much of a (easily visible) driver.

Maybe they are just operating with linear regulators or have the LEDs in a configuration to allow getting away with simple resistors or silicon diodes, the cold bulb-check would be fooled as with e46/e85 by a correctly sized electrolytic providing enough inital current to look like a good load. After all, the control module should at least mean that load-dump and other nasties aren't present on the output.

The (hot) bulb-check function will still work as the cap once charged is obviously not going to keep drawing (enough) current to satisfy the current criteria for 'load good'.
Unless you can make the LED driver work with a PWM input without using a large electrolytic filter cap, it may be unlikely to adequetly fool the hot bulb check.

I will mention that after reading up on this it looks like the light-collecting abilities of the fibre-optic system is not able to take advantage of much over the stock supplied lumens, and even the LED examples that have 2 or 3 times the lumens do not result in a significant increase in brightness.

I can see that considerable time has already been spent in looking to get your own solution to the problems you have encountered but there seem to be quite a few examples floating around that claim to be error free. You may have already seen some of the following but worth a quick look if not.

Some technical info on E90 but mainly E92 lights, see top two sticky threads.

An oldish look at various LED solutions.

Module with SSC P7s - mentions capacitor-free driver.

Another newer module with microprocessor controlled 'ballast'.

Lastly, are you aware of the LUX H8 made by mds82 (marc) on this forum? Thread and links here.

Sorry if I got your hopes up with the Navcoder route, I thought it worked with e46 3-series onwards, rather than only.:sick:
 

mrb

Newly Enlightened
Joined
Dec 8, 2009
Messages
47
Location
UK
...Now the question is how to fool the footwell module into thinking there is a load when the cap is powering the LED. When I experimented on a car, nothing except a resistance near that of a 35 watt lamp was sufficient...

Been thinking a bit more about this part above. Would you say the graph below sums up the stock situation?
vigraph.png


You have said that only a dummy load similar to that of the 35w halogen was sufficient to not give errors, ie around 4.5 Ohms. From what I saw in my searchings through the datasheets for the high-side switches on my car, only approx 100mA per switch is required. (The switches are run in parallel for the higher-current lamps)

Although I didn't try this out practically as you have, I would have expected to be able to get away error-free with using a higher resistance as only 200mA or so is required to be drawn.
Do you have access to a high-power rheostat/variable resistor to allow this to be tested with different resistances?
I could find none in the UK when I wanted one and almost got a few new-old-stock surplus ex-military/aviation examples off of eBay. The high shipping cost, and my eventual shelving meant I just used a linear driver not a switching one for my limited tests.

From what you've been saying, if a switching driver is (temporarily) drawing its power from the filter/reservoir cap then the open-circuit detection current will go below threshold for > 30us and the bulb warning will come and latch on.

By putting a low-ohmic value current sense resistor at the start of the main current path, a PIC uC could perform simple A-D conversion on the analogue voltage representing current draw.
If the uC was programmed to drive a power MOSFET and dummy load resistor placed from +ve to GND for just enough time to allow the PWM cycle to start over then as far as the footwell module is concerned the load is still valid.
I may have these wrong but:

30x10-6 = 0.000030000 sec open-circuit detection time 30uS
10Mhz 0.000000100 sec 300 times 10MHz uC Clock
40MHz 0.000000025 sec 1,200 times 40MHz uC Clock

It seems that even a 10Mhz clocked PIC is running significantly faster than needed and the actual PWM voltage signal (only 30Hz) could be used as an input into the PIC for timing/interupt purposes.

A 78L05 +ve reg could supply the PIC, somewhat isolated from main circuit through a diode, would also need a reservoir cap to power the PIC and MOSFET during PWM=zero volts.

The stumbling block may be that the time for a microcontroller and 78reg to stabilize and be ready to read and respond to the inputs may be too long.
If so, the same could perhaps be acheived with old-school combinational logic or op-amp comparators, though would be important to make sure the MOSFET that performs the shorting of the dummy load to ground is only active for the required time since the power rating of the dummy is only likely to be few watts not 35w.
 

jtr1962

Flashaholic
Joined
Nov 22, 2003
Messages
7,506
Location
Flushing, NY
Yes, that chart pretty much summarizes the situation. Frequency is roughly 30 Hz, and duty cycle is about 30%. Basically, what seems to happen is a larger cap isn't depleted as much during the off cycle as a smaller one, so it takes a shorter time to charge completely when the output is high. Once charged, the current drops under the threshold, and the LCM says we have a bad bulb. A smaller cap doesn't have this problem as it depletes completely during the off time. However, that also means we have to tolerate some dimming.

The microcontroller idea certainly sounds like it would work. I could also do something similar with opamps and avoid the need to have a 5V supply. When the opamp detects the current going to the driver to be under a certain threshold, it activates the dummy load. Hopefully the duty cycle of this dummy load will be low enough so heat dissipation isn't an issue ( the driver right now is potted in an ~1" square box ).

Another option is to put a fairly large inductor in series with the 12V line. The inductor current will ramp up and down slowly. Doing it with a circuit simulator, it should work. I would need to include a clamp diode to keep the voltage from going under 0V when the LCM transitions the output from high to low.

Now it's a matter of seeing which solution costs less in terms of money, including both parts and assembly labor, and more importantly, if the theory here matches what occurs in a car. Unfortunately, I don't have a car to test it on. Usually I send the drivers to my customer, and he tests them in his car.

I also took notice of what you mentioned regarding the limits on the light-collecting abilities of the fiber optic system. If we can efficiently direct exactly the maximum amount of light which the system can deal with, then we should be able to decrease the amount of power needed, perhaps significantly over what we are now using. This in turn means the size cap we're using now will be adequate to prevent dimming, and we won't need some scheme to fool the LCM into not detecting a bad lamp.

Also, interesting links to various solutions. I am in fact familiar with Marc's Lux H8. I made the drivers for the first versions but unfortunately couldn't continue due to a conflict of interest with my other customer with whom I had a longer relationship. And yes, my present customer is represented in one of your links also. Great product once we solve the issues I mentioned.

Thanks once again for all the helpful info! :twothumbs You've offered far more info on this issue than I've been able to glean reading BMW forums for the last year. At least now we may have a solution in sight.

I'm also thankful for everything I've learned regarding PWM in cars. It seems it's only going to be more widely used as time goes on, so any LED retrofits need to take this into account.
 

mrb

Newly Enlightened
Joined
Dec 8, 2009
Messages
47
Location
UK
Yes, that chart pretty much summarizes the situation. Frequency is roughly 30 Hz, and duty cycle is about 30%.

Is the duty cycle really as low as that? ≈4volts average? I did read that word doc file from the socale90 link that said the rings have two intensity settings so maybe that's it?:confused:

Another option is to put a fairly large inductor in series with the 12V line. The inductor current will ramp up and down slowly. Doing it with a circuit simulator, it should work.
Yes, that's certainly another avenue to go exploring down.

Unfortunately, I don't have a car to test it on. Usually I send the drivers to my customer, and he tests them in his car.

Just a though here, I'm now certain lighting control is done by the footwell module, I couldn't find any info on what lies inside the module but if you could ascertain if the module uses smart MOSFET high-side switches you could see if you can locate datasheet for them like I did giving the current thresholds.
Or better still get hold of some of the switches (digikey?) and partly duplicate the drive portion of the module.
Would need to hook it up to a simple PWM circuit at correct duty cycle and frequency (555 timer??) to drive the switch into your load.
A simple latch circuit connected to the status pin(s) of the high-side switch would be analagous to the bulb-out warning.
Could then try out various loads and methods of keeping the current draw happy.:thumbsup:

Module in question. Some pics: eBay1 eBay2 ECS Can almost see inside with the ecs pics.

If you have java and svg plug-in, can view the wiring diagrams and associated info for the module i.e pinouts. Google: BMW WDS
The spaghetti one works ok.

[Some pics inside older generation light switching centre, album, pic. The surface mounted components on lhside are the BTS710L high-side switches.]
 
Top