Connect with us

Clean square waves using a 555 timer?

Discussion in 'General Electronics Discussion' started by Xeno Xenox, Mar 14, 2016.

Scroll to continue with content
  1. Xeno Xenox

    Xeno Xenox

    50
    15
    Mar 13, 2016
    I'm experimenting with simple circuits to generate square waves, for use as inputs and clock sources for use in more complex circuits.

    I tried the "50% Duty Cycle Astable Oscillator" based on a 555 timer from this site:
    http://www.electronics-tutorials.ws/waveforms/555_oscillator.html

    Here's the schematic, from the above web page:

    [​IMG]

    I built it and it works, but I'm getting a large amount of overshoot on the rising edge of the square wave and would like to clean it up.

    Here's a scope trace, showing the problem. The yellow trace is the output (pin 3) and the blue trace is the threshold (pin 6), representing the charge stored in C1.

    upload_2016-3-13_21-52-53.png

    Here's a closer look at the rising edge: The vertical white line is the point in time when the capacitor (C1) stops discharging and begins charging again.

    upload_2016-3-13_21-53-29.png

    I'm using a Vcc voltage of 9V (from six AA alkaline batteries) and the peak on this overshoot is 12V.

    Because it exceeds the voltage of the batteries, my first thought was that it might be parasitic inductance or voltage fluctuations from the batteries. (I haven't tried a well-regulated power supply.)

    So, I put a large electrolytic capacitor across GND to Vcc to even out the voltage.

    That reduced the magnitude of the overshoot, but prolonged the duration:

    upload_2016-3-13_21-47-59.png

    Do you know what might be causing the 350-400ns 1V overshoot on the waveform above?

    Given the stable and non-oscillating shape of the overshoot, I suspect it's a 'feature' of the 555 circuit shown at the beginning of this post.

    ---Xeno
     

    Attached Files:

  2. Harald Kapp

    Harald Kapp Moderator Moderator

    11,662
    2,697
    Nov 17, 2011
  3. dorke

    dorke

    2,342
    665
    Jun 20, 2015
    How did you build it?
    Please post a good photo of the actual build.

    I would place a good quality ceramic 0.1uF cap between pins 1 and 8,
    with shortest leads possible.
    and change the "large electrolytic" to be a tantalum 10uF,
    again between pins 1 and 8,with shortest leads possible.

    Is there anything connected to the output?
    What are you probing it with?
    You should measure on the output itself with a scope-probe and the shortest GND lead possible?
     
  4. Xeno Xenox

    Xeno Xenox

    50
    15
    Mar 13, 2016
    @Harald Kapp : Thanks for the link to the other discussion. It gave me several things to try.

    @dorke : If I'm still having problems after trying the suggestions in Harald's link, I'll post a photo of the build. The scope and probe read clean square waves off other circuits just fine. If it's the probe somehow causing it, I'd like to fix it circuit-side. I don't have any additional loads on the output, other than the scope probe and the feedback resistor R2, as shown in the schematic. The scope probe is connected directly to GND and the output (pin 3), as you recommend.
     
  5. Alec_t

    Alec_t

    2,969
    804
    Jul 7, 2015
    Try a 10k or less resistor as a load from pin 3 to ground.
     
  6. dorke

    dorke

    2,342
    665
    Jun 20, 2015
    What is the frequency range of the square wave you are after?
     
  7. Anon_LG

    Anon_LG

    453
    117
    Jun 24, 2014
    With the electrolytic cap, try a Schmitt trigger to act as a rise time improver. Of course, at higher frequencies, this will potentially have the opposite effect, making signals more noisy. But you could try it.
     
  8. Colin Mitchell

    Colin Mitchell

    1,416
    313
    Aug 31, 2014
    555 is a very nasty chip. It is not an "engineering chip" but just an electrical chip for a car project, where nothing matters.
    For low frequencies you will need to add a 10k and 1n between the 555 and the chip you are clocking with the 1n on the input of the chip you are clocking. Some chips don't even like the 555.
     
  9. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    652
    May 8, 2012
    "Nasty Chip"! Is that a technical term? :rolleyes: I looked that spec up in the datasheets but I couldn't find it.

    Chris
     
  10. dorke

    dorke

    2,342
    665
    Jun 20, 2015
    Chris,
    Colin has his own personal Jargon...;)

    HowToBehaveI.JPG
     
  11. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    652
    May 8, 2012
    Dork, I didn't bother Googling it but I suspect there's no such class of IC found under the heading of "Engineering Chip" either. Then there's the "car project" comment, "where nothing matters"???!!! o_O

    Chris
     
  12. cjdelphi

    cjdelphi

    1,096
    104
    Oct 26, 2011
    It's a nasty chip, no more than a swiss army knife is nasty, in an emergency they both could potentially save your life....
     
  13. cjdelphi

    cjdelphi

    1,096
    104
    Oct 26, 2011
    Xeno, one other thing, it's not 50% duty cycle, for that you require a diode, on Android look for electrodroid to do the calculation for you...
     
  14. cjdelphi

    cjdelphi

    1,096
    104
    Oct 26, 2011
    Try this one with a 1k resistor on the output pin3 to ground..

    Screenshot_2016-03-25-00-34-03.png
     
  15. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    652
    May 8, 2012
    While there's nothing wrong with that circuit and it will produce a near 50% duty cycle, it won't cure his overshoot issue. For that he needs good power rail bypassing techniques, good ground plane and definitely not rely on results produced using a solderless protoboard.

    Also, if this astable osc is going to be used as a single frequency time base the OP can use a simple RC filter on the output pin.

    Chris

    Edit: Yes a 1KΩ load on the output pin should reduce his overshoot, possibly to acceptable level.
     
  16. GPG

    GPG

    452
    66
    Sep 18, 2015
    Last edited: Mar 28, 2016
  17. Xeno Xenox

    Xeno Xenox

    50
    15
    Mar 13, 2016
    Thanks again, everyone!

    I'm convinced that the "overshoot" I was seeing wasn't an overshoot at all, but rather a feature of the circuit.

    I've confirmed it on multiple NE555 chips, with and without loads. Here's the output again:

    [​IMG]

    The trace rises to 9V (Vcc) as expected and stays there for around 300ns. It then drops to about 7.75V (which is unexpected) and stays there for the remainder of the 'high' phase of the square wave cycle.

    7.75V is well below Vcc and takes longer to charge the capacitor than 0V takes to discharge it. This is what causes the duty cycle to be closer to 60/40 rather than 50/50.

    If anyone knows why the output drops from 9V to 7.75V after 300ns, I would like to understand the effect.

    Meanwhile, I also tried the 50% duty cycle circuit based on a diode to shunt Rb:

    upload_2016-4-17_22-35-8.png

    Almost everywhere I've seen this circuit, the description claims that the duty cycle will be 50% when Ra = Rb. However, that's clearly wrong, both in theory and in practice. When operating in the forward direction and shunting current, the diode has a voltage drop across it (e.g., 0.7V for a silicon diode) and therefore the capacitor C charges more slowly than it discharges.

    To obtain a 50% duty cycle, it's easiest to use a variable resistor for Rb (or Ra), so the circuit can be tuned until the duty cycle is 50%. The exact resistance needed for 50% varies with the voltage at Vcc.

    Why aren't these important details provided with 555 timer circuit schematics?

    The best advice I read for getting an accurate 50% duty cycle was to drive the 555 at twice the desired frequency and send its output to flip-flop, which will act as a frequency divider and toggle its output on each rising edge from the 555.
     
    hevans1944 likes this.
  18. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    652
    May 8, 2012
    RE overshoot and Vo voltage drop: Have you scoped the Vcc pin?

    Chris
     
  19. Xeno Xenox

    Xeno Xenox

    50
    15
    Mar 13, 2016
    Chris, I used a bench-top power supply (a TekPower TP-3005D-3) and scoped the Vcc pin. The voltage was stable.
     
  20. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    652
    May 8, 2012
    Please post some photos of the circuit with the scope probes included.
    Also, I'm not familiar with Rigol digital scopes so I don't know if your text readouts convert values based on whether the probe is in x1 or x10 mode. Are you using x1 or x10 mode? Yes, grabbing at straws!

    Chris
     
    HellasTechn likes this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-