12 stage ripple counter odd problems!

crutschow

Joined Mar 14, 2008
34,408
74HC devices are relatively high speed logic and likely don't work well on a high stray-capacitance plug-in breadboard with such a rat's nest of long leads. To me it's not surprising that it doesn't work properly.
You might try using the slower CD4000 (CD4040 and CD4008) series devices and see if that helps.

But you likely need a cleaner layout with minimum length leads.
Even that can be problematic using a plug in type breadboard with its high stray capacitances.
 

Marley

Joined Apr 4, 2016
502
Looking at your breadboard, I'm not surprised your waveforms are a bit rough!

For experimenting with logic I recommend building your circuit on perforated stripboard. Mount the ICs at right angles to the strips. Usually the power pins are on the opposite corners of the IC package so you can have two rails for your power with solder blobs between the rails and the power pins. If the power pins are not in the corners or you have a mixture of 14 and 16 pin chips make links (like staples) out of tinned copper wire to bridge. Cut the tracks using a sharp 3.3mm (1/8in) drill turned with your fingers. Best not to use IC sockets if you can help it. Solder ICs direct to the board.

Keep the IC packages as close together as possible. 3 clear holes between each IC. Two for connections and the centre one where the track is broken. Also break tracks down the centre of the IC. Solder a 100nF ceramic capacitor between the power pins of each IC under the board.

Make connections with very short and direct lengths of "wire wrap" insulated wire.

Are your scope probes properly frequency compensated? Test with a 1kHz square wave. Some scopes have a special output for this. Adjust so nice and sharp with no overshoot. The earth lead must be connected and short and direct. Each probe must have its own earth lead.
 

EM Fields

Joined Jun 8, 2016
583
The counter is a 74HC4040 IC. I'm not building it from lower parts. The gate is a 74HC08 AND gate.

I have posted photos of the waveforms. See how they look like a superposition of the two original inputs into the gate ?? My question is simply why this is happening? I've never seen such strange thing since I started electronics.

I can't tell if the waveforms are changing in time or whether my scope is doing something weird.

You want photos of the assembly? If it helps. Here they are



Can anyone build this simple circuit and see if you get the same results please ?
GIGO.

It might be possible, but why would anyone want to recreate a non-functional rat's nest?
At this point, I have two suggestions for you: 1. Post a schematic and 2. go to http://www.linear.com/designtools/software/ ,download the LTspice simulator of your choice, and learn how to use it. There's a learning curve involved, but it's well worth it.
 

AnalogKid

Joined Aug 1, 2013
11,036
The photo shows decoupling capacitors close to each device (good) and very long power and ground leads to each device (bad), two things not known before.

There are five ICs with no indication of which one is the 4040 or what the other chips are, so even if the photo had enough information to copy the circuit (it does not), it is not possible to replicate it.

Ringing, ground bounce, and other digital waveform distortions are not rare, they are the norm. Clean signals are rare, but approachable with a pc board and power planes. Your signals look fine for a protoboard. Keep in mind that nanoseconds-rate edges have harmonics into the GHz, where 2" of wire is a measureable inductance and a frequency-dependent phase shifter.

I've been doing this since the 70's, and there are people on this forum that make me look young. Replace all power and ground connections from the chips to the busses with 1" cut resistor leads bent into tight little U shapes. Add a straight-up resistor lead at each chip ground pin for the scope probe. Post a photo of the scope probe.

Schematic?

ak
 

Thread Starter

PauloConstantino

Joined Jun 23, 2016
266
74HC devices are relatively high speed logic and likely don't work well on a high stray-capacitance plug-in breadboard with such a rat's nest of long leads. To me it's not surprising that it doesn't work properly.
You might try using the slower CD4000 (CD4040 and CD4008) series devices and see if that helps.

But you likely need a cleaner layout with minimum length leads.
Even that can be problematic using a plug in type breadboard with its high stray capacitances.


The wires are long now but I have tried it with very short wires to the same result. That's why I didn't want to show the photo because it will just draw attention somewhere else. If my circuit was huge it would have been a problem, but this is just one breadboard and 2 main IC's.

The problem is the counter and the GATE and that's all. Really nobody has addressed this problem.

Does anybody know?
 

Thread Starter

PauloConstantino

Joined Jun 23, 2016
266
Looking at your breadboard, I'm not surprised your waveforms are a bit rough!

For experimenting with logic I recommend building your circuit on perforated stripboard. Mount the ICs at right angles to the strips. Usually the power pins are on the opposite corners of the IC package so you can have two rails for your power with solder blobs between the rails and the power pins. If the power pins are not in the corners or you have a mixture of 14 and 16 pin chips make links (like staples) out of tinned copper wire to bridge. Cut the tracks using a sharp 3.3mm (1/8in) drill turned with your fingers. Best not to use IC sockets if you can help it. Solder ICs direct to the board.

