ATtiny13 mute pin

Full disclosure. I am a total noob and am trying to learn but would really really appreciate help programming an ATtiny13.

Basically, I'm using an ATtiny13 to control a relay for switching in a guitar pedal. Because of the gain of the pedal and the efficiency of the relay there's a "switch pop" when switching.

The usual solution is to use an optocoupler or LED and LDR to pull the output to ground for ~30ms as the relay switches which eliminates the pop.

I have the programming worked out to send a brief output voltage to light the LED. It works OK. The problem is the LDRs are slow and variable and some work better than others.

I think there's a better way. Instead of the output pin switching to HIGH for 30ms to light the LED. I would like to program it to:

  1. When not switching, sit as an input that does nothing to not affect the output
  2. When switching, change to a OUTPUT set to LOW to function as a (near) ground to mute the output.

Right now the programming is set to LOW OUTPUT when not switching. I've tested this and it's close enough to ground to mute the signal. So this should work.

In at a loss trying to program. I would have no problem shaing the entire code if someone could walk me through programming this.

Any help would be so very appreciated.
Thank you!

An advantage of the LDR approach is that it isolates the power supply of the tiny13 part of the circuit from the (possibly nasty) levels of the guitar pedal (and/or vis versa) (the relay does the same thing for the more involved part of the circuit, probably.)

The pedal circuitry may also simply use voltages (9V?) that are not compatible with microcontrollers (yes, even if the pin is set as an "input that does nothing.")

That's fair. I didn't consider the microcontroller may not be able to handle the excess voltages from the pedal circuit.

Any thoughts on if the pin toggles from high to low, low only for the mute, and is otherwise connected through an electrolytic capacitor, basically functioning as a coupling capacitor? This would only allow voltage to flow from the pedal to the pin when low (ground) and wouldn't allow voltage to flow from the pin to the circuit.

Optocoupler would be much faster than an LDR. Have you tried that approach?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.