Help! Steady ticking noise from relay switching.

Started by Nocaster Cat, July 31, 2017, 09:29:04 AM

Previous topic - Next topic

Nocaster Cat

I've been messing around with a relay based switching system and I'm getting a low but audible ticking noise when the pedal is engaged (the louder you turn up the pedal, the louder it gets). At first I thought it may be something with the wiring in the back room where my workbench is as it's the only place in the house that hasn't been rewired but I tried outlets in three different rooms and it's still present. Then I thought maybe it was the pedal itself (a Distortion+ clone) but then I tired it in another circuit and it happens there too. To review...


  • Using a MCU and relay to control switching.
  • Getting a low but audible ticking noise that's steady, almost like clock noise.
  • No noise issues prior to changing over to the relay based switching.
  • Dirty power, amp issues, etc. have been ruled out.
  • Same issue occurring with multiple circuits.

What do you guys need from me? Any help would be greatly appreciated, thanks!

Groovenut

If it gets louder with pedal volume level increase, I would hazard a guess the uC oscillator is bleeding into the input of the circuit via the layout.
You've got to love obsolete technology.....

Nocaster Cat

Quote from: Groovenut on July 31, 2017, 10:40:45 AM
If it gets louder with pedal volume level increase, I would hazard a guess the uC oscillator is bleeding into the input of the circuit via the layout.

Layman's terms? Possible fixes? Thanks.

Groovenut

Is the uC/relay circuit on a seperate pcb or part of the main pcb?
You've got to love obsolete technology.....

Nocaster Cat

Quote from: Groovenut on July 31, 2017, 10:58:06 AM
Is the uC/relay circuit on a seperate pcb or part of the main pcb?

Both actually. I first built it out on a separate PCB and since all went well (or so I thought), I incorporated it into the main PCB. When I started to hear the ticking, I went back and wired in the separate board to verify and that's when I heard the ticking there too.

Groovenut

Quote from: Nocaster Cat on July 31, 2017, 11:15:38 AM
Quote from: Groovenut on July 31, 2017, 10:58:06 AM
Is the uC/relay circuit on a seperate pcb or part of the main pcb?

Both actually. I first built it out on a separate PCB and since all went well (or so I thought), I incorporated it into the main PCB. When I started to hear the ticking, I went back and wired in the separate board to verify and that's when I heard the ticking there too.
If the ground for the uC/Relay circuit doesn't have it's own direct connection to the power ground, you might try making sure it does and see if that helps. Same goes for the 5V regulator that is providing power for the uC. If the physical location of the uC is near the circuit input, try relocating it away. Most uC circuits have a separate ground pour surrounding or at the very least separating them from the audio circuit.

Also if you could provide some form of circuit diagram or schematic that will help too.
You've got to love obsolete technology.....


amz-fx

Quote from: Groovenut on July 31, 2017, 10:40:45 AM
If it gets louder with pedal volume level increase, I would hazard a guess the uC oscillator is bleeding into the input of the circuit via the layout.

Or via the power supply connection.

The voltage regulator is not specified but some of them need a capacitor on the input pin close to the regulator.

regards, Jack

Nocaster Cat

#8
Quote from: amz-fx on July 31, 2017, 12:26:18 PM
The voltage regulator is not specified but some of them need a capacitor on the input pin close to the regulator.

It's a 5v regulator, ON Semiconductor PN LM78L05ACZX.

So a cap on the input and output?

Nocaster Cat

So I did some poking around and the culprit seems to be the LED. If I disconnect it, the ticking stops. If I reconnect it, the ticking starts again.  :icon_question: :icon_question: :icon_question:

Nocaster Cat

#10
Update...

If I put one leg of a 1µF cap between pin 7 of the uC and the LED and the other leg to ground, the ticking stops. Lift it and it starts again.

Groovenut

Quote from: Nocaster Cat on July 31, 2017, 06:51:40 PM
So I did some poking around and the culprit seems to be the LED. If I disconnect it, the ticking stops. If I reconnect it, the ticking starts again.  :icon_question: :icon_question: :icon_question:
Does it tick with the LED on, off or both?
You've got to love obsolete technology.....

Nocaster Cat

Quote from: Groovenut on August 02, 2017, 02:19:04 PM
Quote from: Nocaster Cat on July 31, 2017, 06:51:40 PM
So I did some poking around and the culprit seems to be the LED. If I disconnect it, the ticking stops. If I reconnect it, the ticking starts again.  :icon_question: :icon_question: :icon_question:
Does it tick with the LED on, off or both?

Just when it's on. I talked to an EE my dad works with and he said it's the current ripple from the LED when it's on. He confirmed the cap to ground was good solution and said to add a 47r resistor in series (pin 7 of the uC > 47r > 1µF to ground > LED) to keep everything stable and happy.

Groovenut

Quote from: Nocaster Cat on August 02, 2017, 04:55:06 PM
Quote from: Groovenut on August 02, 2017, 02:19:04 PM
Quote from: Nocaster Cat on July 31, 2017, 06:51:40 PM
So I did some poking around and the culprit seems to be the LED. If I disconnect it, the ticking stops. If I reconnect it, the ticking starts again.  :icon_question: :icon_question: :icon_question:
Does it tick with the LED on, off or both?

Just when it's on. I talked to an EE my dad works with and he said it's the current ripple from the LED when it's on. He confirmed the cap to ground was good solution and said to add a 47r resistor in series (pin 7 of the uC > 47r > 1µF to ground > LED) to keep everything stable and happy.
That's what my guess was too. Another solution would be to use an NPN BJT transistor to drive the LED and then drive the transistor with the uC. Something like pin7 to 10k resistor to base of transistor. Emitter to ground. Collector to 1k resistor to LED cathode, LED anode to VCC. You could also sub the BJT for a 2n7000 mosfet. When the base/gate goes high the LED lights.
You've got to love obsolete technology.....

PRR

> the current ripple from the LED when it's on

Why is there ripple? The DC is steady. The resistor and LED do not vary.

Is your code running in a loop which turns the LED off and on each pass?
  • SUPPORTER

anotherjim

I'd suspect the code too. LED current with 1K is modest (about 3.5mA?), but are you sourcing the LED or sinking it? I can't see the polarity of LED shown in the schematic. Some MCU outputs can sink more current than they can source but I suspect most, if not all, can handle that level of current either way.
Is it possible you have used a block of code meant to control an LED brightness using PWM? Oscilloscope would show if that port pin was stable DC.
Is the port setup code in the main loop and somehow switching briefly to the port as input pin and back to output everytime thru the loop?
Is the MCU running at the clock frequency it should be? There are usually different options and the default may be slower than you want.

Nocaster Cat

Thanks for the replies. I'm very new to this so I can't say for sure the code isn't to blame. Guess it's back to the drawing board!

slacker

Let us have a look at your code, someone will probably be able to spot if there's anything wrong with it.