Can you help me convert my logic diagram to a breadboard? - Page 1
Forum section: electronics / beginners

author: JKThomas96
author_rank: Contributor
timestamp: December 15, 2016, 09:06:11 pm
content: EDIT - Apologised for the broken images. I have now updated them and they are now hopefully visible.I'd like to preface this by saying I missed 5 weeks of university due to illness and missed much of the course material, so my understanding is poor.I'm am doing a project where I was given this scenarioFrom there I was told to make a truth tableThen I was asked to write the output function from the truth table for each LEDGreen LED = C'B'A + C'BA + CB'A + CBARed LED = C'BA' + CB'A' + CBA'I was then asked to simplify these down using Karnaugh maps, which left me withGreen LED = ARed LED = A'B + A'CI was asked then to do a circuit diagram, the image below is what I have for that (it's a draft)Now my final task is to finally represent all of this on to a breadboard.The problem I have is I have never actually used a breadboard before. Lik I said I missed 5 weeks, the last time I had a lecture we were doing number conversion to and from binary, hexadecimal and octal.Now I find myself with a deadline tomorrow and a final task in which I have no idea what I need to do on the breadboard.Could somebody help me map this out on a breadboard? I am allowed to take a diagram from a program Fritzing to help me along.Sorry if I haven't been specific enough, I'll be very active in this thread so please ask anything if I've missed it!

author: Brumby
author_rank: Unknown
timestamp: December 15, 2016, 10:16:45 pm
content: First, we cannot see the attachments from the other forum, unless we "sign in", so we won't be able to comment on the first part of your exercise.I will just skip to the basics on breadboards....This is a typical breadboard:The connections inside are like this:(Partial cutaway)They are especially well suited to DIP ICs with 0.1" pin pitch and 0.3" spacing between rows of pins - where you would fit them like this:You will notice there are two sets of rails - one pair at the top and another at the bottom. They are often marked with coloured stripes - but not always. The colour of the stripes means nothing - unless you choose to give them meaning. The set of rails at the top is NOT internally connected to the set of rails at the bottom. Also - for "full size" breadboards, the rails are often split in two (as the break in the coloured stripes indicate) - but again, not always.Most component pins can fit in the holes - but big ones may not do so without stretching the contacts inside the breadboard. Small ones may not get good contact - especially if the particular hole has had big leads put into it beforehand.Interconnections are made using pieces of solid core insulated wire of a suitable gauge, where the ends have been stripped back by 5mm or so (telephone wire is good) or by using specifically manufactured jumper leads which have a moulded pin at each end.

author: JKThomas96
author_rank: Contributor
timestamp: December 15, 2016, 10:23:40 pm
content: Thanks you for the quick overview Brumby, definitely helpful in reinforcing what little knowledge I have already. The main problem I'm having is comprehending how I translate the sketch I have, on to a breadboard to meet the specifications.I'm finding it really difficult to figure out where each thing should go, this may be a basic circuit but after having no hands on with a breadboard I'm finding it very difficult to just jump in and complete it on the breadboard.

author: SL4P
author_rank: Super Contributor
timestamp: December 15, 2016, 10:26:53 pm
content: It's unlikely that anyone will do the job for you - how will you learn.But to help you along, Brumby has made a good start, and i can add one thing to make your life a little easier.Input A goes intotwo separate inverters- unnecessary. You can eliminate one of those inverters as theNOT Asignal is identical.

author: Brumby
author_rank: Unknown
timestamp: December 15, 2016, 10:29:04 pm
content: To build your circuit with the gates you have used in your diagram, you are going to need 3 ICs. (There are other techniques you can use to reduce the component count, but we will stick with the circuit as designed.Your next decision will be what family of logic you are going to use: TTL, CMOS, etc. Whatever you select, make sure all the ICs are from the same family, otherwise you could get really tied up in knots.You will need: one IC with at least two inverters, one with at least two AND gates, and one with at least one OR gate. This is easy - all the basic gate ICs come with multiple gates in the one package - and there are more than enough gates in one of each to take care of this exercise.

author: SL4P
author_rank: Super Contributor
timestamp: December 15, 2016, 10:29:21 pm
content: OP, to answer your question...Where do things go?You need the pinout/datasheet for the logic gates you're planning to use.You can't move any further until you have that basic info.Edit: Brumby beat me to it!

author: IanB
author_rank: Super Contributor
timestamp: December 15, 2016, 10:33:38 pm
content: One final thing:On the circuit diagram the logic gates just have logical inputs and outputs. But when you put actual ICs on the breadboard, each IC also needs a power supply before it will work. You will need to connect + and - wires from the battery or whatever is supplying the power to the appropriate pins on each IC.

author: rstofer
author_rank: Super Contributor
timestamp: December 15, 2016, 10:34:17 pm
content: What kind of gates can you use? I see Inverter, And and Or in your sketch and that's likely to take 3 difference devices.A pair of NOR gates will implement your function{(B+C)' + A}'The first gate creates the NOR of B and C while the second gate combines A.If my Boolean algebra doesn't fail me, that's all it takes to implement A'(B+C).A 7402 would work...

