1
\$\begingroup\$

I've got a signal coming from an electric guitar and I need to switch it. Basically it's a distortion circuit. I need to switch between the distortion and clean (directly connected to the output)

My first approach was to use a DPDT switch but I have none at home, they are a bit expensive at my local shop and I haven't got a lot of money for the moment (around 8€/10$ for the cheapest one).

Then I took a look at what I have in stock and I found a cheap solution, a simple momentary switch, an ATTiny45, a 4066 quad bilateral switch and some caps and resistance. Basically the ATTiny45 read the switch and control the 4066. Even if I had to buy them, the sum for these components is cheapest than the price of a single DPDT switch. I've tested this solution and it seems to work fine from an ear point of view. And I've got no switching noise, which I suspect I would have with the DPDT solution.

So my question is, do you see any technical advantages for the DPDT or disadvantage for the "logic" solution regarding the application I've described ?

TIA - EIS

\$\endgroup\$
  • \$\begingroup\$ The answers cover the need for +/-V on the 4066. You can throw away the ATTiny and connect the SPST switch (and a pullup resistor) directly to the 4066, without worrying about logic level shifting. \$\endgroup\$ – Brian Drummond Nov 11 '14 at 12:09
2
\$\begingroup\$

Without knowing more about the signal that you are switching, here are some general comments.

  1. The voltage that 4066 can switch is limited by its supply rails. If the switched signal extends outside of the supply rails, the 4066 will clip it. A relay can switch considerably higher voltages.

  2. A mechanical relay would introduce practically no noise into the signal that it's switching. The 4066 will introduce a small amount of noise. If the switched signal is strong, then the noise introduced by 4066 can be ignored.

At the same time, Emmanuel you've tested your setup and haven't noticed these problems.

| improve this answer | |
\$\endgroup\$
2
\$\begingroup\$

The 4066 should have +/- rails unless the level is very low (few hundred mV tops), otherwise it will clip at the minus rail less 600mV (and could damage the chip).

If you use +/- supplies, like +/-5V, then you need the control signal also to go +/-5V. That means a transistor on the ATTiny output to level-shift.

The 4066 will introduce a lot of distortion (by audiophile standards) if the input is not very high impedance. For example, if it is 10K, and the supplies are +/-5V the distortion will typically be 0.4% THD according to the datasheet.

http://www.ti.com/lit/ds/symlink/cd4066b.pdf

This is because the switch has a relatively high series resistance and that resistance varies significantly with the input/output voltage with respect to the supply rails.

The 4066 will not be as robust as a switch with respect to ESD on the input and output connections, so you may experience occasional failures if you don't add protection such as TVS devices.

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

CMOS gates are not ideal for switching small signals for a number of reasons. JFETs would be better because they can handle larger voltages, but they are also not ideal. One problem with CMOS gates is that they have some on resistance (Ron). Meaning they cannot be used as perfect signal switches because they can never really be totally off or totally on depending on how they're wired. And the Ron flatness over the full signal swing is not completely flat. Meaning at some signal level, you will get distortion that will very noticeable. Finally, CMOS gates and MOSFETs in general have potentially high junction capacitance. Each junction could have what looks like a 100p cap to ground. Depending on the load, this can result in high frequency signal loss (aka "tone sucking" in guitar speak).

But if the circuit is designed around the CMOS gates to minimize these effects, it could work fairly well. For a guitar distortion pedal, it would be fine. Look at the schematic for the "tube screamer". It uses JFETs for bypassing. Many pedals and guitar amps use JFETs for switching.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.