i want to regulate three LEDs birightness.
llike this:
have a setpoint. from my defined range, take any value and subtract the setpoint then the greater the difference the bighter the led. for example, take 0 - 15 and setpoint be 6.
o - 5 : green led
6 - 10: yellow led
11 - 15: red led
then looking at my setpoint, one can see green brightness increases from 5 to 0, yellow increases from 6 to 10, etc.
I am not sure I understand. You have an input voltage range from 0 to 15 and want the green to increase in brightness from 0 to 5, the yellow from 5 to 10, etc.
The first idea I can come up with is to use three comparators. Thuis should be fairly easy using opamps. No need for PWM.
If you want to convert PWM to analog all you need is a low pass filter (RC) and maybe an amplifier.
I am not sure I understand. You have an input voltage range from 0 to 15 and want the green to increase in brightness from 0 to 5, the yellow from 5 to 10, etc.
The first idea I can come up with is to use three comparators. Thuis should be fairly easy using opamps. No need for PWM.
If you want to convert PWM to analog all you need is a low pass filter (RC) and maybe an amplifier.
i'm trying to say the greater the deviation is from the setpoint, the brighter the LEDs will shine!...thus the green one will shine as you go away from 6 to zero while the other two wiil shine as you go up from 6.
i think i have clearify my idea!
so i was thinking of the mcu internal PWM! i'm using avr mega16 in avr-gcc c compiler!
i'm trying to say the greater the deviation is from the setpoint, the brighter the LEDs will shine!...thus the green one will shine as you go away from 6 to zero while the other two wiil shine as you go up from 6.
i think i have clearify my idea!
so i was thinking of the mcu internal PWM! i'm using avr mega16 in avr-gcc c compiler!