Problem with cmos cd4017

Discussion in 'General Electronics Chat' started by simeonz11, Dec 21, 2009.

  1. simeonz11

    Thread Starter Active Member

    Apr 29, 2008
    98
    0
    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: Feb 2, 2010
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Do you have a 0.1uF bypass capacitor across the Vdd and GND pins?
     
  3. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    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.
     
  4. simeonz11

    Thread Starter Active Member

    Apr 29, 2008
    98
    0
    I have a 100 pF bypass capacitor .

    just tried a .01 and it didnt change nothing .
     
  5. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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).
     
  6. simeonz11

    Thread Starter Active Member

    Apr 29, 2008
    98
    0
    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: Dec 21, 2009
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You could also try using a 1k to 10k resistor from your 1MHz clock source to the input of the 4017.
     
  8. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
    Last edited: Dec 21, 2009
  10. simeonz11

    Thread Starter Active Member

    Apr 29, 2008
    98
    0
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.

    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.

    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.
     
  12. simeonz11

    Thread Starter Active Member

    Apr 29, 2008
    98
    0
    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$
     
  13. creakndale

    Active Member

    Mar 13, 2009
    68
    7
    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
     
  14. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    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.
     
  15. simeonz11

    Thread Starter Active Member

    Apr 29, 2008
    98
    0
    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 .
     
  16. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
  17. simeonz11

    Thread Starter Active Member

    Apr 29, 2008
    98
    0
    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. .
     
  18. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
Loading...