74HC157 mux design problems

AnalogKid

Joined Aug 1, 2013
10,987
Since all three used sections of the 157 are switching between GND and an input signal, they can be replaced by three AND gates. Also, I think the S and E pins are logically reversed.

TS - please post a logic table showing all possible combinations of 1A, 1B, 1Y, S, and E.

ak
 

sghioto

Joined Dec 31, 2017
5,379
Since all three used sections of the 157 are switching between GND and an input signal, they can be replaced by three AND gates. Also, I think the S and E pins are logically reversed.

TS - please post a logic table showing all possible combinations of 1A, 1B, 1Y, S, and E.

ak
With S connected to ground all 4 outputs follow the logic level of the 4 inputs 1A,2A,3A and 4A. E requires a logic low to activate.
SG
 

BobaMosfet

Joined Jul 1, 2009
2,110
Hi All,
I am designing a circuit with this mux and I ran into some problem.
My circuit is like this:
I am using this quad 2: 1 mux.
I have 3 signals from one uC_1 to control 3 relays and I have another uC_2 to read a temperature sensor.
When the sensor reaches a certain temperature this uC_2 sends a signal to shut down this 3 relays
so i am using a mux to mux the signals from this 2 uC.
The problem is the relays seems to switching continuously when connected.
I have E and S grounded.
IN: 2,5,11 and 14 (source 0)
OUT: 4,7,9 and 12 (Y0-Y3)
Appreciate if someone can find the fault.
//regards,Jay
You do understand that you need to use pull-downs or pull-ups as appropriate to prevent capacitive loading on pins controlling the relays, right? And what are you doing to bleed of the inductive energy from the relays?
 

sghioto

Joined Dec 31, 2017
5,379
You do understand that you need to use pull-downs or pull-ups as appropriate to prevent capacitive loading on pins controlling the relays, right? And what are you doing to bleed of the inductive energy from the relays?
Disagree, resistors not needed.
He shows diodes across the relay coils.
SG
 

Thread Starter

jaygonzo

Joined Jan 29, 2018
24
Hi,
The cathodes of the 4N35 are just connected to a led which is on another PCB. It just lights up when the relays are ON.
If I disconnect the 157N and connect the the relays,4N35 and the signals from the uC. there is no problem but I want to mux the signals from the second uC to shut down the relays due to the temp sensor. The other solution is to use 3 pins from the second uC to shut the relays.
But if i use the mux then I need only one pin to shut the relays.
//regards,Jay
 

Thread Starter

jaygonzo

Joined Jan 29, 2018
24
Hi,

The cathodes of the 4N35 are just connected to a led which is on another PCB. It just lights up when the relays are ON.

If I disconnect the 157N and connect the the relays,4N35 and the signals from the uC. there is no problem but I want to mux the signals from the second uC to shut down the relays due to the temp sensor. The other solution is to use 3 pins from the second uC to shut the relays.
But if i use the mux then I need only one pin to shut the relays.

I have a breadboard with the 157 and a relay soldered and the relay shows the same behavior on this circuit. On this I do not have the 4N35.


//regards,Jay
 

sghioto

Joined Dec 31, 2017
5,379
The other solution is to use 3 pins from the second uC to shut the relays.
But if i use the mux then I need only one pin to shut the relays.
Yes that is one way, but I am still asking why you can't just feed the output of the second micro to a input on the first micro to shut off all the relays using a software rewrite?
SG
 

Thread Starter

jaygonzo

Joined Jan 29, 2018
24
Hi,
I think there was some Grounding problem. It works now when I connect the same GND for all the 3 PCBs.
I think your idea is also good. I will try that too.
Thanks,
//regards,Jay
 
Top