Using a 40192 Up/Down Counter

MrChips

Joined Oct 2, 2009
30,448
One last thing to try, if the previous step doesn't work.

In any case it would be nice to learn that the last step in post #40 works but I would still go ahead and add this next step.

Replace the Vcc connection at pin-14 of CD40106 (green jumper) with a resistor, something from 100Ω to 1kΩ. Insert the 0.1μF and 10μF caps at pin-14 to GND.
Rewire the lines from the power supply to the board. Have a separate wire going to this resistor. Add another wire from the power supply to the circuits that power the LEDs.

What driver chips are you using to feed the LEDs? Are the LEDs common-anode or common cathode?

When we do fix the problem I will explain the method in my madness.
 

Thread Starter

kgstewar

Joined Apr 5, 2012
152
Ok, I added in the caps listed in post #40. DEFINITE improvement, now only skips 2 or 3 numbers per push. I will now try the suggestions in post#41.

LEDs are common anode and are being driven by an MC14513 followed by a ULN2003 (which allows the CC output of the 4513 to drive a CA display).

Thanks MrChips!

Kevin
 
Last edited:

MrChips

Joined Oct 2, 2009
30,448
Ok, you are going to learn something about board layout.
What I suspect is happening is the LEDs are taking a lot of current.
Every time the LEDs switch to the next number, large current spikes are induced into the power supply rails, enough to upset the CD40106 inverters.

We are going to isolate the CD40106 section from the high current LED section.






Remove the jumpers on the breadboard as identified in the picture above.
Feed separate Vcc and GND wires to the separated parts. That is, you are going to run separate Vcc and GND wires from the banana posts to the two separated sections, the section with the CD40106/CD40192 and the MC14513/ULN2003/LED section.

Put the 100μF electrolytic on the LED section.
Put 10uF and 0.1μF on the CD40192 and CD40106 sections.

In addition to that, put a resistor from Vcc to pin-14 of the CD40106. I am guessing 100Ω to 1kΩ. 220, 330, 470Ω should all work fine.

Put a 0.1μF from pin-14 to GND. In addition, put a 10μF in parallel with this as well.

If this does not fix the problem I'm not MrChips.
 

MrChips

Joined Oct 2, 2009
30,448
Just looking over the circuit again I can see one thing we have yet to try.
Put a 0.1μF cap across the push button input, from pin-1 of the CD40106 to GND.
 

Thread Starter

kgstewar

Joined Apr 5, 2012
152
Many apologies for my long absence in replying. I was stymied for a while only to discover that somewhere along the way I had fried my 40106. New chips arrived today and I got busy. Ok, so here's what I did (ALL at the suggestion of MrChips)

1. I made a little power board (pic attached) that allows me to run separate power wires to the 40192s, the 40106, the display chips, and the displays.

2. Put a 100uF cap across the +12V and gnd on the power to the displays.

3. Put a 10uF and a 0.1uF in parallel across pins 7 and 14 on the cd40106

4. Thought I'd try it out before installing the other caps and the resistor.

5. It works PERFECTLY. Counts exactly 1 on each push of the button.

MrChips, I cannot thank you enough. I really enjoyed working through this problem with your help. A couple of questions, if I may:

1. Should I go ahead and add the other caps and resistors as you suggested in posts #43 and #44? I plan on adding some additional features to this circuit so maybe that is good insurance against future problems?

2.On my little power-distribution board, would it be beneficial to put a 100uF cap across the + and GND on that, too?

Many many thanks!

Kevin
 

Attachments

MrChips

Joined Oct 2, 2009
30,448
As you have now experienced, it can be somewhat disconcerting when things fail once in a hundred or a thousand times. So it does not give one much confidence when the problem gets resolved by moving a few wires around and adding a few filter capacitors here and there which have nothing to do with the theoretical functioning of the circuit.

It is always nice to try one thing at a time and see which ones make the most difference. Secondly, from an engineering perspective, it is nice to be able to collect actual data so that one can quantify the failure rates. Semiconductor manufacturers have to conduct accelerated tests on their products in order to quantify and publish MTBF rates (mean time before failure).

Obviously, one may not have the time nor inclination to do such a detailed study. If I were designing such a system as if my life depended on it (or it was going into a $100M space probe) I would do it differently.

So to make a long story short, go ahead and try all the ideas (#1 and #2 above) and test, test and test again.
 

Thread Starter

kgstewar

Joined Apr 5, 2012
152
Thanks MrChips. I am embarrassed to say how long I have been working on this simple circuit, but it's my first! I have learned a tremendous amount and I'm sure I will be back on the forum with new problems as they arise. Thank you again for all of your help and I look forward to trying some new circuits in the future. I promise to post a picture of my fully functioning scoreboard when (not if!) it's completed.

Kevin
 

MrChips

Joined Oct 2, 2009
30,448
If the rewiring and capacitors solve the problem then you may omit that extra resistor at pin-14 of the 40106.

Or if you wish, remove the large capacitors and see if you can reintroduce the problem. Then add the resistor plus a 0.1μF capacitor and see if this removes the problem. If it does then go ahead and leave the resistor in and reinstall all the capacitors.

As a final note, an inductor can also be used instead of a resistor. I have no idea what value to use but perhaps someone else can work that out.
 

Thread Starter

kgstewar

Joined Apr 5, 2012
152
MrChips, I think I understand the function of the filter/bypass caps in the circuit, but how does the resistor between pin 14 and +V help? The reason I ask is that my glee yesterday was a bit premature.

As I had posted, all worked well with my circuit, but when I looked more closely I noticed that the #14 pins on my two cd40192 chips had been left floating! In all of my rewiring I had forgotten to connect those to +V, yet the circuit worked...

When I connected pin 14 to +V on both 40192s, my old problem returned. I then tried putting 10uF and 0.1uF caps across pins 7 and 14 on the 40192s and that did not help either - in fact, it made it worse! I pulled the caps off the 40192s and then put a 470 ohm resistor from pin 14 on the "ones" 40192" to +V and wired pin 14 on the "tens" directly to +V. Voila! It worked! (i.e. incremented exactly one number on button push). So, back to my original question:

Why does the resistor on pin 14 help? Does it dampen out current fluctuations? Also, how in the world was the circuit working when I had not connected pins 14 on the 40192s? Were they getting their juice via other pins in the 40192 that were connected to +V?

Thanks!
 
Last edited:

MrChips

Joined Oct 2, 2009
30,448
CMOS circuits require very little current to function.
Yes, they will operate from the leakage currents supplied by the input pullup resistors.

As I indicated before, your system is suffering from excessive power supply switching noise as a result of the high current LEDs every time the digits change. The solution is to filter the power going to the rest of the circuit as best as you can. This can be done using RC or LC filters at the power pins of the 40106 and 40192 chips. (You mean pin-16 on the 40192, right?). That is the purpose of the 470Ω resistor and the 0.1μ/10μ caps.
 
Top