LED's, zener diodes, and PWM

Just a quick question I have, if I were to get 5 zener diodes, 1 for 1vdc. 1 for 2vdc and so on up to 5vdc. And connected a led to each of them would they light up according to PWM frequency or no?

No, because PWM is not a varying voltage.

A PWM output is either 0volt or 5volt, with varying times between the two states.

25% of the time 'on' and 75% of the time 'off' could show 1.25volt on a slow/averaging DMM.

Or you see a LED is 'dim', but is is really flashing 100% for 1/4 of the time.
Leo..

That's what I figured but I figured I'd ask anyway. Thank you wawa

It might work if you fit an RC smoothing circuit onto your PWM output. However it's the duty cycle that you need to consider, not the frequency.

As the duty cycle ON time increases the capacitor voltage will tend to rise (any zener/LED conduction will influence this rise). Assuming you have one end of the zeners connected to the capacitor and the other to the LED current control resistors, then as each zener is 'turn on', by the voltage sum of zener + LED forward voltage, the relevant LEDs will illuminate. Note however the lowest voltage for which such a circuit will function will be that of the LED plus whatever zener is attached - so probably around 2 volts.

A shift register (74HC595, etc.) or addressable LEDs might be easier than a micky mouse solution with zeners.

It seems you want to convert a frequency to a LED bar graph.
Tell us more about your project.
Leo..

At wawa, I really don't have a specific project in mind. Maybe something to indicate fuel level or temp. it was just a question to gain affirmation.
I've got a few projects brewing for my car (71 Dodge Dart) but nothing started.