Electrical noise from motors upset 28x1

tonyengineer

New Member
I have a 28x1 operating and monitoring 8 solenoid valves, 2 air pumps, and indicator LEDs. When operating only the LEDs and solenoids, the program works fine. When the pumps operate the program is erratic, jumping back to the start, I assume resetting.

Both motors and solenoids are switched by two 2803s and the LEDs direct via 330Ω resistors.

I've been advised to put diodes and capacitors across the pump motors and twist their wires. I’ve also put pull down resistors on the motor 2803, I'm using 4 input/output coupled, to cover the current requirements for the motor and the chip gets warm, but not excessive.

The power supply is 12v which operates the motor and solenoids, then through an inductor, 2 capacitors, 12-5v voltage regulator, and then another 2 capacitors.

The noise seen through a CRO attached to the last capacitor is quite spiky when the pumps operate, but after putting the caps on the pumps the program worked fine, then later starting failing again. I then tried other means also, wire twisting and inductor etc., again it worked, only to fail later.

I gather noise is transmitted through both the wiring and electromagnetic radiation with the PCB acting as a receiver. An earlier version of this, using a single pump and 08M still works fine, the pump is shielded from the Picaxe by a 1.6mm aluminium box, I assume this is helping.

Is it possible that the spikes are damaging the 28x1 making it less able to cope with the noise?

Any guidance or experience would be appreciated.
 

boriz

Senior Member
Some key point's to bear in mind for noisy environments:

Use separate power supplies where practical for the Logic and the power components.

Always trap Back EMF from inductive loads (like motors and solenoids) using a diode placed close to the load in reverse parallel.

Twisting the wires carrying power to the noisy load is a good idea. Also small capacitors soldered directly between each motor terminal and the motor casing.

Never let the 5v regulators input fall below 7.5v, even for a tiny interval. Capacitor+diode should help here.

Always use a bypass capacitor of around 100nF across the power pins of each logic and Picaxe chip. Placed as physically close the chip as practical.

Always tie unused input’s to ground. They often have a very high impedance allowing them to act a little bit like aerials.

I don’t know if a Picaxe can get less resistant to noise over time but I doubt it.
 

hippy

Ex-Staff (retired)
Welcome to the PICAXE forum.

It does on the face of it sound like a noise problem but I'm not sure what "fail later" infers, that you have made the problem less frequent or solved the noise issue but there is some other problem which may be unrelated.

One approach would be to configure the system so it only runs the motors and does nothing else. Use a LED or SERTXD so resets can be monitored. Remove the anti-noise components to demonstrate that unwanted resets are occuring then re-apply them, check if failures and resets occur.

You need to determine what the reason for failure is, reset or something else, then determine why that is.
 

Wrenow

Senior Member
Capping the motors, twisting the motor wires, a choke on the motor wire, all are good things. Capping the power supply for the Picaxe as well.

As is a separate power supply for the picaxe versus the motor (but grounded in common, of course).

Separating any and all wiring not going to the motor from the motor wiring is also a good plan, to help avoid parasitic inductance generated glitches.

Are you sure, at this point that it is not a programming issue now that you have eliminated a lot of the EMF issues?

Cheers,

Wreno
 
Last edited:

jglenn

Senior Member
Besides using separate supplies for the chip and loads, you can get militant, and completely decouple them by using optoisolators to isolate the drive signals.

Beyond that, put the chip in a metal box that is grounded, and keep the control wires away from the load wires. Sometimes just having these lines running next to one another can allow parasitic coupling.

When I worked on xray machines, I found that if the video cable was parallel to the 480V 3 phase feed lines that ran the worlds biggest "lamp dimmer" (TRIAC phase chopper to transformer for tube), when you flouro, the monitor image looked like it was snowing! Little speckles. Moving them apart fixed it.

The general form of interference always follows this plan:

Source

Path

Receptor

The path can be galvonic, capacitive, or inductive. I have controlled a 20KW DC motor chopper power stage with a CMOS output successfully. You can do it! :)
 
Last edited:

inglewoodpete

Senior Member
Yet another point. You started out thinking this would be easy, didn't you? ;)

If you have to use just one power supply, then at some point you need to drop the 12v to 5v with a regulator. The 0v rail from the 'common' pin of the regulator to the 0v connection of the PICAXE MUST NOT carry current for the solenoids or motors. Ensure that you have separate 0v return wiring for the 2 groups of devices.

If the 0v rail to the PICAXE (or any PIC chip) carries high current switching, then voltage spikes sufficient to reset the PIC(AXE) will occur. The same problem will occur with any microcontroller or microprocessor circuit.
 

Attachments

Last edited:
Top