author: SL4P
author_rank: Super Contributor
timestamp: December 15, 2016, 10:36:35 pm
content: Quote from: rstofer on December 15, 2016, 10:34:17 pmI was thinking about that, but i doubt they covered mixed-use of logic in their first class!OP may be penalised for being a smartass ...! Hints at 'outside help'.

author: rstofer
author_rank: Super Contributor
timestamp: December 15, 2016, 10:39:39 pm
content: If you use the 7402, you need Vcc at pin 14, Ground at pin 7Inputs B and C on pins 2 and 3 (in either order).Jumper between pin 1 (output of first NOR) to pin 5 (one input of second NOR)Signal A on pin 6 (second input of second NOR)Output on pin 4Here's a datasheet for the logic only (see page 2). You probably won't use this exact device but the pinout is standardized.http://www.nxp.com/documents/data_sheet/74HC_HCT02.pdf

author: Brumby
author_rank: Unknown
timestamp: December 15, 2016, 10:39:58 pm
content: Quote from: SL4P on December 15, 2016, 10:29:21 pmI was going to add this one more bit of info - which should make the next steps a lot easier...For an inverter chip:This is for a TTL chip - but TTL is fussy about supply voltage and this might become an issue. CMOS is more flexible, but it has it's own idiosyncrasies.Last hint....the basic packages will hold 6 inverters, 4 AND or 4 OR gates. Search for them like this:TTL hex inverterCMOS quad and gate...etcThis will give you chip numbers and from those you can find pinouts and datasheets.

author: IanB
author_rank: Super Contributor
timestamp: December 15, 2016, 10:40:43 pm
content: Quote from: JKThomas96 on December 15, 2016, 10:23:40 pmKeep in mind that the layout of components and wires on the breadboard does not have to look as "neat" as your circuit diagram. A breadboard layout can (and often does) look like a tangle of wires. As long as you connect the right nodes together with jumper wires and avoid accidentally shorting the wrong nodes together, your circuit will work.

author: IanB
author_rank: Super Contributor
timestamp: December 15, 2016, 10:43:19 pm
content: Quote from: rstofer on December 15, 2016, 10:39:39 pmAlso, it won't be obvious unless you already know it, but "VCC" refers to "+" and "GND" refers to "-" when you are connecting the power supply.

author: Brumby
author_rank: Unknown
timestamp: December 15, 2016, 10:43:41 pm
content: Quote from: SL4P on December 15, 2016, 10:36:35 pmMy thoughts exactly.For someone asking questions at this level, reworking the logic to reduce chip count is a bit advanced - and may cause great confusion. They should start simple and get something working first - before getting all sophisticated.

author: JKThomas96
author_rank: Contributor
timestamp: December 15, 2016, 10:44:17 pm
content: Quote from: rstofer on December 15, 2016, 10:34:17 pmShould have included that in the original post, I can only use NOT, OR and AND gates in my circuit.

author: rstofer
author_rank: Super Contributor
timestamp: December 15, 2016, 10:44:41 pm
content: Quote from: SL4P on December 15, 2016, 10:36:35 pmThat's the problem with not having the full story. If they were working with Karnaugh maps, why wouldn't they already have dabbled in Boolean algebra? But, you're right, it's possibly the wrong solution. But the original solution takes 3 packages and a lot more wires...But I like the solution, the Truth Table was MADE for that solution. It was specifically MADE for NOR gates even though they are seldom used (or at least I seldom used them). I prefer sum-of-products with NAND gates but there is no reason not to use product-of-sums with NOR gates when the Truth Table is fairly screaming NOR, NOR...

author: JKThomas96
author_rank: Contributor
timestamp: December 15, 2016, 10:45:50 pm
content: Quote from: rstofer on December 15, 2016, 10:39:39 pmThanks for the help but unfortunately I am only able to use AND, NOT and OR gates in my circuit.