Keep the IC packages as close together as possible. 3 clear holes between each IC. Two for connections and the centre one where the track is broken. Also break tracks down the centre of the IC. Solder a 100nF ceramic capacitor between the power pins of each IC under the board.

Make connections with very short and direct lengths of "wire wrap" insulated wire.

Are your scope probes properly frequency compensated? Test with a 1kHz square wave. Some scopes have a special output for this. Adjust so nice and sharp with no overshoot. The earth lead must be connected and short and direct. Each probe must have its own earth lead.

Thank you Marley I appreciate the advice. I will certainly do this. What is strange is that I have tested this circuit with the minimum possible wire lengths and components, and I still get the same result....
 

Thread Starter

PauloConstantino

Joined Jun 23, 2016
266
GIGO.

It might be possible, but why would anyone want to recreate a non-functional rat's nest?
At this point, I have two suggestions for you: 1. Post a schematic and 2. go to http://www.linear.com/designtools/software/ ,download the LTspice simulator of your choice, and learn how to use it. There's a learning curve involved, but it's well worth it.

Who said you are supposed to re create a rats nest ? You can use your own components and wires. The circuit is just a 74HC4040 counter and a 74HC08 gate. That's all. You might learn something new by doing it.
 

djsfantasi

Joined Apr 11, 2010
9,160
The wires are long now but I have tried it with very short wires to the same result. That's why I didn't want to show the photo because it will just draw attention somewhere else. If my circuit was huge it would have been a problem, but this is just one breadboard and 2 main IC's.

The problem is the counter and the GATE and that's all. Really nobody has addressed this problem.

Does anybody know?
With regard to your last question, several people know and have posted their opinion. I don't think you are listening. The problem is NOT necessarily with the counter and gate. The environment into which you have placed those two devices does not satisfy their operating requirements. Several people have told you this and yet you choose to ignore their advice.

I didn't go back to the first page... Just on this page, is the following information.

74HC devices are relatively high speed logic and likely don't work well on a high stray-capacitance plug-in breadboard with such a rat's nest of long leads. To me it's not surprising that it doesn't work properly.
Looking at your breadboard, I'm not surprised your waveforms are a bit rough!
For experimenting with logic I recommend building your circuit on perforated stripboard.
GIGO.
It might be possible, but why would anyone want to recreate a non-functional rat's nest?
Ringing, ground bounce, and other digital waveform distortions are not rare, they are the norm. Clean signals are rare, but approachable with a pc board and power planes. Your signals look fine for a protoboard. Keep in mind that nanoseconds-rate edges have harmonics into the GHz, where 2" of wire is a measureable inductance and a frequency-dependent phase shifter.
 

AnalogKid

Joined Aug 1, 2013
11,036
Really nobody has addressed this problem.
Actually, at least four of us have. But "this" problem is not the real problem.

20 posts ago this was appropriate; now it is way overdue:
There is a difference between inexperienced and immature. Inexperience is the only reason this forum exists, for inexperienced people to get advice from more experienced people. Immature is when someone comes in with an incorrect assumption or position that is cast in concrete and refuses to accept grade-school-level advice.
Does anybody know?
Yes. As you can see on your schematic, the gate is connected incorrectly to the counter.

ak
 

Thread Starter

PauloConstantino

Joined Jun 23, 2016
266
The photo shows decoupling capacitors close to each device (good) and very long power and ground leads to each device (bad), two things not known before.

There are five ICs with no indication of which one is the 4040 or what the other chips are, so even if the photo had enough information to copy the circuit (it does not), it is not possible to replicate it.

Ringing, ground bounce, and other digital waveform distortions are not rare, they are the norm. Clean signals are rare, but approachable with a pc board and power planes. Your signals look fine for a protoboard. Keep in mind that nanoseconds-rate edges have harmonics into the GHz, where 2" of wire is a measureable inductance and a frequency-dependent phase shifter.

I've been doing this since the 70's, and there are people on this forum that make me look young. Replace all power and ground connections from the chips to the busses with 1" cut resistor leads bent into tight little U shapes. Add a straight-up resistor lead at each chip ground pin for the scope probe. Post a photo of the scope probe.

Schematic?

ak


Thanks Kid. I appreciate your help indeed. Those extra chips are not being used at the moment. The problematic circuit is just 2 IC's.

Schematic:

 

Thread Starter

PauloConstantino

Joined Jun 23, 2016
266
Actually, at least four of us have. But "this" problem is not the real problem.

20 posts ago this was appropriate; now it is way overdue:
There is a difference between inexperienced and immature. Inexperience is the only reason this forum exists, for inexperienced people to get advice from more experienced people. Immature is when someone comes in with an incorrect assumption or position that is cast in concrete and refuses to accept grade-school-level advice.

