I am currently controlling a water pump with an atmega32, a n-channel logic level mosfet and a WRL-08948 315Mhz receiver.
The system works very well at close range, ~10 feet. But if I increase the distance between the transmitter(WRL-08945) and the receiver, the MCU does not receive all of the data strings. The problem gets substantially worse when I drive the motor hard, 16 volts, ~8 amps. I can even cause problems with the wireless link in close range if I drive the motor at 24 volts. My question is of course how to fix this problem. I am going to include some details to help explain myself.
I have verified that the wireless link is in good working order. If the pump is disconnected, or not pumping water I can get a quality signal from several rooms away; in excess of 75 feet.
I currently have a diode across the motors terminals to take care of the back emf as well as 1000 uF of capacitance. I have experimented with a variety of capacitance, all the way up to 3500 uF but I have not been able to improve the problem. I have also shielded the motor; this made little if any difference.
I have separated the grounds of the system, I currently have a digital ground and an analog ground that are only tied together at the negative terminal of the 24v battery. The pump and mcu is driven off the same battery pack, a collection of 20AA cells. The MCU gets its power from a 5V linear regulator that has .33pF capacitance on the 24v side and .1pF capacitance on the 5V side. I have experimented with different capacitance values at these locations without any improvements.
During the failed wireless transmission I have probed things of interest with a scope, everything looks well. Minimal fluctuations in voltage, both the PWM channel and usart RX are nice and square.
I have tried a PWM signal of 31.6KHx ans 3.9KHz, there was no improvement.
I am running a Manchester style encoding which is seems to work flawlessly when the motor does not have a high load. When it does have a high load I believe what is happening is that the receiver is getting flooded with noise and interference, so much that some data from my packets are not being received. I have changed the code on the MCU to take the current value from the wireless signal and run the PWM channel at that duty cycle for a given amount of time, that works fine and is problem free. But if I try to run the motor in “real time”, such as sine sweeps or ramps, then I run into these problems that I am describing.
I am looking for some helpful advice on the next step I should be taking in this debugging procedure, or even better maybe someone has a solution.