Leds get brighter as pot turns?

Is it possible to associate each pot that I have on my board with an led that gets brighter and dimmer depending on the value the pot is sending out.  I am not sure if this is a hardware or a software thing, my knowledge in this area is limited.

Thanks

Ryan

That is a cool as s*** idea. :wink:

Maybe someone here could work out a way, but it does seem that since the DOUT register’s output pins are just an on/off (all or nothing) state, it would have to happen at the current limiting resistor stage, so it would probably involve additional circuitry as well as software (if it were under digital control). Maybe there’s a way a stacked (stereo) pot could do that, with one whole side dedicated to the LED’s resistance, and one to the regular AIN feed.

Good idea nonetheless,

George

although requiring extensive programming, you could add an aout to control the led(s) and use a stored value for the coresponding pot/encoder to determine the brightness level.

personally, i fail to see the practical usefulness of this idea (no matter how cool it is  ;)) as our eyes are not capable of accurately measuring absolute levels of brightness, so the feedback would be limited in its value.

If only a small set of brightness levels are required, you could do this via PWM - no additional hardware is required in this case, only a special PWM routine which can be included into the application.

I read an article about a clever PWM method for an optimized LED dimming some time ago, unfortunately I forgot the link… :-/ The idea was, not just to change the duty cycle in order to dimm the LED, but to run special sequences of pulses to avoid the typical “flickering” effect.

Best Regards, Thorsten.

sounds intriguing, how can it work? surely if you alter the spacing of the pulses, you’d notice ‘gaps’??

what about capacitors switched parallel to the LEDs?

this could avoid flickering…

ah yes, hadn’t thought of that… :-[

hmmm it would seem that my idea is out of my bounds, perhaps if someone else does it first then I might be able to implement it.

if we all thought like that fella, we’d still be in cave hitting rocks with sticks… ;D

Yeh and music would be better  ;D

Don’t worry too much about those ‘gaps’ when you use PWM… Human persistence of vision will take care of much of that…

Human persistence of vision will take care of much of that…

true, however: epilepsy can, and will, take you down…

True.

…capacitor…

(and for additional information concerning the human eye:

http://en.wikipedia.org/wiki/Eye#Other_articles_regarding_eye_anatomy)

matthias

If these were actual potentiometers, one could connect the wiper (which also would go to the AIN module) to an opamp (set to a gain of 1, just acting as a buffer), and run the output of that through an LED and resistor.

Using a digital encoder would require a MIOS-based solution, as covered above.

It seemed to me like you would be able to do that.  But oh well, I have heard of another solution, I can’t quite remember the specifics right now, but I will look into it.

Hi,

I would suggest simply using a stereo Pot.

Wire one channel to the Ain, the other to the led.This should work

Best

Alex

hey, good idea  :smiley:

and now to complete the Pot-LED-Idea:

A red-green-LED !

by turning the pot in a certain direction the colour changes from red over yellow to green and vice versa!

should be quite easy to to:

+5V connected to the middle pin of the pot

pot-pin-1 connected  to the red anode of the LED and pot-pin-3 connected to the green anode of the LED. LED-cathode goes to gnd.

matthias

these are damn good ideas guys, I will try to implement them when i get some time!

thanks a lot.

There is no option like to Tie all ground connections for all(one group of) leds into single line and pass it trough a 5k(or whatever) pot?

(edit: notify of replies -> ON)

hey, good idea  :smiley:

and now to complete the Pot-LED-Idea:

A red-green-LED !

by turning the pot in a certain direction the colour changes from red over yellow to green and vice versa!

should be quite easy to to:

+5V connected to the middle pin of the pot

pot-pin-1 connected  to the red anode of the LED and pot-pin-3 connected to the green anode of the LED. LED-cathode goes to gnd.

matthias

That’s a brilliant idea. I’m gonna use this for my box too, if you don’t mind :wink: