4093/4011

elec_mech

Joined Nov 12, 2008
1,500
The datasheet for the CD4511 LED driver shows that its output high is not to the supply voltage but is about 1V less than the supply voltage so calculate the current-limiting resistors with that in mind.
An excellent point Audioguru.

Looking at the Fairchild datasheet, the typical output is roughly 0.4V below Vcc. Thus,

9 - 0.4 = 8.6V (output voltage of 4511 to segments)

Then,

8.6 - 2.1 = 6.5V (voltage we need resistor to take up)

6.5 = 0.012 x R

R = ~542Ω

So a typical value to use would be either 510Ω or 560Ω.

You may opt to "play" with a few different values until you're happy with the display. The calculations give you an idea of where you should be so you don't damage anything. For instance, if you need the display really bright, the display datasheet says the segments can accept 20mA. You could then use a resistor as low as 325Ω (330Ω is a typical value), but nothing less than that.

Also note you can sharpen the display by putting a colored piece of plastic over the digits. A dark transparent red sheet 0.010" in thickness would work well or a piece of dark red acrylic ~1/8" thick. This helps hide the unlit segments and really makes the display "pop". You'll notice a piece of colored plastic over a digital alarm clock display for this reason.
 

elec_mech

Joined Nov 12, 2008
1,500
No.
That is the typical output voltage WITH NO LOAD!

But of course we have a load. With 15mA the typical output is about 1V less than the supply voltage but could be more.
Doh! :eek:

I didn't look down far enough, thank you Audioguru.

One more time . . .

9 - 1 = 8V (voltage out of 4511 at ~15mA of current draw)

8 - 2.1 = 5.9V (voltage we need resistor to take up)

5.9 = 0.012 x R

R = ~492Ω, a typical value of 470Ω or 510Ω should work fine.
 

Audioguru

Joined Dec 20, 2007
11,248
This might be a dumb question but I was wondering if I use the 7805 will it lengthen the life of the battery?
The voltage from a little 9V battery quickly drops to less than 7V where a 7805 fails to regulate. The battery will last longer because the circuit will stop working properly.

Without a regulator you will see the LEDs dimming as the battery voltage runs down but the circuit will continue to work properly until the battery voltage is very low.
 

elec_mech

Joined Nov 12, 2008
1,500
This might be a dumb question but I was wondering if I use the 7805 will it lengthen the life of the battery?
A valid question. Unfortunately, no. There are efficiency losses, generally given off as heat. This will reduce the effective run time. Plus the regulator will consume some current whether your circuit is running or not.

If you use AA batteries, you'll significantly increase your run time because they hold more current. Of course, you'll need at least two to get 3V or more, but a set of AA has almost 5 times the current capacity of a 9V battery (assuming both are from a name brand manufacturer).
 

Thread Starter

ricker24

Joined Mar 5, 2011
53
See if this is better. Hope I didn't miss anything this time. If I did please let me know. As you can see I changed the input voltage to +6 and I have not added the debounce circuit yet. Thanks.
 

Attachments

Thread Starter

ricker24

Joined Mar 5, 2011
53
Just constructed the new circuit the way it is designed now and something is wrong. It will start at 00 but the seven segs do not come up correctly when advancing digits. It now has in the left seven seg. when advancing the look of a backwards L, backwards C and a backwards 6 at times and other times digits look normal. Please help as I must have done something incorrect. Thanks...
 

tracecom

Joined Apr 16, 2010
3,944
Sounds like you have the wiring for some of the segments swapped. Look at what digit is supposed to be displayed when the backwards L is displayed, and compare the segments that are lit to the segments that should be lit. Repeat the process for the backwards C and the backwards 6 and that should tell you which segment(s) have the wiring error(s).
 

elec_mech

Joined Nov 12, 2008
1,500
I agree with Tracecom, check your segment wiring. Look especially at segments a and d for sure. Also check that the leads and resistors are not touching each other. Sometimes when putting a circuit on a breadboard, resistors get moved or tilt toward one another and make contact.

On your schematic, be sure to show the GND connections to pin 8 on all ICs as well as the display. Otherwise, looks good.
 

Audioguru

Joined Dec 20, 2007
11,248
Your switches are missing "debounce circuits" so each time a switch is pushed its contacts will bounce or crackle and will be counted by the counters many times.
 

Thread Starter

ricker24

Joined Mar 5, 2011
53
New Problem...Ok I fixed the other problem. I think it was resistors touching each other but now I have a new problem. I inserted the debounce circuit that elec_mech recommended and it counts stable now but a new problem has presented itself. Now when counting the digits go to 9 and the to get 10 to come up you have to push the clock button about 6 more times before it will show. Then it does the same thing at 19, 29, and so on. I have looked and looked and I just can not find anything cross wired any where. What now guys?
 

tracecom

Joined Apr 16, 2010
3,944
New Problem...Ok I fixed the other problem. I think it was resistors touching each other but now I have a new problem. I inserted the debounce circuit that elec_mech recommended and it counts stable now but a new problem has presented itself. Now when counting the digits go to 9 and the to get 10 to come up you have to push the clock button about 6 more times before it will show. Then it does the same thing at 19, 29, and so on. I have looked and looked and I just can not find anything cross wired any where. What now guys?
The problem is that something is counting in HEX when it should be counting in decimal.
 

Thread Starter

ricker24

Joined Mar 5, 2011
53
Switched the 9 pins to GND and it is working great. I can post a new schematic of the finished circuit including the debounce later if you think that I should. Thanks so much for all of your help and patience with me on this project. I am now in the process of soldering up the circuit for a permanent job. Thanks again everyone...
 

Thread Starter

ricker24

Joined Mar 5, 2011
53
Express PCB. It,s a free program I found to download after you told me about Dip Trace. Its not to bad to work with.
 

elec_mech

Joined Nov 12, 2008
1,500
Looks pretty good. There are a few modifications I would suggest:
  • You can leave off R3 - the output of the 4093 will always be high or low, it never floats so there is no need for a pull down resistor on the output.
  • The clock and reset switches are both label SW1. Label one of them SW2.
  • Your 4093 IC should have a designation, e.g., IC1. Also note U1, U2, and so on is more commonly used for IC designations than IC1, etc. Nothing wrong with using IC# though.
  • The reset switch should be placed between +6V and pin 6 of the 4093 (similar to the clock switch). You've placed it on the output of the 4093 which negates the Schmitt trigger, i.e., you have no debounce on the preset pin. In the grand scheme of things, having bounce on the preset pin won't hurt much because the value will always be the same. Since you have extra input on the 4093 I'd go ahead and use it for the preset.
  • If you use the 4093 with the preset switch, you can leave off R4 for the same reason as R3 mentioned above.
  • Pin 8 of most of your ICs is shown as floating (not connected). Connect them to a GND. I know you did this in your actual circuit, it just needs to be shown on the schematic.
  • There is an extra dot on pin 4 of IC4.
  • There should be a dot on :
  • lines coming from pins 3 and 4 from IC5 to +6V.
  • between C5 and +6V.
  • between pin 13 on IC3 going to GND
  • The dots immediately on either side of C4 are not needed.
 
Top