DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: ThinkingMan on September 23, 2019, 07:21:05 PM

Title: Beginner questions on producing "perfect" square waves
Post by: ThinkingMan on September 23, 2019, 07:21:05 PM
Hey guys, first I wanna say really sorry if my question seems embarassing and dumb because I'm an absolute beginner. So, no matter if we're using germanium, silicon, LED, etc. as long as we're using Schmitt trigger circuit we will produce "perfect" square waves with sharp edges. Isn't it? Because I saw a video where someone plug a red germanium Fuzz Face into his o'scope and the square waves look almost perfect with sharp edges. Generally, only silicon fuzzboxes will produce "perfect" square waves with sharp edges because they are higher in gain compared to germanium. This is the video where he plugged in the red germanium Fuzz Face into his o'scope and the result is it is producing almost perfect square waves with sharp edges. https://youtu.be/C1GppYLkoT4

Knowing that Fuzz Faces regardless if it is using germanium or silicon transistors, all Fuzz Faces will produce almost perfect square waves because Fuzz Faces use Schmitt trigger circuit. Am I right?

The man in the video also plugged his Shin Ei Companion fuzzbox into his oscilloscope and the resulting waveforms are not square waves at all. The funny thing is the Shin Ei Companion fuzzbox used silicon transistors, which means it should produced much more perfectly looking square waves compared to the red germanium Fuzz Face. So, I think Shin Ei Companion fuzzbox doesn't use Schmitt trigger at all thus it doesn't produce square waves. Isn't it?
Title: Re: Beginner questions on producing "perfect" square waves
Post by: Rob Strand on September 23, 2019, 08:13:27 PM
The problem is hearing with your eyes.  Small differences on a CRO can be quite different to the ear.

