# simplest off-chip analog switch logic

I’m making a small board that works with analog signals, but I’m mostly an analog dunce. If I were implementing this with a microcontroller, it’d be easy, but I’m trying to keep part count down and have no other need for the logic. To top it off, I can’t find my old Radio Shack circuit idea notebook, which I bet has this.

I have two analog lines A and B, and a digital control line C. What’s the simplest circuit that is equivalent to OUT = C? A : B? I bet someone here can do this in one NPN transistor and one resistor.

There’s a quad 2-channel version of the popular analog mux: the CD4551.

I bet someone here can do this in one NPN transistor and one resistor.

I bet anyone who could do that has been kidnapped and chained to a CAD system in a windowless room with a pizza slot in the door and no Internet access…

Hm, not finding much in English about that package-- Google knows it’s a chip, but who makes it?

Update: found a BU4551 from ROHM. Looking at it, and others in their catalog.

or this will do as well but it is 8 channel and you only want two:-
http://uk.farnell.com/nxp/74hc4051n/74hc-cmos-74hc4051-dip16-5v/dp/380910

Or the 4053 with three of what you want:-
http://uk.farnell.com/texas-instruments/cd74hc4053e/ic-logic-74hc-decoder-demultiplexer/dp/1607680
It says logic on the page but it is analogue honest.

Not quite one transistor and one resistor, but close:

This should implement OUT = C ? A : B, or “The output is A if C is true, else the output is B”. I designed this circuit based off of this NOT-gate implementation:

http://www.electronics-tutorials.ws/logic/logic_4.html

Instead of switching a steady DC voltage, I am instead switching the analog outputs into a single output (the resistors will attenuate the signals, of course, so that needs to be taken into account). Reverse feedback of one output or the other into the emitter of the opposite transistor shouldn’t be a problem (IIRC, the transistor will block it, like a diode).

I haven’t built this circuit, however, so I really don’t know if it will work or not, but I do believe the idea is sound…

I hope this helps, and good luck - oh, and could somebody unchain me from this CAD workstation?

I haven’t built this circuit, however, so I really don’t know if it will work or not, but I do believe the idea is sound…

Well considering you show the output signal wired to ground implies that you haven’t built it yet. ;D

Lefty

Lefty:

Yeah, I was definitely not thinking right on that circuit - that isn’t the only problem with it.

It won’t work the way it is designed because of that, but also because the control input C would drive the transistors to saturation, effectively making the output a high or a low (and then of course it would all go to ground - I totally missed that)

I suck at analog design, obviously; I always have thought it to be a “magic art” (especially RF).

I still think somehow that the OP’s idea can be done with some transistors and resistors, though - I am still thinking on it. Obviously, the outputs A and B need to go into the base of the transistors, their outputs from the emitters, and somehow those outputs need to be switched on and off via C, and you can’t do it with diode logic because they are (possibly?) AC signals (hmm - maybe I need to rethink this: will they necessarily be AC signals, or just 0-x volt DC signals?)…

I have a feeling that this might be able to be done with maybe a diff-amp or two - but then that doesn’t meet the challenge of only a few “normal” components…