Need simple switching solution from Vcc to Gnd (circuit board)?
I have hobbyist level electronic circuitry knowledge and am working on a project that I’m sure there is a real basic solution for that I just haven’t learned yet. I have an 8-bit encoder IC that requires Gnd for it’s low and Vcc+5 for high. I need to be able to switch them via a onboard DIP switch (on/off). A 3-way switch won’t work since I need to use the DIP switch. The only other thing I can think of is using relays which is not an acceptable solution for this project.
I figure there should be some way to use a transistors configuration to connect Vcc when present and connect to Grn source when 0v.
Any knowledge or links to specific pages that show this basic concept I am looking for.
Thanks
Tagged with: acceptable solution • dip switch • electronic circuitry • relays • transistors • vcc • way switch
Filed under: Simple Electronic Circuits
Like this post? Subscribe to my RSS feed and get loads more!
Use a resistor with one end to VCC and the other end to the input, and a switch with one end to the input and the other end to 0V. When the switch is open, the input will be at VCC. When the switch is closed, current will flow through the resistor to ground and the input will be at 0V.
The resistor can be several kΩ, since almost no current flows into or out of a logic gate input.
Use a BJT (bipolar junction transistor)
connect the collector to Vcc, also connect the encoder pin to Vcc. Connect the emitter to ground. Connect the dipswitch – one side to Vcc and the other to the base of the transistor.
When the dip switch is open the transistor is off, so the collector voltage is sitting at whatever voltage Vcc is and the encoder pin is Hi
When you flip the switch you apply Vcc to the base of the transistor turning it on and pulling Vcc to ground. Just use a 1K resistor in series with the collector and you should be OK, then you pull the encoder pin low.
Yup that there is hoe it dun