1
\$\begingroup\$

I have managed to work out a logic circuit with 3 inputs and 5 outputs, but I have no idea how to translate this into a circuit. I am guessing it will require IC's or many transistors.

The inputs are A, B and C, and the outputs are 1, 2, 3, 4 and 5.

Depending on the input state, the output should change as follows:

ABC - O
=======
000 - 3
100 - 1
110 - 2
010 - 3
011 - 4
001 - 5
111 - 3

And some pictures to help explain it (I hope)

A off, B off, C off = 3 on ---

A on, B off, C off = 1 on A--

A on, B on, C off = 2 on AB-

A off, B on, C off = 3 on -B-

A off, B on, C on = 4 on -BC

A off, B off, C on = 5 on --C

A on, B on, C on = 3 on ABC

\$\endgroup\$
5
  • 5
    \$\begingroup\$ The drawings you presented essentially are what we'd call a schematic diagram, although they're drawn in an unconventional style. You could just buy some ICs with AND, OR, etc., gates and wire them up according to your diagram. Or you could do some basic logic minimization to reduce the number of ICs you need to use. \$\endgroup\$
    – The Photon
    May 23, 2015 at 22:35
  • 1
    \$\begingroup\$ There are also techniques to use devices such as ROMs and multiplexers to implement arbitrary logic. If you explain more what you're actually trying to do we can give you more help. \$\endgroup\$
    – The Photon
    May 23, 2015 at 22:37
  • 1
    \$\begingroup\$ Generally we tend not to draw everything out from one point as it becomes hard to follow as you have seen. Instead, try drawing three vertical lines (one for each input), and then draw horizontal lines out from those to each of your gates. Where a horizontal and vertical line join, draw a small filled circle to indicate the connection. Also, a non-filled circle on the input or output of a logic gate generally means an inverter, which makes what is drawn above even more difficult to follow - but that is the fault of the software you used rather than you. \$\endgroup\$ May 23, 2015 at 23:22
  • \$\begingroup\$ I think its the software or webapp he's using. I think it does the wiring automatically...like that. \$\endgroup\$
    – efox29
    May 24, 2015 at 4:14
  • \$\begingroup\$ Thanks. I'm afraid I have no formal training in diagrams, so I apologise for any confusion. I used a website called logic.ly to create those diagrams. What this is for, is for a tracking security camera. The idea is that the 3 inputs are actual PIR's, not switches. And that the outputs are positrons on a stepper motor or solenoid to turn a camera to point in one of 5 positions: 0°, 45°, 90°, 135° and 180°. \$\endgroup\$ May 24, 2015 at 8:29

2 Answers 2

1
\$\begingroup\$

Converting a design "sketch" (which is really what you have drawn above) into a schematic involves three steps: finding real-world parts that match what you are trying to do, making modifications to the circuit based on the first step, and then drawing the schematic with some sort of schematic capture program.

For the last step, I am using the EAGLE program. They have a free version that lets you create schematics limited to one sheet, like this one.

Here is the schematic I ended up with based on your drawing:

enter image description here

I just happened to have picked gates in the 74LSxx family; I could just have well used 74HCTxx (more suitable when interfacing with microcontrollers and other CMOS logic), or some other logic family.

Note that the four AND gates on the right side of the schematic are now actually NAND gates (74LS00 2-input and 74LS12 3-input), this is because I have configured the lamps to be driven low to turn them using a low output. This is because the 74LSxx gates can sink about 8 mA of current, but can only source 0.4 mA.

We have to add an inverter after the 3-input NOR feeding the middle lamp since we can't easily turn it into an OR -- there is no 3-input OR in the regular 74LS00 family; they didn't bring one out until much later called the 74LS4075 which is not commonly available. (This where you have to make substitution based on what is really available.)

I didn't try to do any minimization of the logic and just converted the drawing as it is. There are plenty of questions on this site regarding logic reduction.

Another optimization step that can be made, besides logic minimization, is to optimally use as many gates in a package as possible. For example, there are six inverters in an 74LS04 package, and four NAND gates in a 74LS00 package. If you need for example seven inverters in a circuit, and have an unused NAND gate, you can make an inverter out of a NAND gate by tying both inputs together. There are scads of other tricks like this.

The resistors in series with the lamps are because the lamps are rated for 3v. The resistors drop 2v across them at 8 mA.

On the left side of the schematic, I have the three switches. They are also active low (when the switch is on, it grounds the resistor), so I have added an inverter at the output of each switch to make there outputs match your diagram.

\$\endgroup\$
2
  • \$\begingroup\$ I don't know why logic.ly added wings to the 3 input OR/NOR gates. In total, my drawing uses 2 NOT's, 3 "2 input" AND's, 3 "3 input" AND's, 3 "2 input" NOR's, 1 "3 input" NOR and 1 "3 input" OR gates. Regarding simplification, the software wouldn't let me connect multiple lines to a gate contact even though it did for the switches and lights. I presume the 2 NOT's could be replaced with 1 NOR if the output was then split? \$\endgroup\$ May 24, 2015 at 9:05
  • \$\begingroup\$ @Escribblings I didn't pay enough attention and see you had 2 2-input NOR's instead of OR's, same for 1 3-input. I've updated my schematic and the accompanying description. No, you can't replace the two NOT's with a NOR, that changes the logic. Thee must be two outputs. \$\endgroup\$
    – tcrosley
    May 24, 2015 at 11:35
0
\$\begingroup\$

Seems nice try. Instead of using logic gates you may use basic micro controller like 89c51. And also programming also not much difficult.

The things you need

1. Microcontroller
2. Toggle switch (for input )
3. Lights LED ( if u go for lamp need driver )
4. Other miscellaneous like crystal, reset button, power supply

In my view it looks like a simple and also economical one to build this circuit. And also you can change logics by simply changing the programming no need of changing connections.

\$\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.