Switching between two channels using a multiplexer

First, I apologise for not posting this under 'project guidance'. I couldn't get it to post there. Whenever I post in that forum, I seem to sign out automatically.

On to the issue: I'm trying to build a circuit that switches between two signals, for 20 something outputs. So, I deliver the 20 inputs and the 20 outputs take on either the one or the other signal. Google seems to point me to the 4066 or a 74HC244.

This post sums it up nicely

Reading the datasheets of the 4066, I can't figure out where I put my two input signals. As I understand it now, I apply one of the signals to each of the four input (Y) pins and my selection to the enable. Then, on a second 4066 I apply the second signal and use the inverse of my selection to the enable. Correct?

I'm a bit confused by this, as this seems more like 'channel selection' rather than 'channel switching'. Also, it seems like a circuit this could be solved in a single package.

I'm thinking along the lines of:

Does this exist? And in case the 4066 actually does this, what am I missing?

Is there an IC which does this

I meant to post this picture, but the forum gave me a warning that I went over the 9000 character limit (jeez, what is up with the bugs?)

I was thinking along the lines like this:

Is there an IC like this?

this drawing shows in details

4066-quad-bilateral-switch-circuit.png

No, it does not sum it up nicely!

You failed to explain what you are needing to do.

Are these "signals" digital or analog?

The 74HC4066 (the CD4066 being generally obsolete) is needed to multiplex analog signals. It can also multiplex digital inputs. But what you presumably want amongst your muddled description is something like one or more 74HC4051/2/3 (change the last digit in the URL).

Ah! Update!

AndereSpeler:
I meant to post this picture, but the forum gave me a warning that I went over the 9000 character limit (jeez, what is up with the bugs?)

That limit refers to placing text into the posting itself, not attaching something.

AndereSpeler:
I was thinking along the lines like this:

So you attempted to post a nonsensical URL which was 9000 characters long! :roll_eyes:

AndereSpeler:
Is there an IC like this?

That is clearly wrong. You only multiplex inputs many to few. You do not multiplex outputs few to many, you simply connect one source to all the outputs it will feed and the devices connected to the output determines whether to use the data or not. Alternatively each output individually uses a multiplexer to select which input it reads.

You need to better explain what you are attempting to do! :grinning:

Please Paul,

I appreciate the time you clearly put in to answer me, but try to be less controntationally. :roll_eyes:

  • English is not my first language. Sometimes I don't grasp the nuances not as well as you do.

  • This is a beginners forum. If analog/digital made a difference in this case, I am one of the many people who were unaware of this. I'm dealing with a PWM signal for a SG90 servo motor (50HZ). I want to switch 20 servos in one position or the other.

Update: apparently a picture is more clear than 9000 words.

Anyway, yes the 74HC4053 would be more in line with what I am looking for. Although working in sets of 4 bits would be nice.

My confusion stemmed from the many similar questions (often related to driving a servo) and often the 4066 is mentioned. Looking at the diagram, I failed to see how a (single) 4066 could solve the issue at hand. I thought I was missing something. Thanks to 79GalinaKorczak I'm confident I wasn't.

That is clearly wrong. You only multiplex inputs many to few. You do not multiplex outputs few to many, you simply connect one source to all the outputs it will feed and the devices connected to the output determines whether to use the data or not. Alternatively each output individually uses a multiplexer to select which input it reads.

My apologies if my 30 second drawing was unclear. I had the 4066 in mind. I supposed that each of the four enables would select between the channels and places it on its own output, indicated by the number. (2:1 MUX, 4 channels). I even added a ground and Vcc to keep the pendantic ones as bay :grinning:

Keeping on trying keywords I came up with the 4 channel 2:1 MUX. I think this is what I'm looking for: I need 20 2:1 Muxes for a digital signal, in as few packages as possible.

Report closed NFA.

Highlighting words is NOT a crime.

"I need 20 2:1 Muxes for a digital signal, in as few packages as possible."

So you have 20 servos, they are to receive 20 different control signals from 20 sources (such as a Mega)? And then all 20 receive 20 different control signals from a different set of 20 sources (such as a 2nd Mega)?
I would think 3 8-channel buffers with output enables would work great, without the on-resistance of the '4053 to deal with.
Example: 74HC541 which has all inputs on one side of the package and all outputs on the other side of the package.

CrossRoads:
"I need 20 2:1 Muxes for a digital signal, in as few packages as possible."

So you have 20 servos, they are to receive 20 different control signals from 20 sources (such as a Mega)? And then all 20 receive 20 different control signals from a different set of 20 sources (such as a 2nd Mega)?
I would think 3 8-channel buffers with output enables would work great, without the on-resistance of the '4053 to deal with.
Example: 74HC541 which has all inputs on one side of the package and all outputs on the other side of the package.
https://www.ti.com/lit/ds/symlink/sn74hc541.pdf

Yes!
Thanks a lot

In surface mount, 2 of these will give 4 x 10 bit buffers.

Pricey tho
https://www.digikey.com/en/products/detail/texas-instruments/SN74ABT162827ADLR/1575248

Whoops!

Qty 2 CY74FCT162827ATPVC (2 x 20 signals) $3.56

Qty 6 SN74HC541DW (2 x 24 signals) $4.62

Arg! I spoke too soon, the sn74HC541 wasn’t what I needed.

Basically what I need is something like the 74LVC1G3157 (but digital, and I learned today why that matters) and in a package as large as possible.

The component should be able to switch a pwm signal for a SG90 (1ms at 50Hz for 0°, 1.5ms at 50Hz for 90°) based on the 1 and zero that I send towards the board. The PWM signals are generated by 555 circuits. I have 20 something servos, so it would be nice if I hadn’t had to use several discrete components per motor.

So something like the 4066, but one that switches between signal A and signal B rather than signal A and high impedance.

This is the truth table for the component I am looking for (if it exists anyway), for 4 inputs:

Does such a component exist?

edit: Fixed the truth table

You would create the functionality of the 74LVC1G3157 by connecting 2 outputs of the buffer IC togeather. Then use OE1 and OE2 to switch from one source to another. Just make sure you don't enable both at the same time.