0
\$\begingroup\$

I am trying to setup an arduino so it can detect an AC where it only has access to one pole.

(kind of like these "electricians screwdrivers" that you put in one of the connections of an electric outlet, and then it lights up by completing the circuit through the users body)

I have access to a simulated ac power source, a pin from a different controller with a different power source that is toggled between high and low every 10ms.

Now, when I connect the arduinos analog input and gnd to the ac power source, and print out the value of it every 5ms to the serial monitor of the arduino, all i get is zeros.

However, I know that current is flowing, because when I put a buzzer between the one ac pin and the arduinos gnd, I hear a sound from the buzzer.

Why am I not detecting the current here? Do I have to build my detector differently? below is a simplified drawing of my setup.

Thanks enter image description here

(Sorry I am not an electrical engineer, please forgive the limited language and knowledge)

\$\endgroup\$
6
  • \$\begingroup\$ Your hand drawing makes it look like you're connecting the analog pin to ground. Is that what you're doing? \$\endgroup\$ – Dan Laks Sep 29 '14 at 23:54
  • \$\begingroup\$ Hello @BruceAbbot, Thanks for your help. The circuit you suggested does work,however I still cant meet the requirement that i can only connect 1 wire to the ac circuit. your circuit makes the buzzer go a lot louder and I get clear reading, but doesnt it measure the voltage between the 2 poles of the ac source? I want to measure the voltage between the arduinos gnd (or anything thats not part of the ac circuit) and an arbitrary part of the ac circuit. I know there is one because I get the buzzer to work connecting it to only one pole of the ac source and to the arduinos gnd. Is This possible? \$\endgroup\$ – patrick Sep 30 '14 at 9:13
  • \$\begingroup\$ @DanLaks yes thats what I did \$\endgroup\$ – patrick Sep 30 '14 at 9:14
  • \$\begingroup\$ If you're shorting your analog signal to ground, then all you'll ever read is 0V. If Bruce Abbott's answer isn't acceptable, it's still not clear on what exactly you're looking for. \$\endgroup\$ – Dan Laks Sep 30 '14 at 17:20
  • \$\begingroup\$ There are chips that have an onboard rigowski coil that you can use to detect current. All signal processing is done for you, just read the output from an ADC. \$\endgroup\$ – RYS Jan 28 '15 at 3:23
1
\$\begingroup\$

Those "electricians screwdrivers" detect voltage (not current) and while it may appear that there is only one contact point, they rely on the human body having a path to ground to complete the circuit.

The Arduino's analog inputs measure voltages between 0V and +5V. To measure current you must convert it into a voltage that is within this range. The simplest way to get voltage from current is to pass it through a resistor, then the voltage across the resistor is determined by Ohm's Law (V=I*R). For example if your buzzer draws 1 Amp and you insert a 1 Ohm resistor between the buzzer and ground, you will get 1 Volt.

However there are a couple of possible issues. Firstly, the resistor will steal 1 Volt from your buzzer (so it will buzz even more quietly). You can use a smaller resistance to reduce voltage drop, but then the signal also gets smaller. If you use a 0.1 Ohm resistor the voltage drop should be minimal, but the reading you get will be only be 0.1V per Amp. If you just want to tell whether whether the buzzer is on or off then this should be plenty. If you want accurate reading of lower currents then the voltage may have to be amplified.

Secondly, the current is AC - so the voltage you get will be a sine wave that goes both positive and negative. Since the Arduino can only measure positive voltage it will only 'see' the positive half cycles. This may be fine for your application. However the analog input could be damaged by negative voltage, so you should add a protection circuit to prevent the voltage from going below ground.

In the circuit below, R2 and D1 prevent the analog input from going below -0.3V.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.