How to fix noise from resetting the micro

chokecommon-modenoise

I'm working on a project that has a micro-controller controlling a servo(it's battery powered so its not an issue with it's local power supply), it's connected to a control panel about 3m away with 3 long wires. The wires are open signal, close signal and ground. The panel simply has two relays that switch open or close between 5v and GND. Everything works nicely but when a large linear power supply in the control box is switched on it causes the controller to do strange things like close and then open the servo. We figured that the 3 wires are acting as an antenna and picking up the inductive spike from turning the psu on(we even ran the signal 5v and ground from a battery in the control panel to isolate the circuit so it's definitely the wires that are picking up the noise)

Originally I was not sure if it was a spike on the close line that was causing the weirdness so we disconnected the open and close wires and just left the ground wire connected, same problem. I also confirmed this on my 'scope and during switching there are no spikes on the open or close lines during switching. Thus I have come to the conclusion that it is common mode noise on the lines that is causing the problem, as even when it is only the GND wire connected the spike causes GND to float up momentarily and reset/mess with the micro?

My solution that I'm going to try next is to add some opto-couplers on the inputs so that the two electrical systems can be completely isolated. I also want to add a common mode choke on the three wires as this should damp the noise? Can anyone suggest how I would go about choosing a choke and/or any other suggestions on how to noise proof this micro?

Best Answer

Without a schematic I cannot determine if your grounding is correct, i.e. common ground, a common reason for some of the symptoms you describe.

Another point to consider is the liberal (correct) use of electrolytic capacitors and bypass capacitors.

Using a battery-only supply does not guarantee clean power supply rails. Are we sure the battery has adequate reserve available during circuit power up?

Given those conditions are properly met, you might consider the use of a "Supervisory" circuit for your processor.

MCP120/130

• Holds microcontroller in reset until supply voltage reaches stable operating level

• Resets microcontroller during power loss

• Precision monitoring of 3V, 3.3V and 5V systems

• 7 voltage trip points available

• Active low RESET pin

• Open drain output

• Internal pull-up resistor (5 kΩ) for MCP130

• Holds RESET for 350 ms (typical)

• RESET to VCC = 1.0V

• Accuracy of ±125 mV for 5V system

The Microchip Technology Inc. MCP120/130 is a voltage supervisory device designed to keep a microcontroller in reset until the system voltage has reached the proper level and stabilized. It also operates as protection from brown-out conditions when the supply voltage drops below a safe operating level. Both devices are available with a choice of seven different trip voltages and both have open drain outputs. The MCP130 has an internal 5 kΩ pullup resistor. Both devices have active low RESET pins. The MCP120/130 will assert the RESET signal whenever the voltage on the VDD pin is below the trip-point voltage.

They are available in TO-92, SOT-23-2 and 150mil SOIC. Datasheet: http://www.mouser.com/ds/2/268/11184d-68220.pdf

Very handy little device for $0.60USD, or less!