LowPowerLab Forum

Hardware support => Moteino => Topic started by: BIA on August 12, 2015, 01:13:52 AM

Title: Moteino range affected by EMI from chinese stepper motors
Post by: BIA on August 12, 2015, 01:13:52 AM
I'm having problems with range in these radios. I can't get reliable signals over 8 feet line of sight. I've tried the high power radios and they are even worse. The moteinos are encased in steel enclosures with the antenna peeking out the side. Felix, it appears from you post under antennas that you have seen no improvement with external or monopole antennas which I find odd. I suspect there is some degree of EMI although when transmitting I have power cut to all motors and motor drivers disabled. These radios will not communicate at all if there is a motor driver enabled or a motor running anywhere nearby. The only way I have been able to get 100% reliable communication over 8 feet between radios is to wire their respective antennas together, which obviously defeats the purpose of having wireless.

Any ideas?
Title: Re: Moteino range
Post by: Felix on August 12, 2015, 07:43:16 AM
At first guess it sounds to me like there's some potential EMI overload with the motors in close proximity. That's quite possible to induce interference into the Moteino radios especially if they are hooked to the same supply/circuit. A weak power supply may cause rail collapse which again can mess up the radios. Just some things that come to mind ...

Putting the radios in a steel enclosure can act as a faraday cage. Although for instance I have my mailbox notifier - see photos below - which sits in the closed mailbox made of thick steel and only the monopole peeks through the front of the door gives me plenty of signal on a 120ft distance from across the street to below grade in the basement where my receiver is. But there's good antenna polarization which in such close range will not make a huge difference but in longer ranges it will.

