Another PWM to DC thread

Alec_t

Joined Sep 17, 2013
15,119
How about using a variable switch-mode buck regulator such as this, but replace the trimpot with the smoothed PWM voltage to control the output voltage? From the write-up, for a 24V input it should provide an output in the range 1.25V to 22.5V

Edit:
Scrub this suggestion. That type of regulator typically uses a LM2596, which relies on feedback in a way which wouldn't be controllable with a relatively fixed voltage.
 
Last edited:

MrAl

Joined Jun 17, 2014
13,707
The gauges on the instrument panel must dim to zero (off).
Now I have to brush up on my transistor math. Its been a while...
For the emitter follower all you really need to know is the required base current, which can be derived from the approximate Beta, and the power dissipation.
As you probably know, the collector current Ic is going to be the base current multiplied by the Beta at the time and temperature that it happens to be.
For the power dissipation, just multiply the current through the collector times the voltage from collector to emitter, and that's the power the transistor has to handle.
For example, if you only had 1v across the transistor (23v output) and the current was 200ma, then the power would be 1*0.2=0.2 watts.
If you had 20v across the transistor and 200ma, then the power is 20*.2=4 watts, much more.
You then need to look at some heat sinks that can handle the power that has to be dissipated and have the temperature rise of the heat sink not increase too much (maybe 50 degrees C max).
You can also try just a 1/8 inch thick piece of aluminum with the transistor mounted right in the middle. If the sheet was 4 square inches the temperature rise would be about 60 degrees C, and that might be to high for what you need, so maybe go with a 9 square inch piece of even bigger. The best shape is a circle, but a square isnt too bad either.

Not sure if anyone mentioned this yet, but here is a simple 555 timer circuit that can provide PWM to the bulb. You can adjust it to dim, but i am not sure what the range is. I would guess the range is good enough though. If you want to see this circuit i'll post it, but it's probably all over the web as it is a common circuit called a variable duty cycle oscillator.
EDIT: This circuit may require that you can change the control element to a potentiometer though that may not be possible.
 
Last edited:

kiroma

Joined Apr 30, 2014
80
I have built a 1st order LPF that didn't work and a 2nd order would require very large LC values.
I'm wondering why it didn't work. What was the cutoff frequency? What resistor value was it?
Filters has output impedance too, and it can affect the transfer of power.
Edit: there's a tradeoff between size and output impedance in RC LP filters. You calculate the R and C, and then you can play around multiplying one and diving the other by the same amount. The higher the R, the higher the output impedance, and also, the smaller the C.
 
Last edited:

MrAl

Joined Jun 17, 2014
13,707
I'm wondering why it didn't work. What was the cutoff frequency? What resistor value was it?
Filters has output impedance too, and it can affect the transfer of power.
Edit: there's a tradeoff between size and output impedance in RC LP filters. You calculate the R and C, and then you can play around multiplying one and diving the other by the same amount. The higher the R, the higher the output impedance, and also, the smaller the C.
Hi,

I am guessing it is because incandescent bulbs have low resistance so the filter would have to have high value caps and low value resistors.
We could look at some examples.
 

kiroma

Joined Apr 30, 2014
80
I am guessing it is because incandescent bulbs have low resistance so the filter would have to have high value caps and low value resistors.
High value caps are obtainable easily with supercaps.
You just have to put them in series to be able to put 24 V on them, as they are 2.7 V.
Low value resistor isn't really going to be used, because you can higher the value. The result of this (below a certain output impedance) is that the filter has a lower cutoff frequency. This is beneficial up to a certain point.

Also, the loads are 24 V, 600 mA, which is 40 ohms. This is not that low, you can find power resistors less than that value easily too.
 

Thread Starter

SoundguyAL

Joined Nov 4, 2020
27
For the emitter follower all you really need to know is the required base current, which can be derived from the approximate Beta, and the power dissipation.
As you probably know, the collector current Ic is going to be the base current multiplied by the Beta at the time and temperature that it happens to be.
For the power dissipation, just multiply the current through the collector times the voltage from collector to emitter, and that's the power the transistor has to handle.
For example, if you only had 1v across the transistor (23v output) and the current was 200ma, then the power would be 1*0.2=0.2 watts.
If you had 20v across the transistor and 200ma, then the power is 20*.2=4 watts, much more.
You then need to look at some heat sinks that can handle the power that has to be dissipated and have the temperature rise of the heat sink not increase too much (maybe 50 degrees C max).
You can also try just a 1/8 inch thick piece of aluminum with the transistor mounted right in the middle. If the sheet was 4 square inches the temperature rise would be about 60 degrees C, and that might be to high for what you need, so maybe go with a 9 square inch piece of even bigger. The best shape is a circle, but a square isnt too bad either.

