dominik Posted January 21, 2005 Report Share Posted January 21, 2005 Hello!A question from someone who does not knwo much about electronics...I supplied each switch of my MidiBox LC with its own LED. Unfortunately, there are not enough DOut pins available to control them by MIOS.For those, that otherwise would be always off, I would like to have the LED on when the button is pressed. Am I right that this is simple to realise, if I just replace the resistors on the DIn board by 220 (like in DOut) and put the LED between ground and the DIn connection? Or do I oversee something?Best regardsDominik Quote Link to comment Share on other sites More sharing options...
seppoman Posted January 21, 2005 Report Share Posted January 21, 2005 For those, that otherwise would be always off, I would like to  have the LED on when the button is pressed. Am I right that this is simple to realise, if I just replace the resistors on the DIn board by 220 (like in DOut) and put the LED between ground and the DIn connection?NO! The resistors on the DIN are so-called Pull Ups, they´re needed to keep the inputs on a logic High by supplying a "symbolic" connection to +5V as long as the button is not pressed (10k is a very high resistance, so no real current will flow). If you replace the 10k resistors by 220, the DIN probably won´t detect the on/off state of the buttons anymore and it could also be that the inputs will be damaged (not sure). Best solution would be to have switches with dual function. So you could leave the DIN alone and put the second "switch" between a separate line (+5)-(220)-(switch)-(ground).seppoman Quote Link to comment Share on other sites More sharing options...
dominik Posted January 21, 2005 Author Report Share Posted January 21, 2005 Thanks for the immediate reply. Although I do not understand you completely...If I am right:1. The input pins of the shift registers have high impedance. That means, there will flow nearly no current through the IC. It only measures the potential difference. This will be 5 V if the switch is not closed - independent of the resistor value.2. A pull-up resistor is only needed to prevent a shortcut between Vss and Vdd if the switch is closed. As an alternative to use a resistor with high impedance I could also employ an LED with a suitable 220 resistor, can't I?May be I forgot something Best regardsDominik ??? Quote Link to comment Share on other sites More sharing options...
Julian Posted January 21, 2005 Report Share Posted January 21, 2005 NO. a pull up resistor is something different.the input pins of the IC have to be in a defined state.So they are on a logical high, when the button is pressed ) and a logical Low when no button is pressed.The pull up resistor is needed to give the Pin of the IC a defined state, when no button is pressed.Whith the pin hanging in the air, you don't know (and either the IC) if the logical state of the pin is High or Low...am i right? Quote Link to comment Share on other sites More sharing options...
sjakie Posted January 22, 2005 Report Share Posted January 22, 2005 I'm no electronics genius either, but you could always add a little electronic switch with a transistor and some resistors that switches on, on 0 volt level. These transistor types are called PNP.Here is a link that explains it for you http://www.kpsec.freeuk.com/trancirc.htm#pnp Quote Link to comment Share on other sites More sharing options...
TK. Posted January 22, 2005 Report Share Posted January 22, 2005 I'm no electronics genius either, but you could always add a little electronic switch with a transistor and some resistors that switches on, on 0 volt level. These transistor types are called PNP.Here is a link that explains it for you http://www.kpsec.freeuk.com/trancirc.htm#pnpThis is exactly the way how I would do it :)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
dominik Posted January 24, 2005 Author Report Share Posted January 24, 2005 Thanks for all the suggestions.I guess, what you mean is shown by the following diagram:Is this correct? Is there an easier way to do it? What transistor is suitable?I guess, the main problem with my proposal (sketched below), is that the voltage dropage of the LED is not sufficient for detecting a logical "0"?Am I correct or is there another problem in my diagram?Thanks for your patience with an electronic newbie... Quote Link to comment Share on other sites More sharing options...
TK. Posted January 28, 2005 Report Share Posted January 28, 2005 Both assumptions are correct!Best Regards, Thorsten. 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.