How to set a 4040 ripple counter with a 12 position DIP switch

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
I'm just going to focus on your 3-digit display for this reply.

It looks like you're using a common cathode display, but I think you're going to run into problems as the logic will be inverted. Swap the display for a common anode type, replace the 4511 with a 4543, and have the transistors source from Vcc rather than sink to GND.

See ONSemi's datasheet for the MC14553B.

A typical 7-segment display might have a Vf of 2v/segment with a 10mA current. You're showing 330 Ohm resistors, which would result in (12v-2v)/330 = 10v/330 = 30.3mA; far too much for the display and the driver IC. The resistors should be >=1k Ohms to get the current below 10mA.

Also, the transistors will have to source up to 7 segments simultaneously; so whatever you choose for the resistors, keep this in mind.

For example, if you used 1.3k resistors, you would have ~7.7mA current per segment, which would be a total of ~54mA for all segments on (8); so you'd need to source the base current of the transistor with 54mA/10 = 5.4mA, which is do-able with 2k base resistors and the 2N3906 transistors you've specified. If you want more segment current, you're going to have to swap out the 2N3906 transistors for something better.
There's a lot I don't understand about this yet! Especially transisitors...

One thing, I thought I read that since I was feeding 3 display, in a switching mode, that the display were only on 1/3 of the time, so a little more power could be applied to make them the brightness of what they'd be if only 1 were supplied.
I did have 660 ohm resistors, but bumped them down to 330 for this reason. ???

As far as the cathode/anode problem, I just copied this more or less from something I found online, I'll post it. Oh, I see I was to use a 4543, in place of the 4511. Will that fix everything? Take a look at this photo... I used everything but the main clock input, for my 3 digit display.



I will also add a picture of my updated 4543 in my drawing. Do I still need to replace any resistor or transistors? I'd like to place my Mouser order today, if you could recommend something specific I'll just get it.
 

Attachments

Last edited:

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
You already show two spare 4001's for F-F.
I see, looking back at your drawing that NOR's are what you had, not NAND's.

Here's a current drawing now. Is it time to order all these parts? I guess I'm being too optimistic to think I'll get by with one order from Mouser...
 

Attachments

Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
There's a lot I don't understand about this yet! Especially transisitors...
You'll get it eventually. ;) When a bjt (single bipolar junction transistor) used as a saturated switch, Ib=Ic/10 - that is, the base current needs to be 1/10 of the desired collector current. There are a few exceptions to that "rule of thumb"; some very high-gain transistors are out there - but for commonly available transistors (like 2N2222, 2N3904, 2N4401, 2N2907, 2N3906, 2N4403) that's how it works. If you don't supply enough base current, the transistor will come out of saturation and high power dissipation in the transistor will occur.

One thing, I thought I read that since I was feeding 3 display, in a switching mode, that the display were only on 1/3 of the time, so a little more power could be applied to make them the brightness of what they'd be if only 1 were supplied.
If you drive them that hard, they'll have a very short life. 15mA is a typical limit, unless you're running 10% duty cycle or less. You're running about 33% duty cycle.

I did have 660 ohm resistors, but bumped them down to 330 for this reason. ???
Too low. The power dissipation in the 4543 will get pretty high, and the driver transistors won't support it.


As far as the cathode/anode problem, I just copied this more or less from something I found online, I'll post it. Oh, I see I was to use a 4543, in place of the 4511. Will that fix everything? Take a look at this photo... I used everything but the main clock input, for my 3 digit display.
I did the schematic on the left a few years back. I'm using 2N3904's as voltage followers, and a 5v supply.
So, (5v-(2v-0.7v)) / 250 Ohms = 2.3/250 = 9.2mA per segment or less.

My use of 10k resistors on the bases was overly optimistic. I never built the circuit nor simulated it.

I will also add a picture of my updated 4543 in my drawing. Do I still need to replace any resistor or transistors? I'd like to place my Mouser order today, if you could recommend something specific I'll just get it.
I wouldn't be in any big hurry on placing an order, as the circuit isn't ready to build. People have other things going on; this Board is definitely not real-time, and many other folks need help too.