(https://farm9.staticflickr.com/8645/16429319505_5a51b8f272_n.jpg) (https://flic.kr/p/r2Nyip)(https://farm8.staticflickr.com/7401/16427597031_7b81a2cca7_n.jpg) (https://flic.kr/p/r2DJgz)

Here's the test case. Put your Moteinos on battery power. Make sure the firmware settings are right, match the hardware frequency and the IS_HW settings in firmware otherwise don't expect anything more than a few feet of range. Program them with the Gateway and Node examples from here (https://github.com/LowPowerLab/RFM69/tree/master/Examples), also a good idea to update the RFM69 lib if you haven't done that in a while. In open air you should get a long range, longer than you need for most purposes, indoors less than that but still more than you need to cover any average residential property. If you do this sequence right, use battery power to avoid any EMI induced in the same circuit, and no other interference, and your Moteinos are not damaged in any way, then that's what you can expect.
Title: Re: Moteino range
Post by: BIA on August 12, 2015, 11:04:02 AM
Hi Felix,

Thanks for your reply. The moteinos are on a separate circuit. The motors and motor drivers are on 48v and a totally different circuit. The motor drivers have isolated grounds on every pin. As I indicated, if the motors are receiving power at all, the radios don't work at all, even if the antennas are hardwired together. I have tried the gateway/node examples but all the gateway does is print *'s. I don't see how you can tell if every signal is being received unless you have a complete audit trail on both sides. I can get the radios to work with anything 90% of the time. I need 100% of the time. If I miss a signal, the system is not going to work. I have the type of radio and whether it is HW or not written in EEPROM of each board so the software just looks for that bit and enables HW if it's set. I'm pretty sure that's not the issue. I am using 91 as the frequency for these RFM69_HW 868/915mHz radios. Is this correct? I don't see any documentation to the contrary.

You may be right about the Faraday effect in the steel enclosure, although I have no choice in the matter. I was hoping there might be some effective external antenna or some means of shielding the antenna wire. I've tried everything I can think of, including lead, with no noticeable difference. One thing about stepper motors, when they are energized they create a large magnetic field. When they are de-energized, that field should diminish greatly, although a stepper motor is just a rotating magnet if you think about it. Do you know a way to shield these radios from electromagnetic fields?

I have been testing these radios for some time and they work 100% in close proximity (< 8 feet). Seems like anything over 8 feet is where the trouble starts. As I said, I thought HW might solve the problem but it actually makes it worse. If I run an 8 foot wire between the antennas and hardwire them, they work 100% of the time. But, of course, that's not the solution.

Will
Title: Re: Moteino range
Post by: Felix on August 12, 2015, 12:51:06 PM
The examples I've linked show exactly how to set the settings both for the HW setting and the frequency. I cannot stress enough how important it is to match these settings with what the hardware actually is.
About antenna issues - this goes back to antenna matching theory, which is a really wide and complex subject, and beyond the scope of this website.Here's a website (http://www.slideshare.net/pantechsolutions/basics-of-rf) with great resources on that and other RF topics.

You may bring the signal out of any enclosure with a properly impedance matched wire. This is typically 50ohm coaxial cable which you would connect to the Moteino and take the antenna away out of the box to a dipole so the RF load goes to that dipole. Mind that dipoles have a different polarization than monopoles, and I don't want to get too detailed about that since I'll probably say something less than accurate pretty soon.

What motors are you using? And what is the distance from the motor(s) to the Moteinos?
Title: Re: Moteino range
Post by: BIA on August 12, 2015, 05:00:20 PM
I know how to set the frequency. I've been working with these things for nearly 2 years. That's not the issue. The only question I had in that regard is with the 868/915mHz radios. Which works best: 868 (86) or 915mHz (91)?

The motors are standard NEMA 17 Chinese-made steppers. They are about 15" from the Moteinos and are separated by the steel enclosure.

Do you have instructions on how to connect the coax to the antenna? I assume the center core would be connected to the antenna hole? Does the shield need to be grounded?? Has anyone experimented with this?
Title: Re: Moteino range
Post by: Felix on August 13, 2015, 08:13:55 AM
If you have 915 radios then use 915. The 86/91 settings are low level settings, they are not supposed to be used directly.
I don't have a coax guide. Coax is a 1 signal cable with shielding. Signal goes to ANT, shield goes to GND. At the other end is the antenna.
I recall there have been other posts about different types of antennas in the forum.
Title: Re: Moteino range
Post by: BIA on August 13, 2015, 11:30:38 AM
Your Moteinos are sold with a transceiver that is described as RFM69HW - 868/915mHz. Which is it? 868 or 915? Is this an either/or or a range? I see no difference in performance between 868 and 915.

With respect to the settings, they are defined in the include file RFM69.h

//available frequency bands
#define RF69_315MHZ     31  // non trivial values to avoid misconfiguration
#define RF69_433MHZ     43
#define RF69_868MHZ     86
#define RF69_915MHZ     91

as 86 and 91. The frequency is passed to this routine

bool RFM69::initialize(byte freqBand, byte nodeID, byte networkID)

as an 8-bit byte. Are you telling me there's something magic about your include file that somehow transforms these numbers into something other than 86 or 91?? I don't understand your statement "The 86/91 settings are low level settings, they are not supposed to be used directly." Am I missing something here? I don't consider defining a constant number as a low level operation.

Title: Re: Moteino range
Post by: Felix on August 13, 2015, 01:20:52 PM
See the Moteino product page for differences between the frequencies.
https://lowpowerlab.com/shop/moteino-r4
There's no magic about the settings, but I put those defines in there for a purpose, abstracting away the byte in the header file, and be able to refer to it as a nice obvious variable instead of 91 which means nothing and confuses everyone reading this thread. So it was meant to be used as RF69_915MHZ not 91. But they are equivalent and interchangeable. But does the reasoning now make sense why?
Title: Re: Moteino range
Post by: BIA on August 16, 2015, 07:16:36 PM
Not really. The hope rf chips should have a readable parameter for type that can be queried by the software. It is ridiculous to have to tell a piece of hardware what it is. That's why I burn the frequency into EEPROM so programs can read it.

Anyhow, coax does not work. In fact, the signal reliability is worse using coax than thin wire. I would not believe this if I hadn't seen it for myself.

Since Felix ignored my question about whether the RFM69HW is 868 or 915mHz, I'm going to answer it myself for the future reference of anyone else who may need to know. They are 915mHz. The 868mHz settings do not work with these radios. The logical question would be "why are they sold as 868/915mHz when they only operate at 915mHz?"

Other things I have tried that did not work include:
Because the lead and the coax had no (or negative) effect on the signal reliability, I am inclined to think that the magnetic field generated by the stepper motors may be causing the signal inconsistencies. The only thing I can think of at this point is something like mu metal or supermalloy as a magnetic shield. If anyone has any experience with either of these as a magnetic shield, please post your experience.

If anyone else has any experience with operating these radios in the presence of stepper motors or stepper motor drives, please post your findings.
Title: Re: Moteino range
Post by: TomWS on August 16, 2015, 08:16:35 PM
@BIA, did you post what Stepper Motor drivers you're using?  I missed it if you did, please post a link so I can follow up.

One thing about stepper motor drivers is that they tend to be switching current drivers so that the inductance of the windings don't slow down the stepping pulses and that the current can be modulated with fine grain torque control.  As a consequence, the drivers and stepper motor windings generate a very intense EMI field covering a very broad RF spectrum.  If there is a single disable control on the driver, to disable the switching mode during radio transactions, this might help improve signal integrity.

Tom
Title: Re: Moteino range
Post by: BIA on August 17, 2015, 04:35:07 PM
Tom, thanks for your reply. I already covered both questions in a prior post. The steppers come from the same factory in China that all stepper motors come from. The supplier is automationdirect.com. Regarding the EMI, I also stated that the stepper drives had to be completely disabled before the radios would communicate at all. At any distance. Even with antennas hard wired together. That, and the fact that lead shielding had no effect and coax had a negative effect leads me to believe it is the magnetic field of the stepper motors that is causing interference.
Title: Re: Moteino range affected by EMI from chinese stepper motors
Post by: kobuki on August 31, 2015, 07:16:47 PM
I'm wondering if you ever could solve this. In this situation I'd prolly get a tech with a VNA or at least a cheap SDR stick plugged into a laptop to catch interfering signals when your motors run.

It's not totally obvious from your posts but your RF circuits and the motor control is not connected galvanically at all, right? If you need control lines from the mote to the motor driver, they sould be optically coupled, at least.