Binary adder with 7-seg display

Thread Starter

pillyg

Joined Sep 19, 2011
52
I think I will use all 4 inputs on the NAND gate. I will debounce the up and down for the inputs but I dont think I need to debounce the reset and display button. How will I make the display button? I think I need a flip flop to toggle the display (or I could just use a toggle switch)

Do you know of any free sample website. I tried purdy for the displays but my friend used all the samples (you only get a certain amount) and TI doesn't offer the 40110 as a sample.

William
 

Thread Starter

pillyg

Joined Sep 19, 2011
52
this is what I have so far. Im about 10min away from being done. Am I missing adding? Do. I need any more resistors or capicitors? If so what size?

Is there any replacement for the 40110? Maybe a 74 series? I am wondering because $1.10 is expensive for 1 chip especially since I need at least 7
 

Attachments

Thread Starter

pillyg

Joined Sep 19, 2011
52
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
If you just need an UP-counter with 3-digit displays (or some multiple of three), you could use a 4553 and 4543 with three transistors to drive three common anode 7-segment displays. If you wanted to use common cathode displays, you need 10 more transistors and 10 more resistors.

Here is a datasheet for an MC14553B:
http://www.onsemi.com/pub_link/Collateral/MC14553B-D.PDF
Motorola/OnSemi prefixes their 4000-series CMOS with MC1 instead of CD.
Philips/NXP uses HEF as a prefix.
ST Microelectronics uses yet another prefix.
 
Last edited:

Thread Starter

pillyg

Joined Sep 19, 2011
52
Here is what I have. I guess this is a draft. I think everything is here except the reset button and resistors on the output display.

Never mind about the 3 digit counter. I was counting on getting that for free from On Semi. but they charge shipping for samples so oh well.

William
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
Ahh, you're posting .ZIP files? Why? What's in them?

If they are ExpressPCB/ExpressSCH or Cadsoft Eagle files, you can attach them to a reply without zipping them. However, you really should attach .png images as well so that people don't have to download/save/load a program/etc to view your project.
 

Thread Starter

pillyg

Joined Sep 19, 2011
52
I try to use pngs but they are too big. That is why I zipped it. I am using ExpressSCH.

How is the schematic. I am mainly concerned with what resistor and capacitor values I need.
 

Thread Starter

pillyg

Joined Sep 19, 2011
52
I will set the operands by incrementing them with a pushbutton switch. It is connected to a 555 so that when I hold the button it will auto count. I am not actually using an adder chip :) I am using an OR gate to combine the pulses from the A and B operand. That will output to another 40110 to display the output.

What resistors do I need going to the 7 seg displays?
 

elec_mech

Joined Nov 12, 2008
1,500
Hi William,

I'll look over your schematic in more detail as time allows. It's looking good, but needs some corrections. A few things off the bat,

1) Add designators to all your parts, e.g., U1, U2, etc. for ICs, R1, R2, etc. for resistors, and so on. This will allow us to better explain corrections and modifications. You have designators started on most of your parts, but no numbers so we can't distinguish one from the other. Once that is done, show us the values you've selected so far for each part.

2) The 40110 in the top right corner does not have a Vdd connection (no 5V power). The Vdd pin is connected directly to ground. Should it look like the 40110 IC right below it?

3) Double-check all your connections. I see a place or two that needs a junction dot added.

4) Regarding your 7-segment resistor values - what is the rating of the 7-segment displays you'll be using? What is the typical forward voltage and current rating? This should be found on the datasheet of the displays. Are they all the same?
 

elec_mech

Joined Nov 12, 2008
1,500
Okay, I had a chance to look over your schematic in detail last night. Overall, it looks good. There are several places where connection dots are missing, leads aren't quite connected, Vdd or GND symbols are missing, and a couple areas where something isn't wired correctly (although it is for the same part elsewhere).

I've attached hand-drawn corrections and I can't promise I caught everything. You can ignore the A, B, C, D, UP, and DN notations - I was just following the leads.

I'd suggest you connect all pin 5's from the CD40110's together then use a single 10kΩ pull-down resistor. Connect a momentary N.O. switch (you don't necessarily need a debouncer for this, at least not another 4093) between the pin 5 connections and Vdd. In this way, you start by pressing this switch to reset everything to zero. If you don't, you'll never be able to sync all the counters together - when you first power up you're probably going to see different numbers on every digit because they won't start out at the same value. This also allows your user to reset the circuit without powering it off.

Additionally, you mentioned not having the user see the output display change as the input values are entered. With your current circuit, the output display will be on all the time and change everytime either value is changed. To avoid this, you can do the following:

1) Disconnect all pin 6's on output CD40110's from ground.

2) Tie all pin 6's from 1) together.

3) Add a 10kΩ pull-up resistor to pin 6 connection.

4) Add a N.O. momentary or toggle switch between pin 6 connection and GND.

Pressing or flipping the switch should allow you to unlock the output display and update the display to show the value of the two inputs. At all other times, the display should remain locked and not change until the switch is engaged. I haven't used this pin before, so I'm not 100%. I'll see if I can find a timing diagram and verify.
 

Attachments

Thread Starter

pillyg

Joined Sep 19, 2011
52
I am almost done with schematic. I have been mainly focusing on where I will get parts from though. I got free 40110 samples from TI :D and im getting display samples also. I am buying the rest from newark and the hardware (multimeter and breadboard) from ebay. I have a question

What is the difference between a pull up and a pull down resistor. Are they the same physical item or what. Can the same resistor be used for both?

Also what would be the most common capacitor values. I am looking to get maybe 20 of each to get me started in electronics. I am looking for about 20-30 values
 
Last edited:

elec_mech