If you place an order now, you'll be placing another one in a few days' time to get the new parts required.
 

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
You'll get it eventually. ;) When a bjt (single bipolar junction transistor) used as a saturated switch, Ib=Ic/10 - that is, the base current needs to be 1/10 of the desired collector current. There are a few exceptions to that "rule of thumb"; some very high-gain transistors are out there - but for commonly available transistors (like 2N2222, 2N3904, 2N4401, 2N2907, 2N3906, 2N4403) that's how it works. If you don't supply enough base current, the transistor will come out of saturation and high power dissipation in the transistor will occur.



If you drive them that hard, they'll have a very short life. 15mA is a typical limit, unless you're running 10% duty cycle or less. You're running about 33% duty cycle.



Too low. The power dissipation in the 4543 will get pretty high, and the driver transistors won't support it.



I did the schematic on the left a few years back. I'm using 2N3904's as voltage followers, and a 5v supply.
So, (5v-(2v-0.7v)) / 250 Ohms = 2.3/250 = 9.2mA per segment or less.

My use of 10k resistors on the bases was overly optimistic. I never built the circuit nor simulated it.



I wouldn't be in any big hurry on placing an order, as the circuit isn't ready to build. People have other things going on; this Board is definitely not real-time, and many other folks need help too.

If you place an order now, you'll be placing another one in a few days' time to get the new parts required.

Thanks.
Okay then, I'll just take a few days to read up on this, I'm following you a little here on the transistors and resistors. I do some homework, and see what I come up with and post a new drawing. It may be a few days.
 

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
After reading this, I understand a little better:
http://www.electronics-tutorials.ws/transistor/tran_4.html

But I don't think I can figure this all out. I get the jist of what I need to do, but I can't do the numbers. Please help!

I was intending to have 7812 regulator feeding everything, so does that mean the output of these logic IC's will be 12 volts? (Is that a wise choice? I figured since the main water valve was 12VDC, I'd just do everything in 12VDC)

I am understanding enough about these transistors to know that I can't just throw anything in there, both for the displays, and for the 6.9 watt solenoid.
I guess I'll concentrate first on the 3 digit display. ...so I want the segments to run at 15mA? Your expression:
(5v-(2v-0.7v)) / 250 Ohms = 2.3/250 = 9.2mA per segment

