# Detecting open-circuit or short-circuit

**URL:** <https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706>\
**Category:** General Electronics\
**Created:** [October 31, 2014, 5:42pm UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706 "2014-10-31T17:42:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [October 31, 2014, 5:42pm UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/1 "2014-10-31T17:42:58Z")

</div>

I have several sensors, solenoids, etc., some of which are powered by a 5 volt regulated supply (which is supplied to the Arduino as well), and others of which are powered by a 12 volt supply. I wish to be able to have my Arduino Mega be able to detect if any of these devices have an open or short circuit, and, in the case of a short circuit, ideally be able to identify which of the devices has the short circuit.

What are the best ways to detect this? Is there any straightforward circuit that will be able to output digital LOW/HIGH to the Arduino depending on the existence of an open or short circuit? I'm going to be implementing this on a PCB shield, so it doesn't have to be too simple.

---

<div class="post-metadata">

**Author:** ![KenF](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/kenf/32/218491_2.png) [@KenF](https://forum.arduino.cc/u/KenF)\
**Post date:** [October 31, 2014, 6:05pm UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/2 "2014-10-31T18:05:12Z")

</div>

Surely if the same 5v is supplying your arduino, in the event that there is a short circuit, your arduino is already unconscious.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [October 31, 2014, 7:16pm UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/3 "2014-10-31T19:16:22Z")

</div>

> KenF:  
> Surely if the same 5v is supplying your arduino, in the event that there is a short circuit, your arduino is already unconscious.

Well yes. I would want the short-circuit detector to have circuit-breaker functionality of course.

---

<div class="post-metadata">

**Author:** ![MarkT](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@MarkT](https://forum.arduino.cc/u/MarkT)\
**Post date:** [October 31, 2014, 7:29pm UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/4 "2014-10-31T19:29:25Z")

</div>

More details of the sensors and solenoids? Detecting fault states like this requires knowledge of how things are connected up - various voltages and currents may need sampling.

---

<div class="post-metadata">

**Author:** ![dan333](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@dan333](https://forum.arduino.cc/u/dan333)\
**Post date:** [October 31, 2014, 7:43pm UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/5 "2014-10-31T19:43:35Z")

</div>

You're in an area here with several potential problems. The first is inductive switching transients in the relays and solenoids. See the following thread reply #6 for a little background, check the references.

[http://forum.arduino.cc/index.php?topic=276019.msg1943395#msg1943395](http://forum.arduino.cc/index.php?topic=276019.msg1943395#msg1943395)

Secondly, you'll want to use NPN or n-MOSFET inverters to switch the relays and solenoids. See various ckts here,

> <https://electronics.stackexchange.com/questions/56093/how-to-use-a-3v-output-to-control-a-5v-relay>

[https://www.google.com/search?q=n-mosfet+npn+inverter+relay+driver&rlz=1C1RNLG\_enUS517US518&espv=2&source=lnms&tbm=isch&sa=X&ei=v-FTVOzpKMaMyASV4YLoDQ&ved=0CAgQ\_AUoAQ&biw=1089&bih=888](https://www.google.com/search?q=n-mosfet+npn+inverter+relay+driver&rlz=1C1RNLG_enUS517US518&espv=2&source=lnms&tbm=isch&sa=X&ei=v-FTVOzpKMaMyASV4YLoDQ&ved=0CAgQ_AUoAQ&biw=1089&bih=888)

Thirdly, note that you DEFINITELY need those reverse-wired diodes across the relay/etc coils to squelch inductive switching transients.

Fourthly, in general, it's not the best idea to power both your logic and inductive loads from the same power source, eg 5V, as there will always be residual voltage level-shifts and noise spikes when the loads switch.

Fifthly, you can probably do a reasonable job monitoring for shorts and opens by connecting a voltage-divider, and/or low-pass filter, to the "top" pin [collector or drain terminal] on the inverter transistors, and connect that to your Ardunio I/O pins. IE, the point where the relays connect to the inverters. You can figure yourself what happens to that voltage as you turn the inverter on and off, and also what it will be if the inverter or relay is open or short.

Also, I would definitely use a filter cap at the I/O pin.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [October 31, 2014, 7:50pm UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/6 "2014-10-31T19:50:02Z")

</div>

> MarkT:  
> More details of the sensors and solenoids? Detecting fault states like this requires knowledge of how things are connected up - various voltages and currents may need sampling.

Currently the 5 volt sensors consist of several pressure transducers (i.e. they take 5 volts, consume a few milli-amps, and output an analog voltage). In addition, I have frequency-to-voltage converters that require 12 volt power and output a 5 volt signal. Not sure about their current consumption, but probably similar. My 12-volt solenoids are connected through a SainSmart 16 relay board and, depending on the solenoid, require 200-1000mA. The relay board has an on-board regulator which provides the 5 volt output for the Arduino and related sensors.

---

<div class="post-metadata">

**Author:** ![MarkT](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@MarkT](https://forum.arduino.cc/u/MarkT)\
**Post date:** [October 31, 2014, 8:21pm UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/7 "2014-10-31T20:21:10Z")

</div>

Sorry, but details matter - which sensors - part numbers, datasheets, etc. The output  
impedance of a sensor is a crucial detail.

An existing solenoid driver module could have its current monitored to check this  
agrees with the expected current level - perhaps a high-side current monitor chip in  
its supply. This would detect most issues as you could check the current changes  
appropriately as each relay is switched.

A general method to validate analog sensor inputs is to check the rate of change of  
values and that the value is in the expected range.

To verify open circuit issues with a low output impedance a pull-up or pull-down  
resistor can be used (but if the sensor has significant impedance this would distort  
the reading. Monitoring the supply current per sensor is another approach.

---

<div class="post-metadata">

**Author:** ![dan333](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@dan333](https://forum.arduino.cc/u/dan333)\
**Post date:** [October 31, 2014, 8:44pm UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/8 "2014-10-31T20:44:11Z")

</div>

> My 12-volt solenoids are connected through a SainSmart 16 relay board and, depending on the solenoid, require 200-1000mA.

You're definitely gonna have large inductive spikes with these, and need to take the precautions mentioned in the first part of my previous reply. And even worse if you have long wires going from the drivers to the inductive loads. Then you'll have large inductive loops in the wires, besides in the coils themselves, and these loops are also called EMI-radiating antennas. Good luck.

---

<div class="post-metadata">

**Author:** ![itsafrina](https://avatars.discourse-cdn.com/v4/letter/i/ba8739/32.png) [@itsafrina](https://forum.arduino.cc/u/itsafrina)\
**Post date:** [August 14, 2015, 2:19pm UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/9 "2015-08-14T14:19:22Z")

</div>

Hello,im also new to this arduino life...i really need someone to help me to make a simple short circuit detector using the arduino board.Im in a group of three and we are trying to do something new for our school project. So it would be great if we could get a repply from you ASAP

---

<div class="post-metadata">

**Author:** ![CrossRoads](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/crossroads/32/214033_2.png) [@CrossRoads](https://forum.arduino.cc/u/CrossRoads)\
**Post date:** [August 14, 2015, 2:31pm UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/10 "2015-08-14T14:31:40Z")

</div>

Detect a short between what and what?

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [August 14, 2015, 2:52pm UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/11 "2015-08-14T14:52:53Z")

</div>

> CrossRoads:  
> Detect a short between what and what?

I also wondered. I thought it might be possible that the instructor left it open ended like that, to see how the students explore the problem space.

---

<div class="post-metadata">

**Author:** ![itsafrina](https://avatars.discourse-cdn.com/v4/letter/i/ba8739/32.png) [@itsafrina](https://forum.arduino.cc/u/itsafrina)\
**Post date:** [August 15, 2015, 1:07am UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/12 "2015-08-15T01:07:44Z")

</div>

okay, we are gonna explain our project to you. we are using the arduino board to make a simple home automation system that also could detect short circuits. we have tried making the home automation circuit. now, we dont know how to make the connections so that our project could also detect short circuit.it will be great if you could help us by teaching us how to make the connections and program the board. 🙂

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [August 15, 2015, 1:10am UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/13 "2015-08-15T01:10:26Z")

</div>

You still haven't explained what kind of short circuits.

---

<div class="post-metadata">

**Author:** ![Qdeathstar](https://avatars.discourse-cdn.com/v4/letter/q/d6d6ee/32.png) [@Qdeathstar](https://forum.arduino.cc/u/Qdeathstar)\
**Post date:** [August 15, 2015, 1:14am UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/14 "2015-08-15T01:14:18Z")

</div>

if you are talking about a mains short circuit, the circuit breaker or fuse will detect a short circuit automatically, if your talkin about arc fault detection, perhaps looking for fast changes in amperage draw.

---

<div class="post-metadata">

**Author:** ![jackwp](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@jackwp](https://forum.arduino.cc/u/jackwp)\
**Post date:** [August 15, 2015, 1:34am UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/15 "2015-08-15T01:34:51Z")

</div>

Please give some more detail. Home automation is sorta vague.  
Are you using 110 ac volts, 220 ac volts, relays, 12 volts, or what ?  
Describe your system please.

---

<div class="post-metadata">

**Author:** ![itsafrina](https://avatars.discourse-cdn.com/v4/letter/i/ba8739/32.png) [@itsafrina](https://forum.arduino.cc/u/itsafrina)\
**Post date:** [August 15, 2015, 4:56am UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/16 "2015-08-15T04:56:41Z")

</div>

our system is based on these link below.  
Arduino Smart Home Automation Thailand  
[http://androidcontrol.blogspot.com/20](http://androidcontrol.blogspot.com/20)...  
[http://www.smart-homecontrol.com/](http://www.smart-homecontrol.com/)  
[http://softpowergroup.net/](http://softpowergroup.net/)

we are just doing a prototype of the system so we would like to know how do we connect a circuit that detects short circuit to the same board and how do you make the circuit that detects the short circuit?use what materials? thank you for responding ASAP cause this project is very important to us

---

<div class="post-metadata">

**Author:** ![itsafrina](https://avatars.discourse-cdn.com/v4/letter/i/ba8739/32.png) [@itsafrina](https://forum.arduino.cc/u/itsafrina)\
**Post date:** [August 15, 2015, 5:01am UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/17 "2015-08-15T05:01:07Z")

</div>

the starting system we are gonna try is for 5v

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [August 15, 2015, 10:16am UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/18 "2015-08-15T10:16:54Z")

</div>

HELLO !

The OP is " **unmonk**" .

This thread was **hijacked** in Reply#8

(their objectives sound similar but are very different. Answering one, does not answer the other.Who's thread is this ?)

@OP,  
You have the right to click on "Report to Moderator" and complain your post has been hijacked in Reply#8.

@itsafrina,  
Start your own topic and remove your replies from this thread.

---

<div class="post-metadata">

**Author:** ![itsafrina](https://avatars.discourse-cdn.com/v4/letter/i/ba8739/32.png) [@itsafrina](https://forum.arduino.cc/u/itsafrina)\
**Post date:** [August 16, 2015, 8:00am UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/19 "2015-08-16T08:00:27Z")

</div>

okay, we are sorry cause we thought it was under the same topic. thank you for alerting us about this.

---

<div class="post-metadata">

**Author:** ![jackwp](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@jackwp](https://forum.arduino.cc/u/jackwp)\
**Post date:** [August 16, 2015, 3:29pm UTC](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706/20 "2015-08-16T15:29:22Z")

</div>

Insert an optocoupler in the circuit, that at normal operation, will provide a output voltage about half scale. Test that voltage with the analog input. It it is about half scale, all is well.  
If it goes to low, the ckt is open.  
If it goes to high, the ckt is shorted.

You realize that if you have a switch in the ckt, that turns it on and off. You will detect open when the switch is turned off.

[Next page](https://forum.arduino.cc/t/detecting-open-circuit-or-short-circuit/266706.md?page=2)
