| Electronics > Beginners |
| Use transistors to switch between two signals |
| << < (3/6) > >> |
| Jwillis:
Why couldn't he use a simply inverter circuit? The two out puts could be used to switch two more transistors to pass the two inputs to one depending on whether the input to inverter is high on low. |
| tron9000:
--- Quote from: gbuilder on April 19, 2018, 09:38:11 pm --- --- Quote from: Hero999 on April 19, 2018, 12:13:17 pm --- If it's just one channel, then a quad NAND can be used. It will be slightly slower, than an analogue switch, but it has the advantage of being buffered. --- End quote --- Would you mind talking me through the operation of the circuit you showed here? It looks to me like the decision of which input is connected to the output will depend on the state (high/low) of the input signals. In my relay circuit, the selection of which input signal is connected to the output is completely determined by the control pin. Forgive my slow comprehension, this is why I'm always tempted to use relays - their operation is so simple :D ! --- End quote --- First off, truth table for NAND Gate: 0 0 = 1 0 1 = 1 1 0 = 1 1 1 = 0 the switch dictates which signal will be passed to the output. When the switch is closed, the signal to the gate connected to 2 goes high, Any state change on pin 2 will be passed to that gates output. With the switch still closed, the gate with both pins tied together inverts the signal from the switch, thus there is a low signal to gate for pin1 and any state change on pin 1 will be blanked (output will always be 1). so at the final output gate, one input is high (from gate 1) and the other input is changing state and so the output changes state according what is present at 2. open the switch and everything swaps, the output now changes state WRT pin 1. The reason Hero999 has show using NAND gates are that NAND gates are/were easier to obtain and produce, Cheaper than AND counterpart, and come in Quad DIP packages: 74LS00 though it'd be easier to explain this with AND gates. Hey, life gives you lemons... |
| boffin:
--- Quote from: Hero999 on April 19, 2018, 12:13:17 pm --- --- Quote from: boffin on April 19, 2018, 11:29:48 am --- --- Quote from: ogden on April 19, 2018, 11:08:06 am --- --- Quote from: gbuilder on April 19, 2018, 10:09:22 am ---I'd now like to understand if it is possible to use transistor circuit to switch between two different signals. --- End quote --- Indeed it is possible. After all digital chips are made out of transistors :) I suggest you to skip transistor switch build, just learn multiplexers. Better invest your time into something more useful :) https://en.wikipedia.org/wiki/Multiplexer What you want is 2:1 SPDT switch (multiplexer), like http://www.ti.com/product/cd4053b that chip have 3 switches inside. --- End quote --- Actually the 4053 is a single 1P8T switch (pick one of 8), fed from a 3-bit number Where as the 4066 might be more useful (and easier to find). Four individual SPDT switches http://www.ti.com/product/CD4066B --- End quote --- No, '4053 is three SPDT switches. Of course you're right. My bad is I looked at the datasheet for the 4051 (which was the original PDF referenced) which is a 3 to 8 1P8T switch and to make matters worse, I had a complete brain-fart thinking the 4066 was double throw. I'll stick to typing only when I'm awake. 4053 will work nicely, but I typically keep 4066s on hand, so I'd probably just glue a couple of channels together to make what the OP was talking about. --- End quote --- |
| hamster_nz:
--- Quote from: gbuilder on April 19, 2018, 10:09:22 am ---Hello, I'd now like to understand if it is possible to use transistor circuit to switch between two different signals. Specifically, I'd like to find a circuit which will perform the same function as my relay switching circuit below. In this case, the MCU digital output state determines which signal from the inputs is connected to the output. --- End quote --- I don't think that that circuit actually will work as you expect. It seems impossible to turn the relay on. A wire from IN1 to OUT is all you need to perform the same function. Typical internet - even when you supply a circuit schematic, nobody looks at it! :-// But being serious now, you might have been meaning this circuit, as rendered in DaveCAD on scrap paper (please ignore that in and out are transposed): |
| gbuilder:
tron9000 thank-you for the clear explanation. My confusion was that I was thinking of the signals as analogue. CLearly this is a solution suitable for digital logic signals. hamster_nz yes sorry, I must admit I haven't checked the circuit in SPICE or on the breadboard. Another rookie mistake. With NPN transistor switch, for predictable behaviour the load should be between the positive supply and the collector, not between the emitter and ground. |
| Navigation |
| Message Index |
| Next page |
| Previous page |