Maker Pro
Maker Pro

Clean square waves using a 555 timer?

The probe was set to 1x.

I've built it several times and in several different ways. I can build it again and take a photo, if you like -- but I suspect it's 100% reproducible for anyone else who wants to try it. :)

If someone else builds it and it doesn't exhibit the problems I mentioned, then a picture of *that* would do me a world of good. :)

A different 50% duty cycle circuit, which adds a diode and a variable resistor, works perfectly -- and it's on a large solderless breadboard with 3-4 inch wires. Because of that -- and because the drop to 7.75V is very stable over a long (non-transient) period of time -- I don't think parasitic reactance is a root cause.
 
Just a thought, have you tried running the 555 timer at a lower frequency, say 1 KHz? Also how long is your ground lead on your scope probe, you haven't made it longer to connect to your PSU have you?
Adam
 
It is possible that the overshots are not actually existing. It may just be due to the scope's probe.
try setting the probe to x10 and adjust the scope accordingly see if that changes anything.
 
Ok, here are some photos of a couple of quick builds.

I'll begin by showing you photos of the circuit that works. This circuit uses a diode and variable resistor to hit a 50% duty cycle.

I'm hoping the success of this circuit will reduce concerns about long wires, solderless breadboards, etc.

upload_2016-4-20_23-53-32.png

upload_2016-4-20_23-54-16.png

upload_2016-4-20_23-55-16.png

upload_2016-4-20_23-55-54.png

And here are some traces from the circuit that works:

upload_2016-4-20_23-57-20.png

Note that the duty cycle is just about 50%. I can tune it exactly to 50% if I want using the variable resistor.

Next I'll add Vcc in blue:

upload_2016-4-21_0-0-1.png

Notice that the output spikes to Vcc, but then drops below it. Let's zoom in a thousand times (from 100us to 100ns per division):

upload_2016-4-21_0-2-53.png

There's a small transient on Vcc (blue), but it's short-lived. The output (yellow) rises to Vcc, but then falls and stays about a half volt below Vcc for the remainder of the high phase of the square wave.

Now, let's look at the circuit that fails:

upload_2016-4-21_0-8-12.png

upload_2016-4-21_0-8-35.png

upload_2016-4-21_0-9-44.png

upload_2016-4-21_0-12-27.png

The black cylinder is a 470uF bypass capacitor. It smooths the Vcc transient, but doesn't fix the duty cycle problem.

Here are the scope traces:

upload_2016-4-21_0-14-19.png

Note that the duty cycle is closer to 60% than 50%. This is the problem I'm trying to solve.

Also note the same rise to Vcc as in the working circuit, but now it falls over 1V and stays below 8V for the rest of the high phase of the square wave.

upload_2016-4-21_0-15-34.png

Zooming in again, we see a small transient on Vcc (blue), with a longer lived transient on the output (yellow). These aren't a major concern unless they are somehow causing the real problem.

The real problem is that the output then drops below 8V and stays there for the remainder of the high phase.

upload_2016-4-21_0-17-5.png

The above image shows the output in yellow and the capacitor charge (pin 2) in blue. The rising and falling edges occur when the charge on the capacitor hits 3V and 6V respectively, as expected.

However, the capacitor charges more slowly than it discharges because the output is below 8V rather than at 9V.

Unless there's a way to get the output to generate a solid 9V signal, I don't see how this circuit can possibly generate a 50% duty cycle signal.

I tried switching my probes from 1x to 10x and saw no real difference. As you can see in the first photo, my probes' grounding leads are short. I also tried turning on bandwidth limiting on the scope and the traces barely change shape. And I've measured clean square waves from other sources at similar frequencies. I'm confident my 100 MHz scope is accurately measuring the voltages in the circuit.
 

Attachments

  • upload_2016-4-20_23-54-47.png
    upload_2016-4-20_23-54-47.png
    268.8 KB · Views: 75
  • upload_2016-4-20_23-56-48.png
    upload_2016-4-20_23-56-48.png
    4.2 KB · Views: 93
  • upload_2016-4-21_0-1-7.png
    upload_2016-4-21_0-1-7.png
    6.6 KB · Views: 104
  • upload_2016-4-21_0-5-24.png
    upload_2016-4-21_0-5-24.png
    8 KB · Views: 113
  • upload_2016-4-21_0-9-26.png
    upload_2016-4-21_0-9-26.png
    240 KB · Views: 87
After looking at the scope traces for these two circuits and comparing the different high levels of the two square waves produced, I realized the transient on Vcc was larger than I remembered and might still be the culprit after all.

When I get some more time to experiment, I'll try using the largest tantalum capacitor I have in place of the large 470uF capacitor, as recommended by dorke. That may eliminate some parasitic inductance from my larger capacitor.

