user15421: I have a home automation project and am looking to use multiple current sensors (ACS712) for multiple appliances. I just need to know whether current is present or not instead of the current value. Is it possible, that I connect the ACS712 sensor to the digital input of Arduino, and get HIGH or LOW via digitalRead() function. If not, please suggest an alternative to detect ac current is present or not with digital input i.e. HIGH or LOW that can be read via the digitalRead() function.

user11037: Considering an ATMEGA with a 5V VCC we have:
LOW  = < 0.3*VCC = 0,3*5V = 1.5 V
HIGH = > 0.5*VCC = 0,5*5V = 2.5 V

You can connect directly to the Arduino if the output of your sensor is higher than 2.5 volts whether current is present or below 1.5 volts if not. This would translate to HIGH or LOW output from digitalRead() function respectively.
You need to recalculate this values for the 3 volt version of Arduino, probably in this case is better the comparator solution to ensure up to 3 volts max logic level.
Example circuit as follow, just need to set voltage divider to desired threshold (note this is for 5v case),


15421: <p>I have a home automation project and am looking to use multiple current sensors (ACS712) for multiple appliances. I just need to know whether current is present or not instead of the current value. Is it possible, that I connect the ACS712 sensor to the digital input of Arduino, and get HIGH or LOW via <code>digitalRead()</code> function. If not, please suggest an alternative to detect ac current is present or not with digital input i.e. HIGH or LOW that can be read via the <code>digitalRead()</code> function.</p>
 11037: <p>Considering an ATMEGA with a 5V VCC we have:</p>

<pre><code>LOW  = &lt; 0.3*VCC = 0,3*5V = 1.5 V
HIGH = &gt; 0.5*VCC = 0,5*5V = 2.5 V
</code></pre>

<p>You can connect directly to the Arduino if the output of your sensor is higher than 2.5 volts whether current is present or below 1.5 volts if not. This would translate to HIGH or LOW output from <code>digitalRead()</code> function respectively.</p>

<p>You need to recalculate this values for the 3 volt version of Arduino, probably in this case is better the comparator solution to ensure up to 3 volts max logic level.</p>

<p>Example circuit as follow, just need to set voltage divider to desired threshold (note this is for 5v case),</p>

<p><a href="https://i.stack.imgur.com/juOxX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/juOxX.png" alt="Comparator"></a></p>
