Using a zenor diode to protect an Arduino Pin

Hi

I am creating a small circuit with an arduino + a ACS712 current Sensor.

I have seen that at times turning on/off a particular device causes large spikes on the AC signal that the ACS712 creates.

I have read that a ZENOR diode can be used to protect a pin. But everything I look at has a combined resister with it and it is confusing me.

I have created a small Fritzing which shows my setup. I am wondering if someone who knows more than me could place a 5.1v zenor diode onto my circuit so I can understand it.

The ACS712 is measuring 240v AC current.

Link to Fritzing Project http://weather.crowe.co.nz/attachments/CurrentSensor.fzz

Cheers

Chris

Does this help... http://www.thebox.myzen.co.uk/Tutorial/Protection.html

A hallsensor Powered with 5 volt can NOT give any spikes over 5 volts. If you are worried so place a resistor in series with the output from the hallsensor (10kohm)

Pelle

[quote author=Coding Badly link=topic=271645.msg1914608#msg1914608 date=1412885856]

Does this help... http://www.thebox.myzen.co.uk/Tutorial/Protection.html

[/quote]

Not really. I understand that but I think it is only related to DC voltages.

My AC is a sine wave so +and-

ALso it again has resisters in there and I do not want to change the signal at all, I just want to stop any spikes.

From my understanding I may need 2 back to back to properly filter voltages for AC spikes?

Chris

Pelleplutt: A hallsensor Powered with 5 volt can NOT give any spikes over 5 volts. If you are worried so place a resistor in series with the output from the hallsensor (10kohm)

I disagree as I have seen it spike on an oscilloscope.

I don't want to limit the current from the sensor as I am trying to measure the current so I don't want to change it.

Chris

Pelleplutt: A hallsensor Powered with 5 volt can NOT give any spikes over 5 volts.

Take note.

There is no risk. Total waste of time worrying about it.

iisfaq: I disagree as I have seen it spike on an oscilloscope.

I daresay you have. Nevertheless as the spikes on the output of the ACS712 did not exceed the 5V supplied by the Arduino, in this case it is not a concern.

iisfaq:

Pelleplutt: A hallsensor Powered with 5 volt can NOT give any spikes over 5 volts. If you are worried so place a resistor in series with the output from the hallsensor (10kohm)

I disagree as I have seen it spike on an oscilloscope.

I don't want to limit the current from the sensor as I am trying to measure the current so I don't want to change it.

Chris

Spike probably induced on the scope probe, not real. The ACS712 cannot generate high voltages on its outputs, is electrically isolated from the current being measured too.

Remember scope probes act as very efficient loop antennas sniffing out any nearby dI/dt...

Ok, but then why would the serial monitor stop working when these spikes occur?

I have a lamp that looks like this () and it causes the arduino serial monitor to stop when it is turned on/off and the current is being read by an arduino using ACS712?

Ok, but then why would the serial monitor stop working when these spikes occur?

Because the mechanism for transferring the interference to the arduino is airborne, that is electro-magnetic, there is nothing that zeners will do to protect from that.

Or, the most likely culprit, is that the problem has nothing to do with the hardware but is a bug in your code.

If you want to read more on protection see:-

http://www.thebox.myzen.co.uk/Tutorial/Protection.html

http://www.digikey.com/us/en/techzone/microcontroller/resources/articles/protecting-inputs-in-digital-electronics.html

Grumpy_Mike: If you want to read more on protection see:-

http://www.thebox.myzen.co.uk/Tutorial/Protection.html

http://www.digikey.com/us/en/techzone/microcontroller/resources/articles/protecting-inputs-in-digital-electronics.html

Thanks

If you have large currents switching or large voltages switching you have to protect against electomagnetic and capacitive pickup. Shielded cables, avoid running cables in parallel, ferrite bead interference suppressors can all help here.

If you have a big sprawly breadboard setup you have the worst arrangement for avoiding interference, so you may have to wire things tidier too.

I have a lamp that looks like this [picture] and it causes the arduino serial monitor to stop when it is turned on/off and the current is being read by an arduino using ACS712?

Could have some serious HV switching occurring too close to the Arduino if its Xenon bulb type, even some halogen lamp fixtures produce RFI similar to that produced by light dimmers.

Someone else here had a similar problem.

Suggest, as a test, moving the Arduino as far as possible from the lamp to see if the problem resolves itself.

How is the Arduino powered and do you have it in the same wall outlet as the lamp?

That looks like a halogen lamp which could have a transformer to step down to the bulb voltage. Switch that on and off, a spike comes down the AC line. If your wall-wart powering the Arduino can pass that spike you may be getting hit by that.

However if the Arduino is battery powered then I'd say it's airborne EMI.

MarkT: Shielded cables, avoid running cables in parallel, ... If you have a big sprawly breadboard setup you have the worst arrangement for avoiding interference, so you may have to wire things tidier too.

Now note here that this means not running the mains cables close to the Arduino wiring. On the other hand, the wires of each circuit must not be allowed to form significant loops, they must be run parallel and adjacent, bundled together.

MarkT: Remember scope probes act as very efficient loop antennas sniffing out any nearby dI/dt...

Insofar as you use probes like these: You tend to clip the ground lead somewhere, and probe somewhere else, you have a nice big pickup loop between. In fact, simply clipping the ground to the probe tip makes that loop a useful "sniffer" for EM radiation.