I'm not above soldering the circuit onto a small prototype PCB to further remove parasitic inductance, but I'd like to first understand the theory of how a tiny short-term transient could lead to long-term voltage drop on the output.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
Maybe I can't see it but I don't see a bypass (decoupling) cap (should be mounted close to pin8) on the Vcc to GND rail. This is always SOP but can only be partially effective when breadboarding on a solderless protoboard.

On a related note be careful when hanging large caps on the Vcc rail. When used with batteries it's no big deal but many, actually most, regulated supplies don't like it. The xx78xx series 3 pin regulators can be driven nuts when it sees large capacitance on its output pin.

Chris
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
I should have mentioned this before but in response to my probe mode question you replied x1. This is not a good practice. Always use x10 whenever possible. Even though you said that either mode didn't change anything I can guarantee that it will in the near future. Just about the only time direct scope input is used in practice is when using a 50Ω coaxial cable with a 50Ω termination on a "T" connector at the scope's BNC input. Some scopes have a 50Ω input option that eliminates the external 50Ω termination.

Note: The above statements are only valid when dealing with a source that can drive a 50Ω load. If not x10 is the rule!

Chris
 
I should have mentioned this before but in response to my probe mode question you replied x1. This is not a good practice. Always use x10 whenever possible. Even though you said that either mode didn't change anything I can guarantee that it will in the near future. Just about the only time direct scope input is used in practice is when using a 50Ω coaxial cable with a 50Ω termination on a "T" connector at the scope's BNC input. Some scopes have a 50Ω input option that eliminates the external 50Ω termination.

Note: The above statements are only valid when dealing with a source that can drive a 50Ω load. If not x10 is the rule!

Chris

True,
But if we need the full scope sensitivity, while probing a low level signal ,we have to use the X1 probe.
Not directly to the input itself,with the probe.
 
Last edited:
That's great work, did you lower the frequency as I asked you to?
Thanks
Adam

Adam,
The frequency of the oscillator will have no effect on phenomena.
The problem is due to the output switching states(transient).
This will be the same regardless of any specific frequency.

1.The main thing is the switching glitch on the PS .
2.Probable reflections on the output line.
 
Last edited:
Ok, here are some photos of a couple of quick builds.

I'll begin by showing you photos of the circuit that works. This circuit uses a diode and variable resistor to hit a 50% duty cycle.

I'm hoping the success of this circuit will reduce concerns about long wires, solderless breadboards, etc.

View attachment 26354

View attachment 26355

View attachment 26357

View attachment 26358

And here are some traces from the circuit that works:

View attachment 26360

Note that the duty cycle is just about 50%. I can tune it exactly to 50% if I want using the variable resistor.

Next I'll add Vcc in blue:

View attachment 26361

Notice that the output spikes to Vcc, but then drops below it. Let's zoom in a thousand times (from 100us to 100ns per division):

View attachment 26363

There's a small transient on Vcc (blue), but it's short-lived. The output (yellow) rises to Vcc, but then falls and stays about a half volt below Vcc for the remainder of the high phase of the square wave.

Now, let's look at the circuit that fails:

View attachment 26365

View attachment 26366

View attachment 26368

View attachment 26369

The black cylinder is a 470uF bypass capacitor. It smooths the Vcc transient, but doesn't fix the duty cycle problem.

Here are the scope traces:

View attachment 26370

Note that the duty cycle is closer to 60% than 50%. This is the problem I'm trying to solve.

Also note the same rise to Vcc as in the working circuit, but now it falls over 1V and stays below 8V for the rest of the high phase of the square wave.

View attachment 26371

Zooming in again, we see a small transient on Vcc (blue), with a longer lived transient on the output (yellow). These aren't a major concern unless they are somehow causing the real problem.

The real problem is that the output then drops below 8V and stays there for the remainder of the high phase.

View attachment 26372

The above image shows the output in yellow and the capacitor charge (pin 2) in blue. The rising and falling edges occur when the charge on the capacitor hits 3V and 6V respectively, as expected.

However, the capacitor charges more slowly than it discharges because the output is below 8V rather than at 9V.

Unless there's a way to get the output to generate a solid 9V signal, I don't see how this circuit can possibly generate a 50% duty cycle signal.

I tried switching my probes from 1x to 10x and saw no real difference. As you can see in the first photo, my probes' grounding leads are short. I also tried turning on bandwidth limiting on the scope and the traces barely change shape. And I've measured clean square waves from other sources at similar frequencies. I'm confident my 100 MHz scope is accurately measuring the voltages in the circuit.

First thing that has to be said: "breadboards are nasty things for fast switching circuits"
They are easy to assemble,modify and reuse but the results are poor.
Better use the "dead-bug method" for better results.

And a note:
What you are seeing is ringing of the output signal manifested in what you call "overshoot".
after that period of time the output settles at the steady state(read as DC condition).

Now let me ask you a few questions:
1. What is the model of the Rigol scope you are using?
2. Have you calibrated the scope prob?