Yes. As you can see on your schematic, the gate is connected incorrectly to the counter.

ak

The gate is connected incorrectly to the counter? What schematic do you mean? I havent posted any schematic.

My question has not been addressed at all. You guys are telling me my circuit isnt working because It's on a breadboard and with long wires, but the fact is that I HAVE tried this circuit with short wires and the same result has been observed.
 

Thread Starter

PauloConstantino

Joined Jun 23, 2016
266
With regard to your last question, several people know and have posted their opinion. I don't think you are listening. The problem is NOT necessarily with the counter and gate. The environment into which you have placed those two devices does not satisfy their operating requirements. Several people have told you this and yet you choose to ignore their advice.

I didn't go back to the first page... Just on this page, is the following information.


No. I HAVE tried the circuit with good connections. Are you telling me that using a breadboard is bound to give problems ? If I cant use a breadboard to connect 2 IC's then what can you use a breadboard for buddy ?
 

Thread Starter

PauloConstantino

Joined Jun 23, 2016
266
74HC devices are relatively high speed logic and likely don't work well on a high stray-capacitance plug-in breadboard with such a rat's nest of long leads. To me it's not surprising that it doesn't work properly.
You might try using the slower CD4000 (CD4040 and CD4008) series devices and see if that helps.

But you likely need a cleaner layout with minimum length leads.
Even that can be problematic using a plug in type breadboard with its high stray capacitances.

If I make the circuit on perfboards, with minimum length wires, will the 74HC chips work ?
 

AnalogKid

Joined Aug 1, 2013
11,036
In your circuit photo, none of the chips have 6 connections to GND or Vdd. Does this mean that the unused 74LS08 inputs are floating? Also, what is the power supply voltage? The LS part's operating voltage range is much narrower than that of the 4040.

Looking at the scope photos, I don't see any problems. It is not clear which photo goes with which device or pin, but...

The 4040 is a ripple counter, so each successive stage output changes slightly later than the previous one. When you gate different outputs together with a fast gate part, its output captures the small time delays among the counter output bits. This is evident in post #8, image #3. These little blips can cause problems farther down the line in other counter and gate circuits.

ak
 

Thread Starter

PauloConstantino

Joined Jun 23, 2016
266
I have rewired the circuit to a minimum again and took a photo of it.
I have also made a video of my scopes screen so you can see what it shows.

Please see the short video here:

The scope is attached to an AND gate. The IC on top is a binary counter, and the IC at bottom is an AND gate. Two inputs from the counter are taken into the AND gate and the output is shown on the scope.

The area to the left of the centre axis (that flikkers a lot) is an area where the first input is at Zero volts, and the area on the right is where the first input is at 5V. The output is the AND function, so the left area should be at Zero volts while the area on the right should be at whatever the second input to the gate is. However as you can see, both areas are rather a superposition of both inputs to the AND gate.

Again I still have the same results on the scope. Would anyone like to take the challenge of finding out why the circuit doesn't work as expected?
 
Last edited:

Marley

Joined Apr 4, 2016
502
Video of scope looks good. Probably the best quality waveform you will get. I would look very carefully at your design. The use of the ripple counter worries me. Why not replace the 4040 12-stage ripple counter with three 4-bit binary synchronous counters such as the 40161?
 

crutschow

Joined Mar 14, 2008
34,408
What is the supply voltage?
Are you using 10:1 probes with the ground clips connected directly to the breadboard ground near the chips?
 

djsfantasi

Joined Apr 11, 2010
9,160
Just taking into account your AND gate, which is the bottom IC in your picture. Since you did not state which IC it is, I am assuming that it is a quad chip and it is a CMOS chip.

You need six additional connections to the chip to make it stable. The unused inputs are floating and that is a no-no!
 

Thread Starter

PauloConstantino

Joined Jun 23, 2016
266
Video of scope looks good. Probably the best quality waveform you will get. I would look very carefully at your design. The use of the ripple counter worries me. Why not replace the 4040 12-stage ripple counter with three 4-bit binary synchronous counters such as the 40161?

Hi Marley. That's what I am planning to do. I am worried because I have seen a circuit design exactly like mine, and the circuit works.

Today I have tried adjusting a "Hold Off" option on my scope, and to my surprise the signal shows correctly when the Hold Off is around 360us.

Why would this be? Why is it that holding off the sampling causes the signal to show correctly? is the signal good afterall and its just that I need to adjust the scope? Or is the signal bad and I have to adjust the scope to accomodate it ?
 

Thread Starter

PauloConstantino

Joined Jun 23, 2016
266
What is the supply voltage?
Are you using 10:1 probes with the ground clips connected directly to the breadboard ground near the chips?

It's 5V. And yes, as you can see on the photo the ground lead is directly at the IC's pin. Please have a look. Also please read my last post where I adjusted the hold off and the signal shows correctly
 
Top