"Multiplexing" an external digital signal with Arduino digital signal to single output

I'm looking for a way to switch an external digital signal and an Arduino digital signal to a single output using only one additional pin on the Adruino. I want to use small, but non-smd components and keep it as simple and robust as possible. Also ideally not compromise digital signal timing.

The external source would be less than 1kHz square wave - more like 100Hz. The Arduino signal would be up to about 5kHz.

This is what i'm thinking conceptually:


Basically using the transistor/inverter circuit to switch each optocoupler on and off through Arduino digital pin on or off.

I haven't been able to find any DIP package 2:1 multiplexers or small OR gate chip packages that achieve what I want in a single package. Have I missed a better solution in this space?

Thanks in advance for any guidance.

Another option using a standard DIP quad nand.

Any other ideas?

Sounds like you're looking for a data selector.

Thanks @dougp . These data selectors look a bit like a streamlined version of the quad-nand circuit I have above. I'd be much happier with the data selector being more a compact (8pin vs 14pin) solution.

That's if I can find an 8 pin DIP version.

The TI Logic Pocket Data Book includes several small sized logic chips. But I don't know of a source for all the chips right now.

Can you provide a truth table for the circuit?
Is the external signal at logic level?

That may be more difficult. You would need to synchronise the signals in some way before the logic circuit. So if the external signal is stochastic you would need to synch the other signals with that.

I've worked on the concept a bit more today. As my external signal is at 3.3v, the data selector I've found works at 3.3v, and I can use an Arduino Pro Mini at 3.3v.

This is the data selector:

I'll just have to use a riser board to mount it.

My signals don't need to be synchronised.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.