Showing posts with label Theory. Show all posts
Showing posts with label Theory. Show all posts

Ground loops and guitar pedals

Yesterday, I received an email from a beginner that decided to make his first guitar pedal. I always enjoy this kind of emails and answering questions is part of the game. This time, he asked me a question that I had several times: "my circuit is noisy, could it be a ground loop?"

Ground loops are part of the legends and myths around DIY guitar pedals. When asking about noise in a setup, it is the most common answer, and is supposed to be the main cause for hum, hiss or other noises that you can have on your first circuits.

Montagne Tremolo PCB

So I decided to write a post about it, starting from the begining:

What is the ground?

The ground connection is the reference point of the circuit, with a 0V potential. On schematics, it is represented by these symbols:

Ground schematic

It is very important that the reference point is the same in all the circuit, so all the ground connections should be connected together!

To make it easier, lazy PCB designers like me usually add what is called a "ground plane". It is a large conductive surface that is connected to ground and allows easy connections of grounds together.

On this picture, you can see the ground plane between the components and the tracks. I circled a pad of R21 that is connected to the ground plane:
Ground plane connection

You can clearly see the cross-shaped pad that connect it to the ground plane.

So what happens if you do not connect the ground connections together? By doing that, the reference point is not the same in every ground connection: you create a potential difference that is to say a voltage! Most of the times your circuits will not work, so pay attention to it!

So, what is a ground loop then?

Most of the times, ground is connected to "earth". This is the third plug that is usually on your power outlets. It avoid electrocutions by connecting metallic parts of the device to ground.

However, it sometimes happens that earth connections are not connected to each other. This can cause a slight difference between the two grounds reference point, creating a small voltage between the two grounds!
Ground Loop

Even if this difference is generally quite low, it is sufficient to generate a current if you connect these two grounds with a jack! This current will generate noise, usually modulated by the frequency of your outlets (50 or 60Hz depending where you live): it is a ground loop!

Ground loop guitar pedals

In this case, the ground loop would be caused by your electrical setup. This happens quite on lot on crowded pedalboards in houses with old electricity installations.

However, the same thing can happen between your effects pedals! Sometimes, each pedal can have a reference point that is slightly different and create current in the ground! This is why it is generally better to use power supplies with isolated outputs.
Ground loop guitar pedals
However, even with the best power supply available, ground loops can still happen between the grounds of the jacks. You understand that it is no simple solution! 

This is why it is important in to design pedals that do not have this kind of problem.
But how to do it?

Ground loop and star wiring

Ideally, multiple path to connect two different grounds should be avoided. If many paths connect ground together, it can create potential differences that will generate noise! That is why a ground plane should not be divided in several parts.

A good practice that I always recommend for your DIY pedals is the "star wiring": connect all ground connections in one point, most of the times at the negative pin of the power supply jack.
This is what I recommend in my post about guitar pedal wiring.

Ground and antenna

As you see, everything is very simple... So let's add one more level of complexity: did you know that the ground connection can behave like an antenna?

That is why it is very important to connect the enclosure to ground. By doing so, you create a Faraday cage that prevents the circuit from being parasited by outside electromagnetic fields. A metallic enclosure is thus a must to make guitar pedals. Avoid plastic enclosure and use aluminum enclosures like Hammond enclosures for instance.

This can also be a huge problem when mixing analog and digital circuits. Indeed, the high frequencies used by digital chips can be received by the analog ground and create noise. It is thus very important to separate analog ground from digital ground physically and connect them only in one point.

This was one of the main difficulty that I encountered when I designed the Montagne Tremolo circuit board. It was quite a lot of work to solve it out!

There it is, I hope that everything is clear for you now! If not, post a comment!

Did you like this post? Like the Coda Effects Facebook Page for more or follow us on Instagram.

To go further

Icons used to desig the diagrams in this post are from the Noun Project and are protecte under the Creative Commons License.

Relay Bypass: final code

After the crowdfunding campaign, I decided to update the relay bypass code.

Indeed, this first version was nice, but one main drawback that was feedbacked to me is that the switch was activated on release, which was not always very intuitive or easy to handle. Moreover, I wanted to add a "temporary" bypass option in the Montagne Tremolo.

