0

LoRA Radio and switching 12V relays, encountering very stran
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

LoRA Radio and switching 12V relays, encountering very stran

by mh512 on Wed Apr 07, 2021 5:28 pm

Hello All

I have an Arduino Mega, Adafruit RFM96W 433MHz LoRa Transceiver Breakout and 2 Channel OptoCoupler Relay Module.

https://www.adafruit.com/product/3073
https://www.amazon.co.uk/SUNFOUNDER-2-C ... B00E0NTPP4

The Arduino Mega runs a sketch that waits for the press of a button and then:

If Button A:

Switches on a 12V pump connected to the Relay for 30 seconds
Then sends a radio message (using RH-RF94 library) to another device

If Button B:

Sends a radio message (using RH-RF94 library) to another device
https://github.com/kenbiba/RH-RF95

The Ardunio is being powered by the USB connector.

The Relay Board has it's own 5V supply and is connected to the arduino by a digital line (for the pump) and the Vcc to Arduino 5V

I don't use the Arduino Vcc to power the relay board, it has it's own 5V supply into JDVcc (see below) schematic of the relay board:
Image

There is a 12V power supply in the COM terminal, then the +ve lead of the pump is in NO.

The problem:
When the 12V power supply is connected to the COM terminal the Arduino will freeze when trying to send a radio message (send) - even if the pump has not been activated and there is no 12V current flowing.

I have only seen this happen when I have an antenna on an extension wire connected to the LoRa transceiver. If there is no antenna, or a very short antenna with no extension wire I do not see this problem.

An antenna on a extension wire works no problem if I unplug the 12V supply from the relay board - even if the transformer is left plugged in within the project enclosure.

I am very confused by this.

Initially, I suspected there was some sort of power surge going on when the pump started (big motor) but I see this problem even if the pump never runs, all it takes is the 12V power supply be applied to the relay.

Is it possible that the 12V transformer is creating EM interference that's coupling onto a long antenna cable?

Thanks for any help.
mh512
 
Posts: 76
Joined: Wed Nov 13, 2013 4:06 pm

Re: LoRA Radio and switching 12V relays, encountering very s

by adafruit_support_bill on Wed Apr 07, 2021 6:11 pm

Most modern DC power supplies are switching mode supplies. Some have better output filtering than others and many of them have enough residual switching noise on the output to cause some interference.

Increasing the distance and/or changing the orientation of the antenna relative to the supply may help.

adafruit_support_bill
 
Posts: 81326
Joined: Sat Feb 07, 2009 10:11 am

Re: LoRA Radio and switching 12V relays, encountering very s

by mh512 on Wed Apr 07, 2021 6:16 pm

Thanks Bill, I'm not sure I understand why a short antenna plugged almost straight into the transceiver isn't a problem, but if I plug a 1m extension it is

If the pump isn't running and there is no current flowing do you mean the source of the interference is coming from the power supply plug itself?

Should I try a capacitor across the power supply output?
mh512
 
Posts: 76
Joined: Wed Nov 13, 2013 4:06 pm

Re: LoRA Radio and switching 12V relays, encountering very s

by adafruit_support_bill on Wed Apr 07, 2021 6:34 pm

EMI problems can be tough to diagnose. But any changes to the antenna (location, orientation, extensions etc.) can affect the sensitivity of the antenna to the noise source.

A simple capacitor across the output of the supply may or may not have much effect. It depends on the frequencies involved. If you have access to an oscilloscope, you can look at the output of your power supply and see what kind of noise it might be generating.

You could try connecting a 12v battery in place of the power supply. If everything works that way, its a pretty strong indication that the power supply is your noise source.

adafruit_support_bill
 
Posts: 81326
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.