author: SL4P
author_rank: Super Contributor
timestamp: December 15, 2016, 10:47:01 pm
content: OK, OP... you have a lot to work with!3 chips, a power supply, LEDs and a bunch of wires.Over to you.

author: JKThomas96
author_rank: Contributor
timestamp: December 15, 2016, 10:48:36 pm
content: Quote from: SL4P on December 15, 2016, 10:47:01 pmsweats furiouslyThank you for the tips so far, going to have a go with Fritzing and see if I can get something going. I will post back here when I have had my first attempt so you call all laugh at me.

author: IanB
author_rank: Super Contributor
timestamp: December 15, 2016, 10:49:11 pm
content: Quote from: JKThomas96 on December 15, 2016, 10:45:50 pmSure, but if you find the ICs that contain AND, OR or NOT gates, they will have similar diagrams showing how the gates are connected to the IC pins.

author: rstofer
author_rank: Super Contributor
timestamp: December 15, 2016, 10:52:24 pm
content: Quote from: JKThomas96 on December 15, 2016, 10:44:17 pmYup! Getting the whole story in the first post saves so much time...Nevertheless, the Inverter, And, Or solution takes 3 packages and it can be done in 2 even without using NOR gates.How? You build NOR gates by using OR gates and Inverters.Form B OR C and run it into an inverter - you now have B NOR CTake the inverter output and run it into another OR gate along with A and run the output of that NOR through a second inverter and you're done.But whether this more minimal solution is appropriate depends entirely on how far your class has progressed. There's nothing wrong with the original solution except that it takes at least one more package. Not a big deal, really. I just love Boolean Algebra and minimization. But it's not my class!

author: SL4P
author_rank: Super Contributor
timestamp: December 15, 2016, 10:55:16 pm
content: DONT CONFUSE HIM,The poor OP didn't even know what a breadboard and chips were.

author: rstofer
author_rank: Super Contributor
timestamp: December 15, 2016, 10:56:49 pm
content: Quote from: IanB on December 15, 2016, 10:49:11 pmGoogle for:7404 Hex Inverter7408 Quad AND7432 Quad ORhttp://www.ti.com/lit/ds/symlink/sn74s04.pdfhttp://www.ti.com/lit/ds/symlink/sn74ls08.pdfhttp://www.ti.com/lit/ds/symlink/sn7432.pdf

author: SL4P
author_rank: Super Contributor
timestamp: December 15, 2016, 10:58:22 pm
content: Any volunteers to patch in the jumper wires for him?I'll hold the breadboard still!

author: Ian.M
author_rank: Super Contributor
timestamp: December 15, 2016, 11:06:29 pm
content: Also, LEDs need series resistors. If you are using 74xx00 series 5V logic, 470R is a good choice, it will give 5mA through most red or green LEDs (not blue as they have a higher forward voltage). If you are using 4000 series CMOS logic at 12V, try 1.8K, at 9V try 1.2K.If you don't use a series resistor you can damage the LED and/or the logic gate.Bipolar TTL (7400, 74S00, 74F00, 74LS00 etc.) isn't very good at sourcing current so its usual to wire the LED + resistor between +5V and the gate output, which must be inverted i.e. low lights the LED.CMOS (4000 series and any 74xx with a C somewhere in the middle of its part number) sources current as well or nearly as well as it sinks current so you can connect the LED either as above or non-inverted, between the output and ground, again with its series resistor.LEDs must be connected with their anode positive and their cathode negative. For round leaded 3mm and 5mm LEDs the cathode lead is normally indicated by a flat on the edge of the base of the plastic moulding. If you aren't sure, try the LED with a series resistor and a 5V supply. Higher voltages may damage reverse connected LEDs.Your main problem is going to be the pinouts for the chips available in the lab. Hopefully the test is open book, but if not, and you can only refer to your notes, you had better print out pinout diagrams for the available chips. If you don't know which chips are available you'd better print out diagrams for all 2 input quad gates and hex inverters in the 7400 and 4000 logic series.

author: JKThomas96
author_rank: Contributor
timestamp: December 15, 2016, 11:10:51 pm
content: These are the 3 chips I have chosen, all belong to the 74xx series.not 100% sure where to go from here but I have looked up the data sheets and understand what I need to do in theory, but actually in practice im finding it very difficult.

author: neil t
author_rank: Regular Contributor
timestamp: December 15, 2016, 11:14:27 pm
content: Quote from: Brumby on December 15, 2016, 10:16:45 pmjust a quick heads up if your breadboard has broken red and blue power rails as in figure 1 don't forget to put jumpers across them otherwise half your breadboard won't have power, iv'e been caught out with this one a few times (easy to over look).

