315MHz RF, atmega32, wireless interference from a motor.

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.

Try smaller cap values on the motor terminals, 100pF to 100nF, 1 across the motor terms and one from each motor term to the motor case. The big, 1000uF cap probably does nothing to 300MHz hash noise from the motor brushes. You may need to experiment with cap values and may need more than one cap value.

If the wireless range increases then you are on the right track and may still need additional components. But there may be more to do to get the lowest noise.

This

The pump and mcu is driven off the same battery pack, a collection of 20AA cells

is not so good. Those cells can be high impedance.

Try to use separate power sources, or…

Aggressively decouple the MCU power, perhaps use a fat inductor and/or a low value resistor (10 ohm, or so, based on MCU current) and a big and little capacitor on the MCU side of the inductor/resistor.

The common ground - it’s a MUST to prevent the motor’s current from flowing on PCB traces in common with the MCU. Motor ground should be good sized wire directly to the battery’s ground lead.

I would strongly suspect that RF energy is being generated in the motor, and flooding the receiver front end.

The suggestions so far are good. A small value ceramic cap, like 1000 pf across the motor, is a very good idea. Big capacitors have internal inductance that does not allow filtering of high RF frequencies.

I would do stuff like:

  1. separate the ground of the receiver from the power control/ground return of the motor. You will probably need an optoisolator to do this.

  2. use two big inductors, one on the VCC, and one on the ground return of the receiver, to isolate the receiver from the battery noise. Then put your filter caps on the receiver side of the two inductors, probably with 100 pF ceramic, 1 uF ceramic, 10 uf, and then maybe 220 uF.

  3. Put the receiver in a metal can, and hook the antenna to the receiver thru a small series capacitor (100 pF). This will keep lower frequencies from hitting the receiver.

  4. Re-orient the antenna empirically for the lowest motor noise pickup.

  5. Install a bandpass filter between the antenna and the receiver

i

And if that all fails, abandon the ASK receiver and go with an FSK transmitter/receiver pair.

BTW, you can get a 315 Mhz bandpass filter from digikey for a buck:

Digi-Key Part Number 495-1667-1-ND

You want to place the bandpass filter under the metal shield, but very close to the antenna input.

Excellent news! Thanks to all of your suggestions and help. I have easily doubled the transmission distance, this is the most progress I have made all week. Actually to is the only measurable progress I have made.

I didn’t have all of the parts in stock that you guys have recommend, but let me summarize what I have done it see if we can make any further improvements.

The first thing I tackled today was inspecting the motor. After removing it from it’s plastic enclosed I found that it already had a capacitor across the terminals. The capacitor read 105; I believe that translates to 1uF. I added a .1uF between the terminals and two more .1uF’s between each terminal and the motors case.

Considering the motor already had a relatively small capacitor across the terminals I went ahead and added some inductance to the MCU and receiver circuit. On second thought I wish I would have tested just the additions of the capacitors to the motor, but maybe that is for another day.

At this point in time the power to the MCU goes through an inductor of unknown size. After the inductor I have placed a .1uF cap. I have taken this power and delivered it to an identical inductor before supplying the receiver. I have placed a .1uF and a .33uF capacitor after this inductor. I have used the same components for the ground side of the receiver. I’ve attached a picture of the unknown inductor, it has no labels, but I believe it originated from radio shack years ago.

I plan to do some more testing tomorrow which will include the remainder of your recommendations. However I wanted to run this by you guys to see if these results sparked any other ideas or directions I should be heading in. I would like to place an order tomorrow afternoon to obtain some more parts, such as the capacitors you have previously suggested and possibly more after you have read this post. I will also be ordering various inductors, it would be helpful if you could recommend some values.

Thanks again for the extremely helpful comments.

Wireless with on-off-keying OOK, a form of AM modulation, is not tolerant of noise!

FM or BPSK is.

Many Cheap data radios aer OOK.