So mine on a 12volt would be:
(12v-(2v-0.7v)/820 Ohms = 11.3 mA per segment

Did I get it right!!! (I'm not really sure why the 2v & .7 v) The 0.7 volt would be the drop through the segment? the 2volt is the drop in the transistor???

For now, I'll assume 820 Ohms is right, and now I've got to get the right transistor to have collector current of 11.3, so my base current should be about 1.1 mA
??
So for 12 Volts: E/I=R 12/1.1mA = 10.9K
Is 10K okay? (Isn't that what you suggested!?)

I've updated my drawing and added a picture. Please take a look and see if I'm getting anywhere. (I really don't understand everything I know about this!) But I'm enjoying learning...
 

Attachments

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
I see the difference between the 3906 & 3904 is the one is PNP and the other NPN. Not sure which one I need. My display I'm hoping to use is a blue common cathode:
http://www.us.kingbright.com/images/catalog/SPEC/SC56-51PBWA-A.pdf
It's only single digit, so I'll wire all three (a,b,c,d,e,f,g) together. I can't find a 3 digit display that's blue.
Will this work like I've got it shown in my last drawing? Do I need 3906 or 3904.
I think I'll order some transistors, and other parts and a couple more breadboards, and a logic probe! Then I can do some testing and maybe understand a little more.
 

Audioguru

Joined Dec 20, 2007
11,248
Ordinary Cmos ICs like the CD4543 have weak outputs. With a 12V supply and an 11mA load the output typically goes only as high as about 7V, not 12V. So each output drops 5V and 7 outputs turned on with 11mA each will cause the IC to get extremely hot.

But your 820 ohm resistors will share the voltage drop so that the current in each output is typically only about 8mA. Then the heating in the IC will be much less but the LEDs might be too dim.
The minimum spec'd output current from the IC is half so it will cause the display to be very dim when multiplexed.

Maybe you should use a CD4511 BCD to 7-segment latch/decoder/driver instead that has much more output current and much less heating.
 

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
Ordinary Cmos ICs like the CD4543 have weak outputs. With a 12V supply and an 11mA load the output typically goes only as high as about 7V, not 12V. So each output drops 5V and 7 outputs turned on with 11mA each will cause the IC to get extremely hot.

But your 820 ohm resistors will share the voltage drop so that the current in each output is typically only about 8mA. Then the heating in the IC will be much less but the LEDs might be too dim.
The minimum spec'd output current from the IC is half so it will cause the display to be very dim when multiplexed.

Maybe you should use a CD4511 BCD to 7-segment latch/decoder/driver instead that has much more output current and much less heating.
Okay, thanks. Will 820 Ohm still be a good resistor size then?
 

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
Won't I need 3 of them? --1 for each display?
Ugh, I think I'm going in reverse instead of forward as to getting this all figured out.
Ok, I'm going to resort to the child's credit card: --begging.
I've been working on this for hours, so if someone who understands this stuff well enough to draw up a schematic to do the following:
Count the incoming pulses and show them on a blue 3 digit display with 1 decimal place. The pulse will be in 10ths, so the display should read
00.0
00.1
00.2
...
all the way to
10.0

I was going to use 12 volts, but if 5 volts is better for my whole system, I don't have a problem with that. I'd just like a working schematic. I'm getting ready to pull my hair out. I doesn't matter to me what components I use, I'd just like a nice looking blue display...
 

Audioguru

Joined Dec 20, 2007
11,248
Okay, thanks. Will 820 Ohm still be a good resistor size then?
Why don't you look at the datasheet for the CD4511?
With a 12V supply and an output current of 10mA to 20mA its output is 11V. Then with your 3.2V blue LED display the current in each segment is (11V - 3.2V)/820= 9.5mA. Multiplexing will make them appear to be only 3.2mA which might be too dim.

By the way, the 2N3906 PNP transistors will cause a voltage loss of about 2V that was not included in my above current calculations.
 

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
Why don't you look at the datasheet for the CD4511?
...sorry, I've looked at a lot of data sheet in the last week, but being that I've never worked with a logic IC before 2 weeks ago, they're just a bit overwhelming.

I see this kit is just like what i pictured in my last post. Maybe I'll get it and see how it works. It looks like it'll do just what I need
http://www.kitsrus.com/pdf/k1.pdf
 

Audioguru

Joined Dec 20, 2007
11,248

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
The circuit does not have enough voltage for your 3.2V (4V max) blue LEDs. It is designed to provide a low current of only 7mA to 1.8V red LEDs.
It will work fine with a 12V supply and your blue LEDs.
So I can wire up this circuit just like it's drawn, and use 12 volts, and the blue LED's, and it'll work??
I've ordered the blue LED's 2nd day air, so as soon as they come in, I'll do some tests.
thanks.
 

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
The circuit does not have enough voltage for your 3.2V (4V max) blue LEDs. It is designed to provide a low current of only 7mA to 1.8V red LEDs.
It will work fine with a 12V supply and your blue LEDs.
Hmmm, I'm learning little by little. After you mentioned this I see in the datasheet for the blue LED the value for Vf is 3.2v typical, so that must be the value you're refering to. I looked at a similar red LED and it's Vf is 2v typical.
That makes sense.
 

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
I recreated this drawing using the correct components and think I'm getting close to having it work, that is: properly count, display, good brightness, and nothing over-heating.
I'll do some tests on a breadboard.
I'm looking for 0 V across the transmitters if I understand it right and about 10mA of current though each segment
 

Attachments

Bernard

Joined Aug 7, 2008
5,784
With your single didgits -with decimal pt- connect center display DP to +12 via 820 Ω. On divide by 10 4017, do not forget to ground clock enable & reset so that it will count. The 4024 is functionall identical to 4040. I have not seen yet the caution that all IC inputs need to go somewhere, unused inputs go to ground or +V, except for the diode and gate, they can float.
 
Top