author: Brumby
author_rank: Unknown
timestamp: December 15, 2016, 11:50:40 pm
content: Don't use the 74LS21. It's a dualquad inputAND. While you can configure it to do the job at hand, it's a departure from the basic exercise.Use the 74LS08 instead.

author: alanb
author_rank: Frequent Contributor
timestamp: December 15, 2016, 11:55:26 pm
content: Google the pin out for the chips so that you can identify the pins that you need to connect. Start by identifying and connecting ground and Vcc. These will be pin 7 = ground and pin 14 Vcc when looking at the chip with the notch at the top, pin1 is top left go anti clockwise round the chip pin7 bottom left, Pin14 top right. Its much easier if you look at the diagram.

author: JKThomas96
author_rank: Contributor
timestamp: December 15, 2016, 11:56:58 pm
content: Quote from: Brumby on December 15, 2016, 11:50:40 pmUnfortunately I can't seem to find 74LS08 in Fritzing. I really have no idea what I'm doing here, I'm trying to understand it but I'm having real trouble. I don't even know what power source we are using as the lecturer is the only person allowed to use it. I don't even know where my resistors should go, where my inicial inputs should start from going in to the gates.I'm honestly losing hope with this. I have a to have a breadboard diagram, as well as be able to lay out my circuit to be assessed in 15 hours. This counts for 40% of my year in one module and I'm clueless due to the amount of time I spent off.If I can't get this working my only option is to ask the lecturer for an extension which is going to go down like a lead balloon.

author: rstofer
author_rank: Super Contributor
timestamp: December 16, 2016, 12:21:36 am
content: If you have to use a 4 input AND, tie two inputs together and to +5V That will leave just 2 inputs for the logic inputs.You will need to use another inverter on the output because the 74LS logic will not pull an LED up. In other words, the logic one output is WIMPY. You need to pull down when the logic is correct so just invert the output and let the inverter pull down.Connect the anode of the LED to +5, tie the cathode to one end of a 470 ohm resistor and connect the other end of the resistor to the output of the added Inverter.I don't know anything about FritzingOne suggestion: Put pin numbers on your sketch.

author: SL4P
author_rank: Super Contributor
timestamp: December 16, 2016, 12:26:50 am
content: rstofer, You're trying to explain ideas that are about a month ahead of the OP.It sounds like he doesn't need an ACTUAL breadboard or chips.Just a diagram of what he needs to layout on the board, and how the wires link it all up.Much as i hate it, Fritzing was made for this.Now all he needs to find is a 7408 library component.OP, just assume the lecturer is going to provide a 5V supply

author: Brumby
author_rank: Unknown
timestamp: December 16, 2016, 12:31:23 am
content: OK - if you want to stick with the 74LS21, just join two of the four inputs together to make one input and do the same for the other two to make a second input. For this exercise, that will work just fine.Quote from: rstofer on December 16, 2016, 12:21:36 am... or you can do that.As for the wiring of the ICs are concerned, just use these types of diagrams and it should be more obvious:

author: Brumby
author_rank: Unknown
timestamp: December 16, 2016, 01:06:35 am
content: Please understand that while we are more than happy to help you, we are not going to give you a solution. We have also had people rock up here at the last minute and expect us to do their homework for them. Not going to happen.We want to give you the information where you can build your own solution. That's how you will learn.You will need to calm yourself and take in the pieces of information one-by-one, then put them together and we can critique and guide you further.

author: IanB
author_rank: Super Contributor
timestamp: December 16, 2016, 01:46:53 am
content: Quote from: JKThomas96 on December 15, 2016, 11:56:58 pmYou are panicking too much. Try to calm down a bit.All you have to do is copy the circuit diagram you have onto the breadboard. Where the inputs and outputs are on the logic gates you will have pins on the ICs. Where the lines are on the diagram you will have patch wires on the board. In addition you will need to connect power to the VCC and GND pins on the ICs.

author: Buriedcode
author_rank: Super Contributor
timestamp: December 16, 2016, 01:52:31 am
content: Also, not sure if it was mentioned, you're using 7400 series devices. The letters after the '74' indicate the technology used. LS is very old and probably hard to find, so look for 74HCxx or 74HCTxx.'HC' will work with ~3-5.5V, HCT is 4.5-5.5V, so 5V only. If you're using 5V, either will work and are far more accessible than the old LS series.The 'xx' is the device type. Because HC, HCT, LS F, ACT etc.. are basically the same devices, with the same pinout, CAD/schematic software will omit them, leaving you only with '7408' of example.Exit: just noticed this was already covered! Apologies to Ian.M.