Joined Nov 12, 2008
1,500
What is the difference between a pull up and a pull down resistor. Are they the same physical item or what. Can the same resistor be used for both?
A pull-up resistor is simply a resistor connected between the input pin of an IC and Vcc. A pull-down resistor is connected to the input pin of an IC and ground. Hence, pull-up means input is set to logic 1 or high and pull-down means input is set to logic 0 or low. You never use a pull-up and pull-down resistor on the same input pin. You can use the same value of resistor for either pull-up or pull-down, but you would not use the exact same resistor to act as both a pull-up and pull-down. You can generally use anything between 1kΩ to 100kΩ as a pull-up/down resistor. I typically use 10kΩ resistors.

Also what would be the most common capacitor values. I am looking to get maybe 20 of each to get me started in electronics. I am looking for about 20-30 values
My recommendations:

Ceramic or Mylar, 25VDC or higher -
10pF
0.001uF*
0.01uF*
0.1uF**

Electrolytic, 25VDC or higher (16VDC would be okay, but higher better - also note higher voltage means bigger and more expensive electrolytic cap, so don't worry about going too high):
1uF**
2.2uF
3.3uF
4.7uF
10uF
22uF
33uF
47uF
100uF
220uF
330uF
470uF

Don't worry about getting lots of electrolytic values or quantities. A couple of each would be good if you find yourself needing them.

* - used somewhat regularly in electronics
** - used often in electronics
 

Thread Starter

pillyg

Joined Sep 19, 2011
52
Alright here is the next revision. I am looking to buy this week. Are there any other components that I would need starting in electronics? I am getting resistors, caps, diodes, leds, transistors, and sockets.

William
 

Attachments

elec_mech

Joined Nov 12, 2008
1,500
Are there any other components that I would need starting in electronics?
So, so many things could be purchased, but it's up to you.

You might consider the following:
7805 - 5V Regulator
7812 - 12V Regulator
1N4148 or 1N914 or 1N918 - general switching diodes
1N4001 - General purpose diode
Breadboard if you don't already have it
Jumpers for breadboard
Indicator (diffused) LEDs

Some places to look for best prices:
www.jameco.com
www.mpja.com
www.elexp.com
www.futurelec.com
www.ledshoppe.com

Of course, there is a tradeoff between getting the best price and paying shipping to order from multiple vendors, so keep that in mind.

In reviewing your schematic, the reset pins all need to have pull-down resistors (10kΩ would work) and reset switches all connected to Vcc.

For the latch enable, pin 6 on the CD40110s controlling the output value, I assume you want the display locked until the user has finished entering in the values. To do this, use a pull-up resistor of about 10kΩ and a switch tied to ground. I'm not 100% the display will update to the current value by switching the latch input low, but I think it will. If not, we can try something else.
 

Thread Starter

pillyg

Joined Sep 19, 2011
52
Ok. I am going to buy from Newark. I have gotten samples of everything I need but caps and resistors!

If I am not mistaken though, I have added the reset and latch resistors and switches.

For buying, I am going to get these 30-50 of resistors

10 100 200 220 330 470 560 680 820 1K 1.5K 4.7K 5.1K 10K 18K 47K 100K 270K 330K 510K 820K 1M 4.7M

and for capacitors, about 30 each of

10 pF 1000 pF 0.01 uF 0.1 uF 1 uF 2.2 uF 3.3 uF 4.7 uF10 uF 33 uF 47 uF 100 uF 220 uF 330 uF 1000 uF

finally, something my mom (electrical engineer) reminded me of. ESD protection. If I buy a static bracelet with a clip or lead coming off, can I put the end in the 3rd plug (the round one) on a wall socket? That is earth ground so wont that work?

William
 
Last edited:

Thread Starter

pillyg

Joined Sep 19, 2011
52
Another question. What about current and resistors. Will the 7805 change the current? I am going to power this with a 5V 1.5A supply. what resistors will I need the the 7 segments?
 

elec_mech

Joined Nov 12, 2008
1,500
Another question. What about current and resistors. Will the 7805 change the current? I am going to power this with a 5V 1.5A supply. what resistors will I need the the 7 segments?
No, the 7805 will not change or limit the current. The value of the current-limiting resistors depends on the forward voltage and current of the7-segment display. Can you provide the datasheet or part number and supplier you are using for the 7-segment displays?

You find the resistor value using the following equation:

R_led = (Vcc - V_led) / I_led

Vcc in this case is 5V (maybe a smidge less on the 40110 output, but good enough for our calculation)

V_led is the typical (typ.) forward voltage of the 7-segment display.

I_led is the typical (typ.) current draw of the 7-segment display.

finally, something my mom (electrical engineer) reminded me of. ESD protection. If I buy a static bracelet with a clip or lead coming off, can I put the end in the 3rd plug (the round one) on a wall socket? That is earth ground so wont that work?
ESD protection is a good idea, but I don't recommend using the ground connection of an outlet. Instead, you can loosen the screw holding the outlet cover enough to allow you to use the alligator clip to grab the screw or attach a ring terminal to the anti-static wire and fasten it behind the screw.
 

Thread Starter

pillyg

Joined Sep 19, 2011
52
Im not sure what the forward voltage is for the display. Im also not sure what power supply I will use. I still need to get a multimeter to test the current on them. Here is the data sheet.
http://www.vishay.com/docs/85180/tdsr1350.pdf

How close do I have to be with resistors? I might like to make the displays a bit LESS bright. Do you think the resistors I am getting will cover my needs or do I need others?

I think the display uses 1mA (it gives descriptions based on 1mA) so 5v *.001 = 5K ohm resistor correct? Can I use a 5.1K to make the display a bit darker?

Will I need a separate voltage for the displays? I have 3.3v regulators.
 
Top