Not sure if anyone mentioned this yet, but here is a simple 555 timer circuit that can provide PWM to the bulb. You can adjust it to dim, but i am not sure what the range is. I would guess the range is good enough though. If you want to see this circuit i'll post it, but it's probably all over the web as it is a common circuit called a variable duty cycle oscillator.
EDIT: This circuit may require that you can change the control element to a potentiometer though that may not be possible.
I'm going to measure the actual power consumption per gauge tomorrow. This measurement will be taken at several voltages from say 1 to 24V.

To refresh your memory, The engine instrument panel has 2 types of gauges.
Gauges with incandescent backlighting and gauges with LED backlighting.

Several gauges (containing incandescent bulbs for backlighting) are connected to a PWM dimmer (7506 Dimmer). And work as they should.
There is another set of gauges (VDO SingleViu) gauges that that have LED backlights that cannot be dimmed with PWM.
Thanks again for your help!

I'm wondering why it didn't work. What was the cutoff frequency? What resistor value was it?
Filters has output impedance too, and it can affect the transfer of power.
Edit: there's a tradeoff between size and output impedance in RC LP filters. You calculate the R and C, and then you can play around multiplying one and diving the other by the same amount. The higher the R, the higher the output impedance, and also, the smaller the C.
I could have tested longer I suppose but when I put a scope on the filtered output it still looked pretty sawtooth and the gauges didnt like it. The ripple needed to be a lot lower.

Hi,

I am guessing it is because incandescent bulbs have low resistance so the filter would have to have high value caps and low value resistors.
We could look at some examples.
See reply above.. the incads are not an issue.. Its the VDO gauges that have LED's causing problems.
 

LowQCab

Joined Nov 6, 2012
5,101
Has anybody tried reading the instructions ????

The VDO-Gauges are designed for CAN-Buss operation, NOT PWM !!!

The best solution would be to install a single Toggle-Switch to kill Power to
all of the VDO-Gauges when darkness is needed.
.
.
.
 

crutschow

Joined Mar 14, 2008
38,513
The VDO-Gauges are designed for CAN-Buss operation, NOT PWM !!!
Yes, we are aware of THAT.
But the brightness can apparently also be controlled by varying the dc supply voltage to the LEDs.

To summarize the previous posts:
The incandescent lit gauges are controlled by PWM, so an attempt is being made to filter that same PWM to get a varying DC voltage for the LED lit gauges, since they do not tolerate the low-frequency PWM signal directly.
The latest approach being considered is to RC filter the PWM signal into the base of an NPN and use the emitter to driver the LEDs.
The best solution would be to install a single Toggle-Switch to kill Power to
all of the VDO-Gauges when darkness is needed.
Not really.
The TS wants to vary the gauge illumination depending upon the ambient lighting conditions.
 

MrAl

Joined Jun 17, 2014
13,707
High value caps are obtainable easily with supercaps.
You just have to put them in series to be able to put 24 V on them, as they are 2.7 V.
Low value resistor isn't really going to be used, because you can higher the value. The result of this (below a certain output impedance) is that the filter has a lower cutoff frequency. This is beneficial up to a certain point.

Also, the loads are 24 V, 600 mA, which is 40 ohms. This is not that low, you can find power resistors less than that value easily too.
Hi,

Oh i did not mean to imply that you need caps as large as 500 Farads or something like that. I would think maybe 10,000uf would be the largest but i guess it could go up to 100,000uf but those caps are available in many different voltages.

So we are dealing with a 40 Ohm load, ok thanks. That means to get full brightness, assuming we need that, we would need a RC filter with very low value resistors. For example for a 10 percent loss in the top voltage we would need an RC filter with R=4 Ohms approximately. This means the cap would have to be something like 5000uf, but higher is even better. Standard cap would be 4700uf. That's for a single RC stage.
For two RC stages, we would need two 2 Ohm resistors and caps maybe 2200uf each, but we could sim this to get closer.
Of course if they are never to be driven at full brightness then we can go higher with the R's. For 50 percent we could use a 40 Ohm resistor, which greatly reduces the cap value to 470uf or something like that, and if a two stage RC filter than two 20 Ohm resistors and two 220uf caps or something like that.
For the RC filter and transistor NPN circuit, we could probably use a 400 Ohm resistor and smaller cap, or just stick with 470uf and get better filtering.

Any of this should be tested with a simulation though to make sure the filtering looks good enough and we can get the range of brightness needed, and with the NPN we must check for power dissipation and deal with that also. Depending on the brightness range needed the heat sink may turn out to be minimal.
 

Thread Starter

SoundguyAL

Joined Nov 4, 2020
27
It turns out I was misinformed!

After extensive testing this weekend, the gauges can not be dimmed by decreasing voltage on the illumination circuit.
Decreasing voltage to a user defined threshold between 0.5 and 7.5V will turn the illumination off but will not make it dim.
For example. if the threshold is set to 5V the illumination will turn off when the voltage drops below 5V.