Montange Tremolo Relay Bypass

In this post, I am going to explain a bit the new code and to show you how I did it.

If you have not read my post about Relay Bypass, I highly recommend you to read it before reading this post. All the basics of microcontrollers are presented there.

  Tip! The full code is available on Github. With the relayonpress.c and header.h files, you will have everything needed to code or burn chips.

If you already have a GitHub account, you can Star the project for updates, or Fork it to modify it and make your own Relay Bypass code.

Lets go!

Tonebender MKIII clone (Aion Electronics Phobos)

Here is my last build: a Tonebender MKIII clone! The tonebender was initially a derivative of the Fuzz Face, a bit closer to an amp distorsion than a fuzz. (read my post about the different types of fuzz) It became quickly famous thanks to a lot of guitarists like Jimmy Page or Jeff Beck.

The MK2 version used two germanium transistors to get fuzzy tones. However, due to the nature of the circuit, the quality of the fuzz was very dependent on the transistor's gain and characteristics, just like in the Fuzz Face. In order to avoid the selection of transistors, the Mk3 version used 3 transistors, so that the quality of the sound is less dependent on the germanium transistors used. Here is my version:

Tonebender MKIII clone Aion Electronics Phobos

Relay bypass with anti pop system: noiseless and clickless true bypass

Did you like my post about relay bypass? At least I did, and now I use it in almost all my pedals! Thus, they are longer lasting, and we avoid the mechanical noises of a 3PDT. However, I noticed something annoying: the relay bypass makes more "pop" noises than the 3PDT, especially with high gain circuits...

Indeed, relays tend to switch from one state to another much quicker than big mechanical 3PDT switches, which causes the "pop" noises to appear. The gainier the pedal, the more it will amplify the pop and make it louder.

So I adapted a system that I have found on Stompville that suppresses all these noises. Here is the result, with a (very) simple "before and after" video:

Tap tempo tremolo DIY: a complex project!

I am currently prototyping a tap tempo tremolo that I conceived. It is quite a big project, and I have been working on it since nearly 6 months now! Like many guitarists, I really like the warm vintage sounds that you can achieve using tremolo (like in "Bang Bang" from Nancy Sinatra), but also the choppy madness that you can get with square waves, like in "Know your enemy" from Rage Against The Machine, or even weird stuff with high speed tremolos... A really cool effect!

I play regularly in a band, and my point of view is that tap tempo is just absolutely needed for rhythmic effects like delays for instance. Thus, I decided to add one in my tremolo. It is not easy to implement a tap tempo, as you have to use digital circuitry, as we will see later... Here is my current prototype:
DIY tremolo with tap tempo
That is a lot of knobs! You can already notice that there are two footswitches: tap tempo (right side), and the true bypass footswitch that is a clickless relay bypass system! I used the relay bypass system that I conceived, which is completely silent, and more reliable than classic 3PDT true bypass. Indeed, 3PDT footswitches are the main reason for guitar pedal failure. The little switch in the middle of the two LED (bypass LED, and tempo LED) allows you to switch the pedal temporarily. This is nice to add some choppy stuffs while you play!

Relay Bypass: conception and relay bypass code

You might already have heard about "relay bypass", or even used it without knowing it. It a different true-bypass system than the classical 3PDT switch. Instead of using a mechanical 3PDT switch, a soft switch, a microcontroller and a relay are combined to turn the effect on and off.
Relay bypass PCB DIY
 So... Why bother? My 3PDT switch is great, don't you think?

As you may already know, 3PDT switches are the main cause of guitar pedal failure. These switches are not particulary though, and they often break, especially as we smash it continuously with our feet on stage. A classical high quality 3PDT switch is rated for 30,000 activation cycles. With relay bypass, we use a relay that will play the mechanical role of connecting ins and outs. Relays are usually rated between 10 and 100 millions cycles! Thus, this system is much more reliable.

Moreover, the soft switch that we use to activate the guitar pedals also last longer than a 3PDT, usually around 50,000 cycles! They are also easier to replace, as there are only 2 connections to make with the relay bypass system, and not the full 3PDT wiring.

This blog post will present you how does it work, and how to make your own relay bypass system using a microcontroller, from the beginning to the end! Long stuff (but good stuff?)!