4bit full adder project - no result - Page 1
Forum section: electronics / projects

author: banedon
author_rank: Regular Contributor
timestamp: August 20, 2013, 10:21:54 pm
content: Hi guysI'm a bit of a neewbie when it comes to electronics, but am trying my hand at a first project. Unfortunately, it's not working and I wanted to see if any of you knowledgeable/brainy types can see where I've gone wrong...The following is *supposed* to be a 4 bit full adder. The two sets of inputs are set by SW1 & 2 which then set the pins of a CMOS CD74HC283E. The output pins then each drive the base of an NPN transistor which turns on a red LED to show that line being set to 1. The output Carry is treated similarly (uses a yellow LED).Each IC has a decoupling capacitor (although from what I've read these ICs are so low powered that they don't need it).Looking at this the only thing I can think of is that :a) there needs to be a current limiting resistor between the +5v rail and th switchesb) the output signal is too weak to drive the base of the BC547 NPN transistors (would a Darlington work here?)What does everyone think? Any advice/constructive criticism would be very much appreciated.(one note: I marked the input to the 5v regulator as +12V when it's actually +9V - sorry!)Circuit diagram:UPDATE:Here are the datasheets for the ICs:CD74HC283E -http://www.ti.com/lit/ds/symlink/cd74hct283.pdfL7805CP -http://www.farnell.com/datasheets/1696820.pdf

author: JorgeCarbajal
author_rank: Contributor
timestamp: August 20, 2013, 10:34:31 pm
content: Inputs are switched either 'high' or 'open', wich isnt a '0', usually an open pin would go high.You need to use pull up/pull down configuration on these switches. Check the image attached.

author: banedon
author_rank: Regular Contributor
timestamp: August 20, 2013, 10:38:13 pm
content: I think I see what you mean. While the DIP switches are set to off then those outputs are open. Argh I really am a noob. Thank you for pointing this out. Just got to buy more resistsors now lol!BTW can you see anything else that I might have gotten wrong? This is my first attempt at designing my own (admittedly very basic) circuit.Cheers again!UPDATE: Here's my updated design:Although doing it this way would mean that when a switch is "on" it's actually bring the line low (0), whilst when the switch is off the line goes high (1)? Am I correct?

author: Paul Moir
author_rank: Frequent Contributor
timestamp: August 21, 2013, 01:49:15 am
content: QuoteYes, that's correct.You end up inverted a lot in TTL. For example, TTL can usually "sink" much more than it can "source", which means you can run much more current into an output than you can actually get out of it. In your circuit for example, the 74LS283* can only source a bit of current, so it needs those transistors to operate the ~20ma you're putting through the LEDs (5v - 1.9v LED voltage drop / 150 ohms). If you wire them from +5v through resistors and into the outputs, you could run more current without the transistors. But when the '283 outputted an "0" the LED would be on, and off for a 1.* the 74HC283 can *source* and sink 25ma. So you really don't need those transistors at all. The 74HC283 can directly drive the LEDs, employing a current limiting resistor of course.Only further criticism I would make is that you probably don't need to put a full 20ma through the LEDs. If they were rated at 20ma I would probably go 15ma for longer life with very little apparent change in brightness. Something like a 220 ohm resistor instead of 150? If you have 150 ohm on hand, then go with it though. So totally minor.

author: edavid
author_rank: Super Contributor
timestamp: August 21, 2013, 04:13:47 pm
content: Quote from: Paul Moir on August 21, 2013, 01:49:15 amThis is a common mistake in using HC. There is also a package limit of 50mA, so you can't drive 5 LEDs @ 25mA. (Also, 25mA is an absolute maximum, not a recommended condition, or even something you can necessarily achieve.)Of course, modern LEDs are really bright. You only need 1-2 mA to make them very visible, so you can drive them from an HC output with say a 1K resistor.Also, with the switches, there is no reason not to put them on the high side and use pulldown resistors. Even with TTL, this is not "fair", this is fine.

author: MacAttak
author_rank: Unknown
timestamp: August 21, 2013, 06:06:50 pm
content: Also, if you move the limiting resistors to theanode[oops! I meant cathode] of the LED bank, then you can replace them all with a single bussed resistor network whose common pin is tied to ground. Similarly, you can use a second bussed resistor network to handle all of the pull-ups or pull-downs (whichever approach you decide to use).I'm just a fan of not using any more parts than required, and 2 parts is better than 13 parts. Price won't be much cheaper (if at all), but when routing a board for minimum area it can make a difference.

author: Paul Moir
author_rank: Frequent Contributor
timestamp: August 22, 2013, 12:59:49 am
content: Dohh, I knew I should have check ed that. Thanks MacAttak!I've been out of the loop for a bit, and never really got into the CMOS parts.

author: banedon
author_rank: Regular Contributor
timestamp: August 24, 2013, 04:25:17 pm
content: Hi guysThanks for the help and advice.I've put together my first self-designed digital project with the following results. Please keep in mind that although I'm not exacly superman when it comes to soldering, I'm not normally as bad as demostrated here. I had to put in wire links and solder bridges (and used tons more solder than normal doing this) as I mistakenly purchased the wrong type of board. I was actually after strip board, but got this stuff instead.Top sideBottom (solder) sideI ended up using the 10K drop down resistors which ahd the unwanted effect of inverting the on/off positions of the switches - not that it makes much difference for a demo project.Also, I used 220R resistors to limit the LED current draw and that seems to work fine despite the max current output of the 74HC283.Does anyone have any tips or constructive commends on what I've done? I ask as I made this project to learn as I only started teaching myself electronics a couple of weeks ago using the internet and some good forum advice here.-Mike

author: Clint
author_rank: Regular Contributor
timestamp: August 24, 2013, 04:28:16 pm
content: Looks good enough to meAre they Allen Bradley Resistors ?

author: banedon
author_rank: Regular Contributor
timestamp: August 24, 2013, 04:38:56 pm
content: Thanks for saying.Both resistor types used are TE CONNECTIVITY / NEOHM purchased from Farnell:220R -http://uk.farnell.com/te-connectivity-neohm/cbt25j220r/resistor-carbon-comp-1-4w-220r/dp/1265068?Ntt=126-506810K -http://uk.farnell.com/te-connectivity-neohm/cbt25j10k/resistor-carbon-comp-10k-250mw/dp/1265079?Ntt=126-5079They looked ok - what's your opinion of the make?

author: Clint
author_rank: Regular Contributor
timestamp: August 24, 2013, 04:42:43 pm
content: My opinion is that they look like a resistor should lookI recently purchased some very similar looking ones made my Allen Bradley.

author: banedon
author_rank: Regular Contributor
timestamp: August 24, 2013, 04:47:07 pm
content: lol ok. I wonder as I know there are some makes of capacitors to avoid so wondered if the same were true of resistors.

author: Clint
author_rank: Regular Contributor
timestamp: August 24, 2013, 04:49:42 pm
content: I am sure there are but anything that comes out of TE will be to spec without a doubt.

author: SeanB
author_rank: Super Contributor
timestamp: August 24, 2013, 04:53:53 pm
content: Normally the ones to avoid are those made by a mystery manufacturer in some random sweatshop. Most though made by any manufacturer are fine for most general purpose use. There are specialist resistors, and as the specs are narrowed the price rises. When you are looking for stable ( from -55 to 125C with no drift or with under 0.01%) and low noise they get really expensive. When they have to be stable for decades then they get to eye wateringly expensive.For most general use any one will do. For TTL that is a not terribly demanding application, even carbon composition is fine.