Problem with cmos cd4017

Thread Starter

simeonz11

Joined Apr 29, 2008
98
Hi,

I am using a cd4017 as a divide by 10 , I am dividing a 5 volts 50/50 square wave @ 1mhz into a 100khz .

The 1mhz wave is very clean and square etc ... This goes into my clock input .

The way I have connected my cd4017 is the following .

16- Vdd (5 volts)
15- ground
14- clock ( 1mhz input 50/50 square wave extra clean @ 5 volts)
13-ground
12- output (100 khz )
11-NC
10-NC
9- NC
8- ground
7-NC
6-NC
5-NC
4-NC
3-NC
2-NC
1-NC

My problem is that my input from pin 12 has some bumps from the clock signal wich is rather annoying and ugly . It looks like this .

Does anybody know why its doing this ugly thing and how to solve this ?

thx
 
Last edited:

Wendy

Joined Mar 24, 2008
23,421
You are seeing leakage from the internal logic of the CD4017. A capacitor on the power supply pins might help, but it might not. In the digital world it is of no consequence, so there may be nothing you can do about it.
 

SgtWookie

Joined Jul 17, 2007
22,230
OK.
Try using that 100pF cap to ground, and a 100 Ohm to 1k Ohm resistor from pin 12 to the other side of the cap. Then look at the output at that junction (resistor to cap).
 

Thread Starter

simeonz11

Joined Apr 29, 2008
98
Wookie I am confused .

You want me to connect output pin 12 in parallel with 1kohm and 100pF cap to ground

That will draw 5ma of current ...

Yes Bill for me it is of consequence as these spikes are presents all over my circuit and go above 6 volts safety limit past this point , this is the troublesome location right here .

6 chips later after my cd4017 and I see these , it is quite annoying .
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
The spikes are likely due to inductance of the wiring between the ICs. Adding some resistance in the circuit path will help to "snub" the ringing.
 

SgtWookie

Joined Jul 17, 2007
22,230
Wookie I am confused .

You want me to connect output pin 12 in parallel with 1kohm and 100pF cap to ground

That will draw 5ma of current ...
The idea is to create a low-pass filter. The output clock will have a slower rise/fall time, but it should remove most of the noise.
[eta]
Have a look at the attached simulation.
V1 and V2 are 1MHz and 100kHz square wave signal generators that are mixed in a simple summing network. The 1MHz signal is AC coupled via a 5pF cap.

The yellow trace shows the signal before the filtering. Notice all the little yellow spikes?

The green trace shows the signal after filtering. Some of the spikes are still there, but they're mostly gone.
 

Attachments

Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
Yes thats what I thought , my breadboard is quite ugly and long wired.
Long wires + high frequency square waves = LOTS of noise. 1MHz isn't particularly high frequency, but you have to realize that a square wave is a sum of the fundamental frequency (1MHz) plus all of the odd harmonics of that frequency. The more nice and square the wave is, the higher the frequencies of the harmonics. At high frequencies, even short pieces of straight wire have a good bit of inductance.

Unfortunately the resistor from clock 1mhz to pin 14 makes the duty cycle like 80/20 but did help a bit.
Sounds like you need to do a good tidy-up on your breadboard. Make sure that the clock has bypass caps across it's power/ground connections.

I heard once that un-used pins should be either grounded or connected to Vdd , this is not the caqse here right ?
Unused CMOS INPUTS must be connected to either Vdd or GROUND via a resistor or directly. Otherwise, you will have problems. This does not apply to unused OUTPUTS.

In your case, the problem is caused by the rapid transitions (low rise/fall times) of the 1MHz clock, coupled with spaghetti wiring. Try slowing down the rise/fall times just a bit using a 10pF cap to ground at the 4017 clock input, and a 20 to 100 Ohm resistor between the 1MHz clock and the cap/clock input.
 

Thread Starter

simeonz11

Joined Apr 29, 2008
98
Well my breadboard is as short as I can make it but still long , are you absolutely sure pf your diagnosis , because I was planning to make a pcb when I got it working right , problem is that it dont work right right now because its not on a pcb.

But If you are sure then I will order the proto pcb for 100$
 

creakndale

Joined Mar 13, 2009
68
A few suggestions:

1) Minimizing inductive loop on fast rise time signals is tough to do on a breadboard. About the best you can do is add more Ground wires to achieve the lowest resistance Ground return path which minimizes the I x R drop in the wiring. You're trying to simulate a ground plane which has very low resistance and small inductive loop areas.

2) From the power supply to the breadboard, twist the VDD and Ground wires together which will help minimize the inductive loop of these wires. Consider using multiple VDD/GND twisted pairs from the power supply to breadboard. Fan out and connect one of the VCC wires to each of the VCC strips. Fan out and connect one of the Ground wires to each of the Ground strips.

3) The scope probe could be magnifying the problem. Are you using a ground lead connected right at the probe body? If the ground lead is long or isn't making near perfect contact at the probe body you'll have a poor "reference" for the scope.

4) Move the scope probe's ground lead to different grounding points on the breadboard. Move the probe's ground lead to the power supply ground to see if there's any difference.

5) Make sure you're not overdriving the 4017's clock input. If the clock is coming from an external source try lowering it's peak voltage to 4.5 volts.

creakndale
 

Audioguru

Joined Dec 20, 2007
11,248
Unused inputs must be connected to + or ground. If you short outputs to ground then you might create smoke.
It is the breadboard's long wires that are causing the problem. Use a compact stripboard or a pcb instead.
 

Thread Starter

simeonz11

Joined Apr 29, 2008
98
Ok I see , I did a lowpass and it cut the amplitude of those spikes about 90%

Nice advice Wookie , you really assimilated those electronic books well didnt you .

I pushed the signal to about 1mhz ,after about 1.5 mhz the clock but then my signal was that of a sine wave lol , cannot be used by my other logic .

So I probably wont be able to get it right with my ghetto rig right now , a pcb is a must right sidekicks ?

I was gonna order one anyways , in fact I am almost finished doing it .
 

SgtWookie

Joined Jul 17, 2007
22,230
I've kinda been at this for awhile. ;)

The inputs to CMOS ICs are like little capacitors. The long runs of wiring are like little inductors. What you wind up with is a series LC circuit that resonates like the dickens when you change the voltage level rapidly. Just adding a small amount of resistance near the input may be enough to snub these oscillations; you'll need to experiment. Long runs to a capacitive load = begging for trouble. This is why you often see small resistors on the gates of MOSFETs; to dampen the ringing.

I suggest that you post your circuit AND board layout before you get it made.

Otherwise, you may wind up with some expensive coasters.
 

Thread Starter

simeonz11

Joined Apr 29, 2008
98
Ill send it to you Wookie , both my circuit and pcb and you can critisize me .

Yeah Ive been on that coaster of frustration and rage with pcb's before. .
 

SgtWookie

Joined Jul 17, 2007
22,230
Just attach them as .PNG format image files to a post.

It's not for criticism; it's to try to help you avoid what could be an expensive mistake.
 
Top