One of two things could be happening. Either A) when the motor kicks on, its generating a lot of noise on the DC supply to the RF module, which causes the module to do all kinds of freaky things. B) The RF module is too close to the motor and is picking up the electromagnetic field generated in the motor’s coils. Connect an oscilloscope to the power supply for the RF module, monitor the signal when the motor kicks on. If you see a huge spike or even noise, add a simple filter between 5V+ and RF V+. A filter could be a simple 1+ Ohm resistor feeding a 1000uf and a 0.1uf capacitor, with the RF module being powered by the caps. Increase the resistance of the resistor until the noise goes down enough to prevent the problem, while still feeding the caps with enough power to keep the module on. Then test the data pin. If the noise is only on the data pin, then you need to move the RF module further from the motor and possibly try to shield it from EMI. Also make sure you are decoupling everything, and if you have ferrite beads, use them on the motor’s wires.
↧