Using a 40192 Up/Down Counter

Thread Starter

kgstewar

Joined Apr 5, 2012
152
So far we have looked at the signals generated by the Schmitt trigger inverters and the capacitor monostable with the same values as shown. The oscilloscope signals look clean with the expected time constants (10ms at the Schmitt trigger and 0.8ms low pulse to the counter. Right now someone is wiring up a CD40193 counter and will report back with the results.
Fantastic. I look forward to seeing your results!
 

MrChips

Joined Oct 2, 2009
30,517
Sorry, I have left work for the day but left a student to wire and test the circuit. I will report on the results tomorrow.
 

MrChips

Joined Oct 2, 2009
30,517
Ok, the results are in.

The counter worked flawlessly. There was never a miscount observed.
The value of C2 is not critical. We tried values from 100pF to 1μF and they all worked. The value shown as 10nF appears to be a reasonable choice giving a pulse width of 800μs.

There is nothing terribly wrong with using 100nF.

If you are getting erratic counts then we have to look somewhere else for the problem.
 

Thread Starter

kgstewar

Joined Apr 5, 2012
152
Ok, the results are in.

The counter worked flawlessly. There was never a miscount observed.
The value of C2 is not critical. We tried values from 100pF to 1μF and they all worked. The value shown as 10nF appears to be a reasonable choice giving a pulse width of 800μs.

There is nothing terribly wrong with using 100nF.

If you are getting erratic counts then we have to look somewhere else for the problem.
Wonderful news! Ok, I'm going to carefully rebuild my circuit from scratch and see if I can replicate your good results. I'll keep you posted.

Many, many thanks!

Kevin
 

Thread Starter

kgstewar

Joined Apr 5, 2012
152
So, I have now tried the circuit that uses the extra capacitor, and the circuit using the MC14528. Both circuits are skipping numbers, although the MC14528 circuit skips fewer numbers.... MrChips, I am using a 12V supply. Would that have any effect? I'm thinking no, but thought I'd ask.

I have a little logic circuit attached to the counters that recognizes when certain numbers are attained and I will remove that stuff and just go with the bare bones counter to see if that helps. In any case, I am determined to track this down! Once I have isolated the problem I will report back.

Kevin
 

MrChips

Joined Oct 2, 2009
30,517
If you are skipping numbers I will assume the problem is switch bounce.
You have to look at the switch, the pullup resistor and the first filter stage.
Try increasing the value of C1.
 

Thread Starter

kgstewar

Joined Apr 5, 2012
152
If you are skipping numbers I will assume the problem is switch bounce.
You have to look at the switch, the pullup resistor and the first filter stage.
Try increasing the value of C1.
Many thanks MrChips. So I tried Increasing C1 (to 2.2 uF) and it reduced the skipping, but did not eliminate it. Also, with that value cap it takes several pushes of the button to get it to increment at all. Let me try some different resistors...

I am confident I have got something wrong in my circuit. Time to break it down to its essential components and then start building it back up and testing along the way.
 

Thread Starter

kgstewar

Joined Apr 5, 2012
152
MrChips (or anyone, of course!), do you ground the jam inputs on your 40193? I'm away from home for a couple of days, returning tomorrow, so I can try this out when I return, but my increment-on-button-release counter was working fine with those inputs floating (preset enable is high), but maybe I just got lucky. Could floating jam inputs be the reason I skip so many numbers when trying to get the increment-on-button push to work?

As always, thanks!

Kevin
 
Last edited:

MrChips

Joined Oct 2, 2009
30,517
I will have to wait and see how the student had wired the circuit. It should not matter if the J1-J4 inputs are left floating. At least, make sure the PRESET ENABLE and RESET pins are properly connected.

In practice, all CMOS input pins must be connected to LOGIC LOW or LOGIC HIGH.

There is still something peculiar about your setup. Can you post a photo?
 
Last edited:

Thread Starter

kgstewar

Joined Apr 5, 2012
152
I must have something wrong! I'll snap a photo tomorrow of my breadboard and will annotate. I surely must be missing something...

Kevin
 

Thread Starter

kgstewar

Joined Apr 5, 2012
152
Here are some photos of my circuit.

First photo shows the whole shebang. I have disconnected the down pushbutton to simplify my awful spaghetti of wires. Apologies in advance!

1. Pushbutton goes into 40106.
2. Output goes to 40192 (ones)
3. Carry/borrow pins go to second 40192 (tens)
4. 40192s drive two mc14513s, which drive two ULN2003s, which drive the displays.

Second photo:

Close up of CD40106 circuit. This works flawlessly giving one number increments with each push button release.


Third photo:

Close up of CD40106 with my attempt at an increment-on-push circuit. I have added a 0.01uF cap between the second output of the CD40106 and the clock up of the 40192. Each push increments MANY numbers, anywhere from 3 to 50. Yikes.

I hope these are legible. If not, let me know and I will clarify. Many many thanks!

Kevin
 

Attachments

MrChips

Joined Oct 2, 2009
30,517
We're groping at straws here.

Try connecting all unused inputs to GND, pins 13, 11, and 9 on the CD40106
and pins 1, 15, 10, 9 on the CD40192.
 

Thread Starter

kgstewar

Joined Apr 5, 2012
152
We're groping at straws here.

Try connecting all unused inputs to GND, pins 13, 11, and 9 on the CD40106
and pins 1, 15, 10, 9 on the CD40192.
Straw-groping is one of my most commonly used solutions.

Tried it: No improvement.

Maybe I need to swap out my 40106?
 

MrChips

Joined Oct 2, 2009
30,517
One more thing to do.

Put a 100μF on the breadboard where the LED drivers are located.
Put a 10μF across pins 7 and 14 at the CD40106.
Put an addtional 0.1μF across pins 7 and 14 at the CD40106.

Jumper GND at the bus lines across the breadboard where the CD40106 is located.
Jumper VCC at the bus lines across the breadboard also.
 

Thread Starter

kgstewar

Joined Apr 5, 2012
152
One more thing to do.

Put a 100μF on the breadboard where the LED drivers are located.
Put a 10μF across pins 7 and 14 at the CD40106.
Put an addtional 0.1μF across pins 7 and 14 at the CD40106.

Jumper GND at the bus lines across the breadboard where the CD40106 is located.
Jumper VCC at the bus lines across the breadboard also.
Thanks MrChips, will do. Question: Does the 100uF cap on the LED breadboard go from GND to VCC?
 

MrChips

Joined Oct 2, 2009
30,517
Sorry, I didn't make that clear. Yes. These are all power supply bypass capacitors, noise suppression filters, decoupling capacitors, whatever you want to call them. They go between Vcc and GND. The larger caps, 100μF and 10μF are electrolytics.
The 0.1μF caps are ceramic.

This is almost our last hope - one final step is to decouple the two circuits.
 
Top