1
\$\begingroup\$

I need to implement a circuit but Im having some trouble since Im novice on electronics.

I have 4 inputs. A being ON/OFF switch. B is an Inibitor. C is an Emergency and D is not an adequate ocasion.

In order to turn off the lamp I have to meet 2 conditions.

  • Condition 1: Switch is ON (A), Inibitor is OFF (B) and the ocasion must be adequate (NOT D).
  • Condition 2: Emergency is ON (C). This one is independent and will always turn on the light as long as it is activated.

schematic

simulate this circuit – Schematic created using CircuitLab

I did this schematic. NOR only outputs 1 when both are 0, which means INIB off and D is adequate. Then join with On from Switch with AND and light is ON.

This is represent by A(NOT)B(NOT)D. Now I only need to add the C variable which is independent.

The final equation is A(NOT)B(NOT)D + C. Am I thinking right? Sorry if this sounds stupid but Im still learning and a bit confused!

Thanks in advance.

\begin{array} {|r|r|}\hline C & A & B & D & X \\ \hline 0 & 0 & 0 & 0 & F \\ \hline 0 & 0 & 0 & 1 & F \\ \hline 0 & 0 & 1 & 0 & T \\ \hline 0 & 0 & 1 & 1 & T \\ \hline 0 & 1 & 0 & 0 & F \\ \hline 0 & 1 & 0 & 1 & F \\ \hline 0 & 1 & 1 & 0 & T \\ \hline 0 & 1 & 1 & 1 & T \\ \hline 1 & 0 & 0 & 0 & T \\ \hline 1 & 0 & 0 & 1 & F \\ \hline 1 & 0 & 1 & 0 & T \\ \hline 1 & 0 & 1 & 1 & T \\ \hline 1 & 1 & 0 & 0 & F \\ \hline 1 & 1 & 0 & 1 & F \\ \hline 1 & 1 & 1 & 0 & T \\ \hline 1 & 1 & 1 & 1 & T \\ \hline \end{array}

\$\endgroup\$
10
  • 1
    \$\begingroup\$ As with almost all questions about logic circuits: Start with a truth table! Usually, a truth table is the best representation for logic functions. \$\endgroup\$ Nov 10, 2019 at 16:48
  • \$\begingroup\$ See how to draw a truth table here: electronics.stackexchange.com/questions/466625/… and how to write the equations here: electronics-tutorials.ws/boolean/bool_6.html and more links on that page. \$\endgroup\$
    – Transistor
    Nov 10, 2019 at 16:51
  • \$\begingroup\$ off the light as long as it is activated. This is negative logic or an inverted condition for positive logic. All discrete power switches are inverting unless used on low side then double inversion or then positive logic. For your simple logic Y out = C! + the rest meaning C not or inverted C \$\endgroup\$ Nov 10, 2019 at 16:51
  • 1
    \$\begingroup\$ vader< is active =1 or 0? \$\endgroup\$ Nov 10, 2019 at 16:53
  • 1
    \$\begingroup\$ @TonyStewartSunnyskyguyEE75 I made a typo. I mean to say as Long as C is activated, light is always on! Sorry. \$\endgroup\$
    – lordvader
    Nov 10, 2019 at 17:00

2 Answers 2

0
\$\begingroup\$

Yes, you are thinking correctly. You "just" need to OR the emergency input:

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
1
\$\begingroup\$

You have so many ways to do it, depends on your constraints.

Let's say you work with 7400 TTL gates and you want to minimize the number of chips.

But first you have to clarify what you really want.

I have 4 inputs. A being ON/OFF switch. B is an Inibitor. C is an Emergency and D is not an adequate ocasion.

In order to turn off the lamp I have to meet 2 conditions.

Condition 1: Switch is ON (A), Inibitor is OFF (B) and the ocasion must be adequate (NOT D).

Condition 2: Emergency is ON (C). This one is independent and will always turn on the light as long as it is activated.

There are so many negations in there you're getting yourself confused. I will assume you do not have a hidden parameter still, i.e., being a signal light, a condition in which the signal light should light up. Then you can override and turn it off by switching ON the override switch A, if the following conditions are met:

  • it's not an emergency, E = false
  • it's not an otherwise inadequate situation to turn lamp off, D = false
  • the light-off-inhibitor B is not on, B = false

And now written this way you notice that when any of the B, D, or E are true, then the light is on, L = true. So that means B, D, and E are simply OR-ed together to turn L on.

Otherwise switch A on/off is just inverted to light off/on. So if you invert that switch also, you have all 3 conditions OR-ed together and you can simply say:

L := (NOT A) OR B OR D OR E

So you can put these together with a 74LS32 quad 2-input OR gate:

L := ((NOT A) OR B) OR (D OR E)

schematic

simulate this circuit – Schematic created using CircuitLab

and you have used 3 of the 4 OR gates in the chip. Since A is a switch, and not a signal, you can get the inverted state of the switch without needing any other inverter.

You can try using only NAND gates but making only one OR requires 3 NAND gates already, so you do not gain anything.

Since you stated your conditions somewhat vaguely (not clear if "adequate situation to turn off" or "not inadequate situation to turn off" is positive or negative signal) but if you're going to need 2 chips, you might as well use the 74x32 and the 74x04 hex inverter, to be able to negate any of your inputs and output as needed.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.