Author Topic: Kemet EC2-5NU relay problem  (Read 1037 times)

anotherjim

Re: Kemet EC2-5NU relay problem
« Reply #20 on: January 29, 2021, 04:51:16 AM »
Do you mean the relay coil is making the noise like the inductors in some old switchmode PSU's do?
Is the micro output pulsing? Are you using an analog_write instead of digital_write to switch the BJT?
Do you have a flyback diode across the coil (can kill the BJT if no diode).
Schematic! Code snippet!


Croeso i Diystompboxes.

Ripthorn

Re: Kemet EC2-5NU relay problem
« Reply #21 on: January 29, 2021, 09:13:35 AM »
Hi Jim, you are right that I was a little light on details. I don't have the schematic on this computer at the moment, but here are some notes:

 - microcontroller is using a digital write to energize the transistor
 - flyback diode is in place
 - The noise on my signal line is the same noise as is heard on the relay coil contacts using an audio probe, just at a reduced level
 - I realized after posting that my signal input trace is routed between the relay coil contact pads on the PCB. I have cut the track and soldered in a jumper wire from the source point on PCB to test, but haven't had a chance to plug it in yet.
 - I'll post schematic snippet after I get home.
Exact science is not an exact science - Nikola Tesla in The Prestige
https://scientificguitarist.wixsite.com/home

Ripthorn

Re: Kemet EC2-5NU relay problem
« Reply #22 on: January 29, 2021, 05:46:29 PM »
As promised, here is a schematic snippet of how I have the relay coil contacts configured. Anything look amiss here?



Exact science is not an exact science - Nikola Tesla in The Prestige
https://scientificguitarist.wixsite.com/home

Ripthorn

Re: Kemet EC2-5NU relay problem
« Reply #23 on: January 29, 2021, 06:05:25 PM »
Below is a more complete picture of the situation. I found that if I short R12, the hissing goes away. The point marked L2 is the +5V from the microcontroller pin. Unfortunately, I am trying to also use this pin for turning on an LED, but when I short R12, the LED essentially turns off. I am assuming this is because the base of the transistor gets pulled to the B-E voltage, which is low enough that my LED with CLR doesn't have enough juice to shine. Any ideas?

Exact science is not an exact science - Nikola Tesla in The Prestige
https://scientificguitarist.wixsite.com/home

Rob Strand

Re: Kemet EC2-5NU relay problem
« Reply #24 on: January 29, 2021, 11:12:32 PM »
Quote
Below is a more complete picture of the situation. I found that if I short R12, the hissing goes away. The point marked L2 is the +5V from the microcontroller pin. Unfortunately, I am trying to also use this pin for turning on an LED, but when I short R12, the LED essentially turns off. I am assuming this is because the base of the transistor gets pulled to the B-E voltage, which is low enough that my LED with CLR doesn't have enough juice to shine. Any ideas?
Shorting R12 is essentially shorting the output of the micro through the BE junction.   It's going to be a low impedance.   It loads the micro pin down and that's why the LED goes out.  Not a good test, wiring R12 to +5V better.

Try putting a cap across the BE junction of the transistor.  Start with 100n, then 1uF, then 10u.  Make sure the cap is discharged before soldering.

I'm with Jim in that I suspect the micro output is not a stable 5V.    The software might be doing something weird like toggling the pin state or toggling between an input and output definition.  One way that can happen is writing bytes which sets the bit you want but destroys the other bits on the same port.   In this case you need to keep a mask of set bits in a variable then output the whole lot at once at each location.
« Last Edit: January 29, 2021, 11:30:07 PM by Rob Strand »
The internet:  answers without the need for understanding.

anotherjim

Re: Kemet EC2-5NU relay problem
« Reply #25 on: January 30, 2021, 05:00:07 AM »
Depends on the platform.
Arduino I/O is designed around the hardware in the MCU so it doesn't present so much pin contention. When you start to use library code, then you need to be careful as it can then have to use a standard I/O pin for another purpose.

I wonder is the controller has an active USB connection? This can carry a 1kHz whine due to polling every 1ms (the bane of cheap soundcards). Having USB in an audio system obviously can be done, but needs better filtering.

If you want USB for a debugging serial monitor of your code, all might be well when you take that out and disconnect the USB.


This looks ok to me. One thing I don't see is a larger cap on the regulator output. I'd fit at least 100uF in addition to the 100nF (keep that). Regulators can be unstable without enough capacitance (should be some on the regulator input too).
Croeso i Diystompboxes.

Rob Strand

Re: Kemet EC2-5NU relay problem
« Reply #26 on: January 30, 2021, 05:16:22 AM »
Quote
(the bane of cheap soundcards). Having USB in an audio system obviously can be done, but needs better filtering
FWIW,  the PC front panel connector has both USB and audio. They shared the same ground wire which is a total disaster for noise.   You can split the USB and audio ground wiring to the front panel.  You also have to cut the common ground tracks between the USB and audio on the small PCB behind the front panel of the PC.  Using USB connectors at the rear of the PCB and not on the front panel helps enormously.
« Last Edit: January 30, 2021, 05:37:15 AM by Rob Strand »
The internet:  answers without the need for understanding.

anotherjim

Re: Kemet EC2-5NU relay problem
« Reply #27 on: January 30, 2021, 02:06:31 PM »
I was thinking of the cheap (really cheap) single-chip USB soundcards. Codec & USB in one. They are generally useless for recording due to noise. You can cut the whine with extra filtering, but line input has the same preamp gain as the mic and relies on digital volume control to reduce the level. Sound quality is hideous!

All that said, we don't yet know if USB is relevant yet. But another USB issue is that it has no ground isolation from the host device, so there are common ground induced noises too.

Croeso i Diystompboxes.

ElectricDruid

Re: Kemet EC2-5NU relay problem
« Reply #28 on: January 30, 2021, 02:24:14 PM »
Rather than driving the LED from the micro's output pin, you might be better off putting it in parallel across the relay coil with whatever series resistor it needs for 4.4V (about what it'll get once you take the BE drop off). The transistor can handle loads of current, so there's no problem there, and it avoids the load on the micro's pin.

Plus I know it works, cos I tried it! ;)



anotherjim

Re: Kemet EC2-5NU relay problem
« Reply #29 on: January 30, 2021, 05:02:30 PM »
I didn't see the LED on the scheme. It would be better run off the transistor switch with the relay, but it should work off the micro's pin IF it has its own series resistor. Without a resistor, the LED will clamp the digital output to its forward voltage drop and overload the pins drive circuit in the micro. If fitted across the relay, the LED still needs a series resistor.

On an Arduino, one of the pins is already driving a LED on the board (pin13?) - avoid that pin if you want to drive any kind of load off it.

Croeso i Diystompboxes.

Ripthorn

Re: Kemet EC2-5NU relay problem
« Reply #30 on: January 30, 2021, 08:18:37 PM »
Good suggestions, guys. I'll give them a try!
Exact science is not an exact science - Nikola Tesla in The Prestige
https://scientificguitarist.wixsite.com/home