Go Down

Topic: How to protect arduino from overcurrent (Read 3635 times) previous topic - next topic

maxwell1

Firstly, I am still new to electronics so please bare with me and sorry if my question is naive.

I am working on system that should be secured from destroying the project with intention by flowing over current to i/o pins exceeds the current the arduino needs which as much as I know it's 5v and 2mA through wires that goes to the arduino so in my situation what kind of protection and secure action I can take to prevent destroying arduino with intention that can even reach the 220v more or less and just limit it to the 5v. I don't mind even if I can break the circuit but don't destroy the arduino but also I don't want the solution to be expensive or else I would better buy another arduino instead XD .


Thanks,

Max

MarkT

Take the incoming signal to a MOV/TVS to ground, then a 10k resistor in series to a pair of shottky
diodes to gnd and 5V (reverse biased in normal operation).  The MOV/TVS will catch high voltage
spikes (you should find one with a low triggering voltage, 10 to 20 volts).

The resistor and schottky diodes protect the Arduino input from excess current/voltage and bolster the on-chip
protection diodes (which are puny and designed for static protection only).

On its own the 10k resistor couldn't cope with very high voltages.

If you want to use a pin as an output the series resistor may get in the way - but you haven't said what
you are connecting to the pins.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

DVDdoug

Quote
...that can even reach the 220v more or less and just limit it to the 5v.
If you're talking about the power line, you should NEVER make a direct connection to the power line!*    That means you need transformer or optical isolation.

Here's the issue -  A protection circuit or voltage divider can  bring the voltage between  the Arduino's input and ground to 5V or less.    But, a mis-wired AC connection with reversed neutral & hot wires will result in 220V on the Arduino's ground, relative to earth ground (with 215V on the Arduino's I/O pin).  That's "safe" for the Arduino, as long as the Arduino's ground remains isolated from power-line ground or earth ground...   But, it's not safe for you and it's not safe for the computer or the Arduino if you connect the computer's USB port to the Arduino, etc.

There a lot of ways to get the AC hot & neutral crisscrossed...  Sometimes an AC outlet in the house is mis-wired.  Some extension cords are "non-polarized" or mis-wired, or you could make a mistake...     In general, you cannot sell a product that's not isolated/insulated from the power line.  (You may not be selling your product/project, but I'm sure you want it to be safe.)







* It can be done if the entire project is isolated in an enclosure with no electrical connections to the outside world...  For example you could make a power-line voltage monitor with an LCD or LED voltage display that needs no other connections.    However, it's difficult to develop & debug such a project without access to dangerous voltages.

Noobian

Do you need protection from over-current or over-voltage? Your topic says over-current but your post says over-voltage.

Components like Fuses and Circuit breakers are used to get protection from over current and components like Varistors and Zener Diodes are used to get protection from over-voltage.

JohnRob

While the safety issues brought up need to be carefully handled,  I though the attached application note on input protection might be useful.

Please do not PM me with thread based messages.  If your thoughts are worth responding,  the group should benefit from your insight.

maxwell1

Sorry, maybe my post was a bit not clear enough and probably confusing but as I mentioned I am really new in electronics world and uino but what I am doing is I try to connect a door switch to the uino but as I need to be 100 percent secure that the uino won't be destroyed if someone intentionally cut wires of the switch and insert it in 220v electric outlet for sake to destroy the project and stop it and I am trying to find a way to prevent that from happening. So is there a way to do this?

Plz simplify as much as possible as I am newbie.

Thanks a lot


Max

Grumpy_Mike

Quote
need to be 100 percent secure that the uino won't be destroyed if someone intentionally cut wires of the switch and insert it in 220v electric outlet for sake to destroy the project and stop it and I am trying to find a way to prevent that from happening
Their is no way to prevent everything from being damaged, the best you can do is to minimise what gets damaged. I would use an opto isolator to protect the Arduino but if some one did that then the opto isolator would fry. Is this a thing that is likely to happen?

maxwell1

#7
Aug 25, 2017, 10:16 am Last Edit: Aug 25, 2017, 10:22 am by maxwell1
Yes I would sacrifice with an isolator than the uino of course and that's what I wanted :). Sorry maybe i wasn't that clear but by the project I meant the uino not an isolator. But is there a special way to connect the isolator to the switch wires and uino or just through the wires (inbetween)?


Thanks again guys and appreciate your support a lot.


Max

jackrae

Use steel-wire armoured cable.  You are trying to protect against intentional stupidity which is virtually impossible.

Grumpy_Mike

Quote
But is there a special way to connect the isolator to the switch wires and uino or just through the wires (inbetween)?
The input to an opto isolator is basically just an LED. So you need to drive it like you drive an LED, that is with a voltage and series resistor. This means having a separate voltage source on the push button side. However, just two AA batteries will last you until the batteries leak. This is because the time it is driving the LED is very small in comparison with how long it is not pushed.

Jiggy-Ninja

Use steel-wire armoured cable.  You are trying to protect against intentional stupidity which is virtually impossible.
That doesn't sound like stupidity, but sabotage.
Hackaday: https://hackaday.io/MarkRD
Advanced C++ Techniques: https://forum.arduino.cc/index.php?topic=493075.0

maxwell1

@ grumpy_mike can you please show me a scheme to how to use the opt-isolator with door switch and uino and how to mount it in between with resistors if u don't mind?



@jiggy-ninja

Exactly what I am after is people who want to sabotage the project not stupid ones.

Grumpy_Mike

#12
Aug 25, 2017, 11:16 pm Last Edit: Aug 25, 2017, 11:19 pm by Grumpy_Mike
Like this:-


Enable the internal pull up resistor on the input.


Quote
people who want to sabotage the project
Why are they such people? This is not normal.

maxwell1

#13
Aug 26, 2017, 11:49 am Last Edit: Aug 26, 2017, 11:57 am by maxwell1
Grumpy your awesome man. Thanks a lot :) but I guess there is misunderstanding what I meant was door magnetic switch not button switch. Does it works the same way?


@off-topic Btw did you used to support in another forum's than here? Cuz your name ring bells here?

MarkT

Magnetic switch as in reed-relay or hall-sensor?
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up