author: SL4P
author_rank: Super Contributor
timestamp: December 16, 2016, 02:04:59 am
content: Quote from: Buriedcode on December 16, 2016, 01:52:31 amFor your requirements in this project, all the 74 families have the same DIP pin out.The differences are in the silicon, voltage ranges etc. No concern to you in this case.

author: ez24
author_rank: Super Contributor
timestamp: December 16, 2016, 02:25:13 am
content: I came across this site via this forum recently. I think you are suppose to be able to simulate logic chips but I cannot get it working because of some setting in my Java but worth a look (I think). It may work for you.https://tams.informatik.uni-hamburg.de/applets/hades/webdemos/gatelevel.htmlYou can find more by searching on "digital logic simulation"

author: JKThomas96
author_rank: Contributor
timestamp: December 16, 2016, 02:42:23 am
content: Thanks for all the comments, I got a bit wound up earlier from frustration but I've managed to settle down and produce something.Here is what I haveThe 74xx08 chip in the middle is a 74HC08 chip I imported from google, because I couldnt find it in FritzingHere is the pinout diagram for it just to be sureWould be extremely greatful if somebody could take a look and let me know if I'm on the right tracks.

author: SL4P
author_rank: Super Contributor
timestamp: December 16, 2016, 02:47:53 am
content: I haven't traced through your logic, but the Fritzing looks good - you caught all the imprtant stuff (power, orientation etc).One comment. Don't call your links A B etc (like the LED at right) - as they arethe same names as your inputs!EDIT:QuoteBe careful - while this is the way we would probably do it, it introduces inverted logic - which may confuse the OP why his LEDs are 'upside down'.

author: JKThomas96
author_rank: Contributor
timestamp: December 16, 2016, 02:53:05 am
content: Quote from: SL4P on December 16, 2016, 02:47:53 amThanks for the reply, I did actually second guess myself for a second and adjusted it to this,as I thought the resistor needed to connect to the rest, but I'm glad you've said it is okay. Thanks for the tip on input naming too, makes sense.

author: Buriedcode
author_rank: Super Contributor
timestamp: December 16, 2016, 02:59:46 am
content: One thing, your green LED doesn't appear to have a ground connection. Whilst I'm sure you know it requires one.. for completeness!

author: IanB
author_rank: Super Contributor
timestamp: December 16, 2016, 03:05:44 am
content: Naming your inputs A, B, C was fine. Except the A upper left was the same as the A lower right. So instead of duplicating it you should use a link wire to tie the one input to both places on the breadboard.Also remember that you can only plug one wire into one hole, so don't try to plug two (or three!) wires into the same one.Finally, putting labels like A' AND B on the drawing was a good idea. Keep those labels.

author: JKThomas96
author_rank: Contributor
timestamp: December 16, 2016, 03:13:07 am
content: Quote from: IanB on December 16, 2016, 03:05:44 amThanks for the tips. Just to ask, am I able to put a wire in the same hole as a resistor? If not should I put the wire below the hole the resistor goes in to?Definitely keeping the labels, helped me out big time in understanding what was exactly happening.

author: MK14
author_rank: Super Contributor
timestamp: December 16, 2016, 03:15:48 am
content: Quote from: JKThomas96 on December 16, 2016, 03:13:07 amDefinitely ONLY one lead or wire per hole. NEVER more than one.

author: JKThomas96
author_rank: Contributor
timestamp: December 16, 2016, 03:17:12 am
content: Quote from: MK14 on December 16, 2016, 03:15:48 amThank you, so below the resistor hole or to the side?

author: MK14
author_rank: Super Contributor
timestamp: December 16, 2016, 03:18:36 am
content: Quote from: JKThomas96 on December 16, 2016, 03:17:12 amWhere the lines are (from this image "stolen" from earlier in this thread).I.e. Each contiguous black line, means they are wired/shorted together.So for each black "strip" of (e.g. 5) holes, all leads/wires/components connect together, if plugged in to it.The black lines are isolated from each other.

author: JKThomas96
author_rank: Contributor
timestamp: December 16, 2016, 03:22:22 am
content: Quote from: MK14 on December 16, 2016, 03:18:36 amThought a smuch but after a day filled with errors I wasn't taking any chances.Thank you all, really couldn't have done this without you all

author: MK14
author_rank: Super Contributor
timestamp: December 16, 2016, 03:26:03 am
content: You're welcome!Also, I bet after you have done all this, you will be amazed at how easy it was!Good luck!