sidetrack Posted September 17, 2006 Report Share Posted September 17, 2006 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 Quote Link to comment Share on other sites More sharing options...
Jidis Posted September 17, 2006 Report Share Posted September 17, 2006 That is a cool as s*** idea. ;)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 Quote Link to comment Share on other sites More sharing options...
Mr modnaR Posted September 17, 2006 Report Share Posted September 17, 2006 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. Quote Link to comment Share on other sites More sharing options...
TK. Posted September 17, 2006 Report Share Posted September 17, 2006 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. Quote Link to comment Share on other sites More sharing options...
Mr modnaR Posted September 17, 2006 Report Share Posted September 17, 2006 sounds intriguing, how can it work? surely if you alter the spacing of the pulses, you'd notice 'gaps'?? Quote Link to comment Share on other sites More sharing options...
SLP Posted September 17, 2006 Report Share Posted September 17, 2006 what about capacitors switched parallel to the LEDs?this could avoid flickering... Quote Link to comment Share on other sites More sharing options...
Mr modnaR Posted September 17, 2006 Report Share Posted September 17, 2006 ah yes, hadn't thought of that... :-[ Quote Link to comment Share on other sites More sharing options...
sidetrack Posted September 18, 2006 Author Report Share Posted September 18, 2006 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. Quote Link to comment Share on other sites More sharing options...
Mr modnaR Posted September 18, 2006 Report Share Posted September 18, 2006 if we all thought like that fella, we'd still be in cave hitting rocks with sticks.... ;D Quote Link to comment Share on other sites More sharing options...
stryd_one Posted September 18, 2006 Report Share Posted September 18, 2006 Yeh and music would be better ;DDon't worry too much about those 'gaps' when you use PWM... Human persistence of vision will take care of much of that... Quote Link to comment Share on other sites More sharing options...
Mr modnaR Posted September 18, 2006 Report Share Posted September 18, 2006 Human persistence of vision will take care of much of that...true, however: epilepsy can, and will, take you down.... Quote Link to comment Share on other sites More sharing options...
stryd_one Posted September 18, 2006 Report Share Posted September 18, 2006 True. Quote Link to comment Share on other sites More sharing options...
SLP Posted September 18, 2006 Report Share Posted September 18, 2006 ....capacitor.....(and for additional information concerning the human eye:http://en.wikipedia.org/wiki/Eye#Other_articles_regarding_eye_anatomy)matthias Quote Link to comment Share on other sites More sharing options...
AndrewMartens Posted September 18, 2006 Report Share Posted September 18, 2006 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. Quote Link to comment Share on other sites More sharing options...
sidetrack Posted September 21, 2006 Author Report Share Posted September 21, 2006 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. Quote Link to comment Share on other sites More sharing options...
Alkex Posted September 24, 2006 Report Share Posted September 24, 2006 Hi,I would suggest simply using a stereo Pot.Wire one channel to the Ain, the other to the led.This should workBestAlex Quote Link to comment Share on other sites More sharing options...
SLP Posted September 25, 2006 Report Share Posted September 25, 2006 hey, good idea :Dand 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 potpot-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 Quote Link to comment Share on other sites More sharing options...
sidetrack Posted September 27, 2006 Author Report Share Posted September 27, 2006 these are damn good ideas guys, I will try to implement them when i get some time!thanks a lot. Quote Link to comment Share on other sites More sharing options...
tos Posted October 2, 2006 Report Share Posted October 2, 2006 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) Quote Link to comment Share on other sites More sharing options...
Sinnsyk Posted October 3, 2006 Report Share Posted October 3, 2006 hey, good idea :Dand 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 potpot-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.matthiasThat's a brilliant idea. I'm gonna use this for my box too, if you don't mind ;) Quote Link to comment Share on other sites More sharing options...
SLP Posted October 4, 2006 Report Share Posted October 4, 2006 That's a brilliant idea. I'm gonna use this for my box too, if you don't mind ;)I think that this wouldn't be a DIY-forum if we wouldn't "steal" ideas from each other.Perhaps I will use a thing im my MB-SID (next project) which you've used first.But I don't know if it will work that easy as i've described it...you'll perhaps need an opamp... ???...and in case it works: post some pics in the forum :)matthias Quote Link to comment Share on other sites More sharing options...
moogah Posted October 11, 2006 Report Share Posted October 11, 2006 OOOOOOOH :DThis sounds like fun!As for the simplest solution I would just tap the input to the AIN with a transistor and resistor buffer to drive the LED. Simple, and is likely to work in most situations. However, this idea of using stereo pots and multicolor LED's is some good stuff! Without having a datasheet in front of me I would try to wire it up so that both sides of the LED get juice normally, and turing the pot from side to side shorts one end of the LED or the other. Add in a limiting resistor here and there and I think that would work without the need for buffers. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.