Let's start analyzing the problems with the "working circuit".
It is "working" but there are some mistakes worth avoiding.
upload_2016-4-20_23-53-32.png



The problems I find are:
1. Wrong probing(see photo),did you probe in X1 or X10 ?

2. Why is the Capacitor not connected?
connect it directly on pins 1 and 5(shortest wires possible,better use only the capacitor leads).

3. The Electrolytic cap isn't enough, as I said before use a 10uF tantalum +a 0.1uF ceramic.
Again connect directly between pins 1 and 8(shortest wires possible,better use only the capacitor leads).

We shall come back to the "not working circuit" later-on.
 
@dorke:

You are correct. I failed to connect the control pin bypass capacitor to ground in the working circuit. Thank you for catching my mistake. The same capacitor appears to be connected properly in the failing circuit.

I will use my 10X probe setting in the future, but shouldn't it be safe to assume that the output pin of a 555 can easily handle the load of a 1X probe? As I recall, that's in the neighborhood of 1Mohm + 100pf.

What is your concern with the short blue lead running from the output pin to the probe? I wouldn't expect the tiny additional load on the output pin of a 555 timer to change the circuit's behavior or the probe's ability to capture the relevant features at the time scale we're working at. I used the probe directly on the output pin in my initial measurements and saw the same results.

As I said in my previous post, I will replace the bypass capacitor with a tantalum and see if that helps to further smooth the transient on Vcc.

The scope I'm using is a 100MHz Rigol DS1102E. I believe my probe compensation is set properly as I see clean high frequency square waves from my signal generator. Also, the shape of the effect we're seeing doesn't look like improper compensation.
 
1. The capacitor is connected in the "failing circuit ",but isn't connected properly.
It should be like this:
Disconnect the black wire as shown .
Connect the capacitor with the shortest possible leads directly between pins 5 and 1.

upload_2016-4-21_0-12-27.png

2. About the use of the scope probe.
The simple answer is no.
You should be measuring with the shortest possible probe connection.
It isn't always important or having an effect, but it is always the correct practice kind of a "good and healthy habit ".

3. about the blue tiny wire load.
It is creating a transmission line, not the "ohmic load "is the issue.

To convince yourself (although the 555 isn't the fastest device out there) do this.
a. measure directly on pin 3 with the probe tip .
b. measure with a 12" long wire.
compare the measurements with the current blue wire.

4. About the scope probe calibration.
I would do that again properly,I hope you know how to.


5. That rigol as only 8 bits vertical resolution and can measure rise/falll times in the order of more than 5nsec.
In general ,it isn't a good scope for the job of measuring single shot fast signals.
But should be ok in the case of the 555.
 
@dorke:

Do you have a theory as to how a transient on Vcc, the control voltage pin or elsewhere during the rising slope could cause the 555 to stabilize at less than 8V (when Vcc is 9V) during the high phase of the square wave?

The 8V out of 9V is the problem that's preventing the circuit from achieving a 50% duty cycle.

If there's something unusually finicky about a 555 timer operating in this configuration, I would like to understand it.
 
@dorke:

Do you have a theory as to how a transient on Vcc, the control voltage pin or elsewhere during the rising slope could cause the 555 to stabilize at less than 8V (when Vcc is 9V) during the high phase of the square wave?

The 8V out of 9V is the problem that's preventing the circuit from achieving a 50% duty cycle.

If there's something unusually finicky about a 555 timer operating in this configuration, I would like to understand it.

It is actually very simple to explain.
The main difference between the non-working and working circuits is the load connected to the output pin 3.
In the working one there is no load(I guess ,because you didn't show that pin 3 in your diagram).
In the case of the non-working there is a load an R-C one, R being 1k.
The fact that the output settles 1V below VCC is a very normal and predicted effect for the loaded 555 output.

What you can do to get the output a bit higher is use a higher value for R say 33K and adjust the value of C .
Try it and see the effect.

I think the transient has nothing to do with the settling of the output at 8V,
since it is the "DC condition,the steady state".
The transient can change the trigger level of the 555 and thus effect the duty cycle.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
True,
Butif we need the full scope sensitivity, while probing a low level signal ,we have to use the X1 probe.
Not directly to the input itself,with the probe.

I said "Always use x10 whenever possible." It's not an ambiguous statement. In his case there's more than enough output voltage available, so he has absolutely no reason to use x1.

A further note on this should include that a fundamental factor of ALL instrumentation is that it should appear as transparent as possible to the DUT.

Chris
 
Adam,
The frequency of the oscillator will have no effect on phenomena.
The problem is due to the output switching states(transient).
This will be the same regardless of any specific frequency.

1.The main thing is the switching glitch on the the PS .
2.Probable reflections on the output line.

Ok thought it might have been worth trying, thought it might have been a delay in the output of the driver stage. Interesting thought about reflections! However the reflection does seem rather high for a short length of wire and the scope probe is connected to the end which will make a difference. But yeah maybe.....
Adam
 
Top