# Astable wave not square

Discussion in 'General Electronics Chat' started by Overdale, Jul 30, 2014.

1. ### Overdale Thread Starter New Member

Jul 30, 2014
5
0
Hi Folks. Although a lifelong tinkerer, and long ago student of complex algebra as it relates to electronics, I have only just built my first circuit. It uses a 555 in an astable configuration. It is designed to produced a 10Hz evenly balanced square wave.
It works, but, according to my PC based Oscilloscope, produces a wave which i far from square.
Can anyone explain why? Is it me, or the chip.
R1 - 10K, R2 20K, C1 3.3uF, C ~100nF

Photo attached
Any help greatly appreciated.
Marco

File size:
51.2 KB
Views:
69
2. ### MrChips Moderator

Oct 2, 2009
14,523
4,282
You have two issues:

1) It is difficult to produce a square wave with 50% duty cycle from a 555 timer circuit.
Set the 555 timer to twice the desired frequency and then clock a T-type flip-flop. That will produce 50% duty cycle.

2) Your PC oscilloscope is AC coupled and therefore does not work all the way down to DC. That is why you are seeing a trace that decays to zero in between pulses.

spark8217, Ramussons and GopherT like this.
3. ### wayneh Expert

Sep 9, 2010
13,638
4,433
I wouldn't expect such poor results at 10 Hz. My old Mac shows a sagging square wave at 5 Hz, because of the capacitive coupling, but nowhere near as bad as the picture above.

I'm concerned about the clipping at ±2.5V. That's a lot higher than line-in and your sound card is not designed for that. Divide down the voltage (simple 2 resistor voltage divider) by 10X or even 100X and see how it looks.

4. ### MikeML AAC Fanatic!

Oct 2, 2009
5,451
1,071
On the 555 circuit; the capacitor charges through 30K (R1+R2), but discharges only through 20K (R2 by itself), leading to a 3/5 duty cycle.

You can get a lot closer to square wave by making R1 ~=4.7K (a practical limit) and R2 = 100K. Now the charge path is 104.7K while the discharge path is 100K. Just reduce the capacitor to get back to 10Hz.

My experience with PC scopes is that they are not very good below about 100Hz.

5. ### Overdale Thread Starter New Member

Jul 30, 2014
5
0
Thank you gentlemen!

R1 is actually 1K, my reporting error, but I will try the suggestions made.

I was a little concerned about the voltage going into my sound card, but figured the safety margin was probably big enough.

I am encouraged now to improve my Scope input by reducing the voltages as suggested.

6. ### Overdale Thread Starter New Member

Jul 30, 2014
5
0
I have now used a ~1:10 voltage divider (10K resistance/1K resistance). This removed the apparent clipping at 2.5v. Why Signalscope is measuring anywhere near 2v when a 10:1 reduction of the 5v input should produce a maximum of 0.5v, I do not understand. My understanding is obviously limited.

Given what the trace now looks like on the screen I reckon I am wasting my time using this setup to measure the waveform.

I attach a picture of my divider (NB 20K Trimpot set to 5K), and the new waveform.

The aim of this project is to simulate the output from equal sized black and white blocks passing a photo sensor at 10 black/white pairs per second. I doubt my printer's circuitry will be fooled if the waveforms vary from square anywhere near as much as my pictures.

Next step - locate a REAL oscilloscope.

File size:
52.8 KB
Views:
46
File size:
11.5 KB
Views:
40
7. ### wayneh Expert

Sep 9, 2010
13,638
4,433
Does the wave square up if you raise the frequency? Try doubling it or more and see.

8. ### BobTPH Active Member

Jun 5, 2013
906
161
That wave looks like a classic differentiator, i.e. high pass filter, fed by a square wave. Just what I would expect from a PC scope at 10 Hz.

Bob

9. ### MrChips Moderator

Oct 2, 2009
14,523
4,282
And the time constant appears to be about 15ms.

Overdale likes this.
10. ### Overdale Thread Starter New Member

Jul 30, 2014
5
0
Yes - and this handy post elsewhere further clarifies matters.

I now feel pretty sure I'm getting what I need out of the timer.

If I had prototyped on a breadboard (which I shoulda!) I would play with higher frequencies, but it's all soldered up, and I'd rather not fiddle.

Thanks guys!

11. ### THE_RB AAC Fanatic!

Feb 11, 2008
5,435
1,309
If you can get access to your PC sound card, you can replace the 2 input caps with much larger uF values.

That will still leave the inputs as capacitor coupled but then it will display lower frequencies much more accurately.

Jul 30, 2014
5
0
File size:
52.2 KB
Views:
28
13. ### wires 1 New Member

Nov 21, 2014
5
0
Hi Overdale I've been working on a square wave astable for some time that I've been trying to stabilise at around 20Hz using a SE555D.
I now use 3 x 0.22 COG (NPO) SMD caps, 2 x 20K fixed and 2 x 3K3 linear PTC thermistors.
Pins 6 and 2 are connected together the resistor chain is from output pin 3 and the caps to earth, pins 7 and 4 are not connected, pins 5 and 1 have a 0.1 COG (NPO) SMD cap across and pin 5 has a 0.1 COG (NPO) SMD cap to earth. I have a 1N4148WS in the power for reverse polarity protection (not always required).
This configuration gives me a beautiful square wave of 19.95Hz at ambient and 20.01Hz at 125 deg C. 0.05Hz over 100 deg C. Stable enough for my use and on a circuit board the size of a postage stamp.

14. ### Brownout Well-Known Member

Jan 10, 2012
2,374
999
The first trace looks like you were probing across the capacitor. Did you post your schematic with an indication of where you probed? Sorry if I missed it, but I didn't see it.

15. ### ian field AAC Fanatic!

Oct 27, 2012
5,563
985
The usual arrangement for the timing network is to connect it to pin 7, pin 7 is an open collector output with a pull up resistor to Vcc - some designers leave out the pin 7 pull up and take the top of the timing C/R to pin 3 instead of pin 7, this is mainly to get more accurate 50/50 mark space ratio. If you use pin 7; its pull up resistor is in series with the charging path, but not the discharge pulse - which causes a M/S ratio error.

Not sure it would help - but its something you can try.