# AC current detection with 1-10mA sensitivity

I need to build a current switch that will be connected to an Arduino (or Raspberry Pi) digital input. I need it to set to HIGH (3.3 V) if the current is above some threshold, and LOW otherwise. The threshold ideally should be around 1 mA, but 10 mA is also OK. The maximal current is about 2A.

I understand that I can use a Hall effect sensor such as ACS712, then some ADC (or use Arduino's built-in ADC), and add some capacitor to keep the state between AC pulses (or do it programmatically). However, even the 5 A version of ACS712 has 185 mV/A sensitivity, that is even 10 mA current will result in 1.85 mV ACS712 output. I'm afraid this will be below the noise level.

Are there any better approaches to this?

You can use a current gauge IC with a digital output.

An example is the Maxim DS2740. This connects across a current sense resistor in the low-side of the load.

The digital output uses the Dallas (now Maxim) 1-wire bus, which is easy enough to use once you read up on it. There'll be example software on their site and the internet.

It can use a 10 milliohm sense resistor and gives a 15-bit digital measurement from its internal ADC. A read through the datasheet shows that it can deal easily with a sub-1 mA measurement at your 2 A max. current.

The below diagram is taken from the Maxim DS7240 datasheet (with a label mod').

Assuming:

1. You need galvanic isolation

2. Mains frequency (50 or 60Hz)

You could try a current transformer such as the CR8401-1000-G.

If you use a high value (few 1K) load resistor, clamp the output with some diodes, and bias it to the middle of the ADC range you should be able to get close to your 1mA goal. Loop through more than once to increase the sensitivity double, triple etc.