However, the illumination circuit still requires a LPF to work without flashing when the threshold voltage is reached.
With the LPF, the illumination turns off and on very smoothly at the threshold voltage.

This has led me to a PWM to J1939 converter.
Axiomatic PWM to J1939
The caveat to this solution is the PWM signal will need to be reduced to 10V max.
Very doable.
The converter seems robust and has certain mil-spec design criteria.


The other solution (mentioned above) is to configure the gauges to a brightness level, define the threshold voltage, and let the gauges turn off when the threshold is reached.

I apologize for the confusion on this and thanks again for the helpful input.
 

Thread Starter

SoundguyAL

Joined Nov 4, 2020
27
Is that varying a control voltage or the power to the LEDs?
I would define it as a control voltage by the way it functions in the circuit.
I say that because varying the voltage on the illumination circuit only has that affect.... to turn the LED on and off at the threshold voltage.
 

LowQCab

Joined Nov 6, 2012
5,101
The "Illumination-Push-Button" has a second function,
which is for manual programming of all of the various Display Options/Features.

PWM Dimming of the Display is not an available option,
but the Display can be manually dimmed with the Push-Button.

The Can-Buss can remotely control everything.
.
.
.
 

Alec_t

Joined Sep 17, 2013
15,119
Don't you just love 'smart' gauges? In the good old days you simply twiddled a knob to vary the brightness. Now you probably have to download an app to your phone/control-unit and set that up, then press buttons to do the job!
 

LowQCab

Joined Nov 6, 2012
5,101
Those VDO-Gauges are very nice, "Top-of-the-Line" devices,
but VDO also produces "0-to-5V" Gauges with a separate Lighting-Circuit.

Most aftermarket Fuel-Injection-Computers will operate all the features via CAN-Buss with no problems.
.
.
.
 
Last edited:

kiroma

Joined Apr 30, 2014
80
There is another set of gauges (VDO SingleViu) gauges that that have LED backlights that cannot be dimmed with PWM.
I don't understand the reason behind this, if you could clarify would be great.

Also, if you can't PWM directly, you can make a N order filter (RCs) with a buffer for it (source/emitter follower). I didn't quite get if voltage doesn't also dim right, so my last card in the sleeve would be a circuit that you turn a knob and it alters the voltage on the base of a transistor, and then you have a current source which can dim the LEDs, as every LED that is dimmed has this type of circuitry.
 

MrAl

Joined Jun 17, 2014
13,707
Hi,

Yes there could be a lot of different solutions but what we really need to see i think is some waveforms of how it is being controlled right now before any modifications. We need to know the required spec's first.
 

Thread Starter

SoundguyAL

Joined Nov 4, 2020
27
I don't understand the reason behind this, if you could clarify would be great.

Also, if you can't PWM directly, you can make a N order filter (RCs) with a buffer for it (source/emitter follower). I didn't quite get if voltage doesn't also dim right, so my last card in the sleeve would be a circuit that you turn a knob and it alters the voltage on the base of a transistor, and then you have a current source which can dim the LEDs, as every LED that is dimmed has this type of circuitry.
Originally, all the gauges were VDO SingleViu gauges. As it turns out, the VDO SingleViu tachometers are not compatible with Yanmar engines... They will/did not give accurate engine rotational speed. We trouble shot with tech support from Yanmar and VDO for several weeks before determining the two are not compatible. Thats when we went from VDO tachs to Yanmar tachs. The Yanmar tachs are 100% analog and work as they should. There are many other factors as to why we didn't switch all the gauges to Yanmar and in hindsight, we should have.
Thats why there are 2 kinds of gauges in the instrument panel.

To your 2nd comment, the VDO gauges are not designed in a way that allows the backlight to be dimmed using the illumination circuit. That circuit can only turn the backlight on and off at a definable (0.5 to 7.5V) threshold.

Hi,

Yes there could be a lot of different solutions but what we really need to see i think is some waveforms of how it is being controlled right now before any modifications. We need to know the required spec's first.
Since the gauges are not designed to be dimmed using the illumination circuit, the only other way for them to dim in our setup is by using a PWM to J1939 converter and map the CAN output of the converter to the required PGN of the gauges illumination function.
When we had the VDO tachs, they were the large models with onboard pushbutton dimming that could control the smaller gauges illumination level. Now that we have the Yanmar tachs, that functionality is gone.

If we decide to install the J1939 interface, I will use a simple voltage divider to get the PWM voltage under 10V to inject into the interface.
 

kiroma

Joined Apr 30, 2014
80
To your 2nd comment, the VDO gauges are not designed in a way that allows the backlight to be dimmed using the illumination circuit. That circuit can only turn the backlight on and off at a definable (0.5 to 7.5V) threshold.
Sorry, minutes ago I read it all again from the top and saw that I said something that wasn't anymore useful.
I don't know to help further, as I don't have almost any knowledge about this protocol.
 
Top