Here's a *test* circuit for opamps:
(https://www.aronnelson.com/gallery/main.php?g2_view=core.DownloadItem&g2_itemId=46652&g2_serialNumber=1)

On the CRO a lot of opamps would look similar but you can hear small differences.   There's a point where your eyes cannot see the difference but your ears still can.

The differences are hidden in the sharp transition zone and the small curve just before clipping occurs.
Title: Re: Beginner questions on producing "perfect" square waves
Post by: ThinkingMan on September 23, 2019, 08:26:49 PM
Sorry but I want direct answers to my questions.
Title: Re: Beginner questions on producing "perfect" square waves
Post by: Phoenix on September 23, 2019, 09:37:07 PM
A traditional fuzz circuit like a Fuzz Face is NOT a Schmitt trigger.

You're also generalizing too much: ie. silicon is higher gain than germanium. While in general silicon transistors are higher gain than germanium, this is far from always true - silicon power transistors are usually significantly lower gain than small-signal germanium for instance, and regardless, the type of device used is far less important than the circuit it is used in. I can very easily take a high gain silicon transistor and put it in a circuit with a gain of <1, and a low gain germanium in a circuit with far higher gain. Everything depends on context.

Also, you seem rather preoccupied with the concept of "perfect" square waves. There is no such thing. All real-world square waves have some rise-time and fall-time, so they are not mathematically perfect.

Certainly, close to ideal square waves are rarely what we want in the guitar world, as most find that sound rather unpleasant. Square waves have much more application in the analog synth world.
Title: Re: Beginner questions on producing "perfect" square waves
Post by: ThinkingMan on September 23, 2019, 10:19:47 PM
It doesn't have to look perfect in the real world, that's understandable that there is no such thing as 100% perfect square wave in the real world but we can see square waves that are almost perfect with sharp edges in the digital world, in the oscilloscope, etc. such as these pictures below (I got these picture from the youtube video link I shared previously)

(https://i.postimg.cc/D8bkcWR4/Screenshot-20190924-102336.jpg) (https://postimg.cc/D8bkcWR4)
Germanium red Fuzz Face producing almost perfect square waves with sharp edges in the oscilloscope

(https://i.postimg.cc/fStF5FqQ/Screenshot-20190924-102349.jpg) (https://postimg.cc/fStF5FqQ)
Shin-Ei Companion fuzz, despite using silicon transistors, doesn't produce any square waves at all in the oscilloscope

But isn't Fuzz Face circuit is based on Schmitt trigger? Mostly when I'm surfing on the Internet, most people said its circuit is based on Schmitt trigger squaring circuit.
Title: Re: Beginner questions on producing "perfect" square waves
Post by: Phoenix on September 23, 2019, 10:41:41 PM
Quote from: ThinkingMan on September 23, 2019, 10:19:47 PM
It doesn't have to look perfect in the real world, that's understandable that there is no such thing as 100% perfect square wave in the real world but we can see square waves that are almost perfect with sharp edges in the digital world, in the oscilloscope, etc. such as these pictures below

You're forgetting that human hearing has a FAR greater dynamic range than can be displayed on an oscilloscope for an entire waveform. Our ears have a dynamic range on the order of ~140dB. Any normal digital oscilloscope only has an 8bit/42dB range. This is NOT to say that "humans can hear things an oscilloscope can't display" or any nonsense like that, only to point out that in order to display ALL the things we can hear on a scope requires that we zoom in. Displaying the entire waveform like that loses a lot of important details, which is what Rob was trying to get at earlier.

And comparing two different circuits in that manner is not valid. They are different, it is expected that they behave differently/give different results. That's like saying: "This apple tastes different from this orange, but they're both fruits, so why do they taste different?".

Quote from: ThinkingMan on September 23, 2019, 10:19:47 PM
But isn't Fuzz Face circuit is based on Schmitt trigger? Mostly when I'm surfing on the Internet, most people said its circuit is based on Schmitt trigger squaring circuit.

Based on ≠ same as. That claim is also rather tenuous to begin with in my opinion. Remember, just because you read something on the internet does not make it true. Compare the schematics of a Fuzz Face to a 2 transistor Schmitt trigger. While they bare a visual similarity (as any two transistor circuit does), that's about the extent of it. Functionally they are very different.

You've asked this question or similar a couple of times now. And you have seemed disappointed with the responses you've gotten.
Quote from: ThinkingMan on September 23, 2019, 08:26:49 PM
Sorry but I want direct answers to my questions.
So what's your real question?

EDIT:
And that Fuzz Face trace is not even CLOSE to a perfect square wave. Duty cycle is way off, distinct slope on the lower half of the waveform. If that's how you define a "perfect square wave" it's no wonder there has been confusion and people giving you unsatisfying answers. I, for one, no longer have any idea what it is you are asking.
Title: Re: Beginner questions on producing "perfect" square waves
Post by: ThinkingMan on September 23, 2019, 10:55:31 PM
So we can tell which sound is square wave without seeing it on an oscope while knowing Shin-Ei Companion fuzz doesn't actually producing square wave sounds? Is that what you mean?

Ok, so it is like this. If anyone make a fuzzbox based on Fuzz Face circuitry and use either germanium or silicon transistors it will produce nearly square waves on oscilloscope while if someone make a fuzzbox based on Shin-Ei Companion fuzz and use silicon transistors it will not produce any square waves because of the differences of how its circuitry is set up. No?

So what's my real questions? Did all Fuzz Faces regardless if it is germanium or silicon transistors produced nearly perfect square waves on oscilloscope? Why did Shin-Ei Companion fuzzbox didn't produced any square waves on o'scope like what the previous photos had shown despite using silicon transistors? Maybe other fuzzboxes have different setup compare to Fuzz Faces?
Title: Re: Beginner questions on producing "perfect" square waves
Post by: ThinkingMan on September 23, 2019, 10:57:46 PM
So, what would ideal or perfect square waves look like on the oscilloscope?
Title: Re: Beginner questions on producing "perfect" square waves
Post by: Rob Strand on September 23, 2019, 11:02:24 PM
Dude, take a step back.

QuoteBut isn't Fuzz Face circuit is based on Schmitt trigger? Mostly when I'm surfing on the Internet, most people said its circuit is based on Schmitt trigger squaring circuit.

Phoenix already answered that and your other questions.
QuoteA traditional fuzz circuit like a Fuzz Face is NOT a Schmitt trigger.

A high percentage of the stuff on the internet is misguided rubbish.  So don't take it as true.  Quite often videos seem to make sense to untrained Ninjas like yourself but to Master Ninjas it's total crap!

You have to change these beliefs:
- the idea of perfect square waves
- silicon means near perfect squares
- germanium means imperfect square waves
- a Schmitt trigger is the only way to get a square wave

The reason you have a dilemma is because you believe these to be true but the examples you gave are showing them to be false.

Read over Phoenix's post again.   He pretty much squashes all those beliefs.
Title: Re: Beginner questions on producing "perfect" square waves
Post by: Phoenix on September 23, 2019, 11:03:50 PM
Misconception number 1: All fuzzes produce square wave outputs.
No, not all fuzzes produce square waves.

Misconception number 2: All fuzzes use the same circuit, only differing transistor type.
No, there are many, MANY different fuzz circuits. The Shin Ei has a COMPLETELY different circuit than the Fuzz Face.

Misconception number 3: The Fuzz Face produces "nearly perfect square waves".
They most certainly do not.
Title: Re: Beginner questions on producing "perfect" square waves
Post by: Phoenix on September 23, 2019, 11:05:31 PM
Quote from: ThinkingMan on September 23, 2019, 10:57:46 PM
So, what would ideal or perfect square waves look like on the oscilloscope?
(https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Waveforms.svg/800px-Waveforms.svg.png)
Title: Re: Beginner questions on producing "perfect" square waves
Post by: ThinkingMan on September 23, 2019, 11:11:59 PM
Thanks for the responses, guys. Can we achieve such square waves with four equal sides and four equal angles on the oscilloscope? If it is possible, how?
Title: Re: Beginner questions on producing "perfect" square waves
Post by: Phoenix on September 23, 2019, 11:15:06 PM
Quote from: ThinkingMan on September 23, 2019, 11:11:59 PM
Thanks for the responses, guys. Can we achieve such square waves with four equal sides and four equal angles on the oscilloscope? If it is possible, how?

Easy, use the in-built calibration signal on the oscilloscope. This is always a square wave, and is almost always 10kHz. It will always have better rise-and-fall-times than the bandwidth of the scope is capable of displaying. This is used for calibrating your probes. Only the cheapest and oldest scopes do not have this.
Title: Re: Beginner questions on producing "perfect" square waves
Post by: Sooner Boomer on September 23, 2019, 11:56:56 PM
It's not too hard to make a circuit that will give a perfect square wave when hooked up to an o-scope.  It's a lot harder when you have to drive a real world load.  You can "generate" the perfect waveform (whatever shape it may take), but real world loads aren't just restive; loads are capacitive, reactive, reluctant, and just downright nasty to deal with.  Be warned.

I don't think a fuzz face-style circuit is going to give you a square wave.  Look up the circuit for "Shoe Pixel", and listen to it on youtube.

Don't believe anything I write, I make it all up - including this.
Title: Re: Beginner questions on producing "perfect" square waves
Post by: ThinkingMan on September 24, 2019, 12:40:51 AM
Quote from: Phoenix on September 23, 2019, 11:15:06 PM
Quote from: ThinkingMan on September 23, 2019, 11:11:59 PM
Thanks for the responses, guys. Can we achieve such square waves with four equal sides and four equal angles on the oscilloscope? If it is possible, how?

Easy, use the in-built calibration signal on the oscilloscope. This is always a square wave, and is almost always 10kHz. It will always have better rise-and-fall-times than the bandwidth of the scope is capable of displaying. This is used for calibrating your probes. Only the cheapest and oldest scopes do not have this.

Is there a sound example of that?

Back to the fuzzboxes producing square waves, we can conclude the germanium red fuzz face produce square waves while the shin-ei companion, despite using silicon transistors, doesn't produce any square waves like what the pictures show. Why is that happen? Because of different circuits? Can you explain?
Title: Re: Beginner questions on producing "perfect" square waves
Post by: ThinkingMan on September 24, 2019, 12:42:35 AM
Quote from: Sooner Boomer on September 23, 2019, 11:56:56 PM
It's not too hard to make a circuit that will give a perfect square wave when hooked up to an o-scope.  It's a lot harder when you have to drive a real world load.  You can "generate" the perfect waveform (whatever shape it may take), but real world loads aren't just restive; loads are capacitive, reactive, reluctant, and just downright nasty to deal with.  Be warned.

I don't think a fuzz face-style circuit is going to give you a square wave.  Look up the circuit for "Shoe Pixel", and listen to it on youtube.

Don't believe anything I write, I make it all up - including this.

Yeah I dont believe you at all... Lol.

I don't think we can produce perfect waveforms in the physical world. Thats for sure. Is there any video or photo that shows the resulting waveform of Shoe Pixel?
Title: Re: Beginner questions on producing "perfect" square waves
Post by: Phoenix on September 24, 2019, 12:54:53 AM
Quote from: ThinkingMan on September 24, 2019, 12:40:51 AM
Is there a sound example of that?
Google is your friend.

Quote from: ThinkingMan on September 24, 2019, 12:40:51 AM
Back to the fuzzboxes producing square waves, we can conclude the germanium red fuzz face produce square waves while the shin-ei companion, despite using silicon transistors, doesn't produce any square waves like what the pictures show. Why is that happen? Because of different circuits? Can you explain?
Yes, as explained previously, they are different circuits. The transistor type difference is the least of the differences. If you put silicon in the fuzz face it would still behave similarly, or if you put germanium in the Shin Ei it will not suddenly start producing square waves. One's an apple, one's an orange. They may both be fruit, but they are very, VERY different.

You still seem to be entering this discussion with some preconceived ideas, ones which you need to reevaluate. Please re-read through some of the earlier posts in the discussion which have highlighted these issues.
Title: Re: Beginner questions on producing "perfect" square waves
Post by: ElectricDruid on September 24, 2019, 05:49:29 AM
Quote from: ThinkingMan on September 23, 2019, 11:11:59 PM
Thanks for the responses, guys. Can we achieve such square waves with four equal sides and four equal angles on the oscilloscope? If it is possible, how?

A genuine, perfect square wave isn't required to have all four sides the same. Think about what happens when you turn the volume down, or up ;)  For any given frequency, there will be one amplitude where the height of the waveform equals the period of the waveform, but that's a fluke and nothing to do with its "squareness" in the harmonic sense.

Analog synth oscillator chips like the CEM3340/V3340/AS3340 generate very good quality square waves across the audio range (and ramps and triangles too) if that's what you want to do. If you want a wider frequency range, you're talking about a "function generator" which is lab equipment to do this job.
Title: Re: Beginner questions on producing "perfect" square waves
Post by: Ben N on September 24, 2019, 02:17:02 PM
PWM is pretty close to a perfect square wave.
Title: Re: Beginner questions on producing "perfect" square waves
Post by: GibsonGM on September 24, 2019, 03:27:00 PM
You could look at some 555 astable circuits (set up as PWM!), and then attach one to a speaker to hear a 'near perfect square wave'.   I mean, a 555 doesn't get 100% duty cycle, so it's not PERFECT, but will be FAR more perfect than a FF.   Of course, the output is only one frequency, so it will be quite bland, but it will still have the sound of a square wave.    I describe that as "Crap"...
Title: Re: Beginner questions on producing "perfect" square waves
Post by: ElectricDruid on September 24, 2019, 03:46:40 PM
Quote from: Ben N on September 24, 2019, 02:17:02 PM
PWM is pretty close to a perfect square wave.

I don't really know what you mean here, Ben.

I like PWM too, but since a PWM waveform spends so little time actually being square (mostly being some other pulse wave somewhat away from a pure 50/50% square wave) it seems a bit odd to say its a perfect square.

We should mention the easy way to get a perfect 50%/50% square if you've got a fixed frequency pulse from a 555 or whatever is to run it through a flip-flop to divide it down by two. The flip-flop's output is guaranteed to be square as long as the frequency isn't changing.

HTH,
Tom
Title: Re: Beginner questions on producing "perfect" square waves
Post by: PRR on September 24, 2019, 07:02:44 PM
Quote from: Phoenix on September 23, 2019, 11:15:06 PMEasy, use the in-built calibration signal on the oscilloscope. This is always a square wave, and is almost always 10kHz. It will always have better rise-and-fall-times than the bandwidth of the scope is capable of displaying. This is used for calibrating your probes. ...

It's not always better than the 'scope. It really only has to be considerably better than the cross-over point of the 10:1 probe, often in the kHz not MHz range.

It will normally be calibrated for Volts and Seconds, as a quick verification of the internal gain and time-base, especially when turned to a VAR position.
Title: Re: Beginner questions on producing "perfect" square waves
Post by: Rob Strand on September 24, 2019, 07:07:50 PM
I wasn't going to mention anything but consider what it means to have perfect square-wave for an audio signal.

The main points are:
- we can only hear upto 20kHz (as an upper limit)
but
-   the harmonics of a "perfect" square-wave extend to infinity.

Clearly there's something pointless about the goal of a perfect square-wave for audio.

So one view is to take a 1kHz square-wave and sum all the odd harmonic upto 19kHz.
The result is a rippled waveform such as the plot about halfway down this page,
https://www.allaboutcircuits.com/textbook/alternating-current/chpt-7/square-wave-signals/

[not 1kHz but the shape is the important thing]
(https://www.allaboutcircuits.com/uploads/articles/sum-of-harmonics-approximates-square-wave-diagram3.jpg)

So to the eye it looks bad but to the ear it's a perfect square wave.

So another approach would be to take a squarewave pass it through a first-order low-pass filter.
If the filter cut-off is high enough (say 200kHz) there is little filtering of the square-wave harmonics upto 20kHz so to the ear it sounds like a square wave.   The waveform in this case will have sloped edges.  For a 200kHz first order filter the rise and fall times would be 1.75us which you can see on a CRO if you zoom in.  The waveform would have this shape,

[not 1kHz but the shape is the important thing]
(http://ctms.engin.umich.edu/CTMS/Content/Activities/html/Activities_RCcircuitB_03.png)

So the next step would be to use a higher order filter with a cut-off of say 200kHz.  Again the harmonic up to 20kHz are left pretty much intact.   In this case we would get a waveform which looks like,

[not 1kHz but the shape is the important thing]
(https://qph.fs.quoracdn.net/main-qimg-93b83d13296ea3f1f4c6560de2eaf426)

The ringing looks bad to the eye but the ring is at 200kHz, way above human hearing.   It's like bats chirping while listening to something we simply don't hear the extra signals.  In fact we can add a whole heap of rubbish to the square wave.  If the harmonics of the added signal are above 20kHz we would not hear it but the CRO waveforms would not look like a square-wave at all.
Title: Re: Beginner questions on producing "perfect" square waves
Post by: Rob Strand on September 24, 2019, 07:17:37 PM
QuoteIt's not always better than the 'scope. It really only has to be considerably better than the cross-over point of the 10:1 probe, often in the kHz not MHz range.
It actually doesn't need to be that great since the compensation adjustment affects quite a large fraction of the waveform.     If you try to adjust it with a high frequency square wave often you see tilt when you look at a low frequency square-wave.

For some of very old CROs the edges were quite slow so you could set-up the astigmatism.
Title: Re: Beginner questions on producing "perfect" square waves
Post by: Phoenix on September 24, 2019, 09:09:13 PM
Quote from: PRR on September 24, 2019, 07:02:44 PM
Quote from: Phoenix on September 23, 2019, 11:15:06 PMEasy, use the in-built calibration signal on the oscilloscope. This is always a square wave, and is almost always 10kHz. It will always have better rise-and-fall-times than the bandwidth of the scope is capable of displaying. This is used for calibrating your probes. ...

It's not always better than the 'scope. It really only has to be considerably better than the cross-over point of the 10:1 probe, often in the kHz not MHz range.

It will normally be calibrated for Volts and Seconds, as a quick verification of the internal gain and time-base, especially when turned to a VAR position.

My mistake, apologies to the OP, but does serve to illustrate my point of:
Quote from: Phoenix on September 23, 2019, 10:41:41 PM
Remember, just because you read something on the internet does not make it true.
Title: Re: Beginner questions on producing "perfect" square waves
Post by: ThinkingMan on September 25, 2019, 03:10:05 AM
Ok wait, perfect square waves are not equal to symmetrical square waves with equal sides and equal angles. Such as these pictures below. Right?

(https://i.postimg.cc/cvQ7DTFs/IMG-20190925-145546.jpg) (https://postimg.cc/cvQ7DTFs)

(https://i.postimg.cc/753KdqKJ/IMG-20190925-150353.jpg) (https://postimg.cc/753KdqKJ)

These symmetrical square waves are possible to reproduce on the oscilloscope, I believe. Most square wave sounds I heard came from irregular square waves but I never heard anything coming out from these kind of square waves. The closest is the Raise The Dead fuzz from Tatefx, but not all of the square waves are equal in sides especially the smaller rectangular waves next to the squarish waves. It is a silicon based fuzzbox.

(https://i.postimg.cc/xJ8yfmSh/IMG-20190924-110152.jpg) (https://postimg.cc/xJ8yfmSh)

(https://i.postimg.cc/vgC9GShx/IMG-20190924-110216.jpg) (https://postimg.cc/vgC9GShx)
Title: Re: Beginner questions on producing "perfect" square waves
Post by: ElectricDruid on September 25, 2019, 06:00:56 AM
Quote from: ThinkingMan on September 25, 2019, 03:10:05 AM
Ok wait, perfect square waves are not equal to symmetrical square waves with equal sides and equal angles. Such as these pictures below. Right?

(https://i.postimg.cc/cvQ7DTFs/IMG-20190925-145546.jpg) (https://postimg.cc/cvQ7DTFs)

(https://i.postimg.cc/753KdqKJ/IMG-20190925-150353.jpg) (https://postimg.cc/753KdqKJ)

Right. The crucial part of those diagrams that makes those "perfect square waves" is that the relationship between the high and low periods should be exactly 50%/50% (AKA the duty cycle). The amplitude is variable, so the height of the waveform can go up and down. You can have quiet square waves and loud square waves, and they won't look as neatly "square" as the ones in the little diagrams, but they're still perfect square waves.

Quote
These symmetrical square waves are possible to reproduce on the oscilloscope, I believe. Most square wave sounds I heard came from irregular square waves but I never heard anything coming out from these kind of square waves. The closest is the Raise The Dead fuzz from Tatefx, but not all of the square waves are equal in sides especially the smaller rectangular waves next to the squarish waves. It is a silicon based fuzzbox.

(https://i.postimg.cc/xJ8yfmSh/IMG-20190924-110152.jpg) (https://postimg.cc/xJ8yfmSh)

(https://i.postimg.cc/vgC9GShx/IMG-20190924-110216.jpg) (https://postimg.cc/vgC9GShx)

Yep, those are getting pretty close. As you've noticed, the duty cycle is not the perfect 50/50, so you don't get exactly the harmonic series of a square wave. Other pulse waves have some even harmonics, whereas the perfect square wave has only odd harmonics (More about that here: https://electricdruid.net/timbral-evolution-harmonic-analysis-of-classic-synth-sounds/ (https://electricdruid.net/timbral-evolution-harmonic-analysis-of-classic-synth-sounds/)).