PCB relay EMI

Osiris

Member
Hello,

I designed a PCB with a Teensy 4.1 and 2 miniature PCB relays type TQ2-12V. The relays are switched on by a NPN-transitor. The protection is a fly-back diode (1N4148) across the coil and a TVS-diode (SAC12) nearby across the 12VDC power supply. Since the relay can generate EMI (and maybe decrease the lifespan of the Teensy 4.1), is there a safe distance from the Teensy 4.1 or should relays not be placed on a PCB together with a Teensy 4.1? At this moment the distance between a relay and a Teensy 4.1 is 44.5 mm.

I hope someone has the magic solution.

Osiris
 
Magnetic field generated by PCB relay coil is relatively small and 44.5 mm distance is large enough to weaken it so it is safe for the Teensy not to affect lifespan. Google for "PCB relay board" and you will see many designs that place such relays near ICs.
But whenever it is good idea or not depends on what you are doing with the Teensy. If you are using ADC or otherwise dealing with small analog signal like analog audio on your board, having high current devices on same PCB may affect ADC, analog / audio performance.
What is more important is PCB layout, the width and the distance between traces and proper decoupling. That is crucial as relays will be switching potentially large current. Solid ground plane is recommended. Decoupling caps (100nF) near ICs. The diode that you have used 1N4148 is small signal. It might be too weak. And make sure that the current needed to drive the base of that NPN transistor does not exceed capabilities of Teensy (less than 4mA) - properly calculated resistor between Teensy pin and NPN transistor base is important. You might choose N-channel MOSFET instead as it doesn't require high driving current.
 
Last edited:
Thomas thank you for your reply.

I changed the 1N4148 diodes for 1N4007(1000V/1A). I do have a ground plane and al ICs are decoupled. The transistor 2N3904 can switch 54mA with 3.3 volt from the Teensy and a 10K resistor : Ib = 3.3V - Ube(0.6V) / 10kOhm = 0.27mA. Ic = Ib x hfe(200) = 54mA. The relay uses 11.7mA. The current drawn through the relaycontacts will be a maximum of 50mA.
Thank you for your considerations. I think I will move the relays out of the smal signal zone on my PCB.

Kind regards,
Osiris
 
The 1N4148 is more than capable of handling the tiny currents from those PCB relays. Random data sheet says 300mA continuous, 500mA repetitive surge. The surge current rating being the important thing here.
 
Yes, 1N4148 handles 75mA, the relay uses 12mA, not a problem. Base resistor for the 2N3904 should be about 2k2, giving > 1mA into the base. For switching make the base current about 10% of the load current. The hfe is not relevant to switching as the device isn't in active mode, but in cutoff and saturation modes. hfe only applies to active mode.
 
UhClem and MarkT,
Thank you for your considerations.

The 1N4148 has a maximum reverse voltage of 100V and a surge current of 400mA. That should be more than enough indeed.

Found in the datasheet for the 2N3904 , the DC hFE = 100-300. Found online that for switching an overdrive factor from 2 to 10 x Ic is used.
Ib = 10(overdrive factor) x 11.7 mA(relaycurrent)/ 100(lowest value DC gain) = 1.17mA.
Rb = 3.3V-0.6V / 0.00117A = 2300 Ohm.
We can calculate all we want but when you put a current through a transistor the junction heats up and all parameters start moving in the wrong direction. :)
So an overdrive factor of 2 is a little low.
 
For using a BJT as a switch the hFE value is not relevant - that applies only to the active, linear area of operation (where the collector-emitter voltage is significantly more than one diode drop). Switching uses cutoff and saturation modes only. For switching base current is typically 5--10% of collector current (see the datasheet for guidance on achieving good saturation at various output currents though, there is some variation). In saturation normal transistor operation doesn't happen, the physics is different from active mode.
 
I found, in the datasheet, for the 2N3904 : Base-Emitter saturation voltage
Ic = 10 mA, Ib = 1 mA , VCEsat = 0.2V
Ic = 50 mA, Ib = 5 mA , VCEsat = 0.3V

Base-Emitter saturation voltage for the BC547:
Ic = 10 mA, Ib = 0.5 mA , VCEsat = 0.25V
Ic = 100 mA, Ib = 5 mA , VCEsat = 0.3V

Base-Emitter saturation voltage for the 2N3055:
Ic = 4.0 A, Ib = 0.4 A , VCEsat = 1.1V
Ic = 10 A, Ib = 3.3 A , VCEsat = 3.0V

Indeed, the Ib is 5%-10% of Ic in saturation (2N3904, BC547). Changed some transistors into BC547 and some into KSP13 (darlington) for a lower basecurrent.

MarkT, thank you for your help.
 
The incredible ZTX751/851 and similar super-beta devices have ~50mV saturation voltages if you ever have to drive a heavy load or need a smaller package size.
 
To switch high current devices, I tend to use FET transistor. But insert a diode/resistor on the gate, to slower switching time. This will lower EMI generated during switching.
 
Back
Top