Introduction: Arduino AC 220V/110V Voltage Detector

Sometimes when we have a smart home project, we also need a system to monitor does the appliance really turns on or we might also want to make a system just to detect and logs whether a machine or appliance is turned on. This problem can be solved by using a module that can detect whether there is an AC voltage of 110V/220V. After searching online I have stumbled upon this module and thought that it might be a good idea to make an instructables about how to use this module.

In this instructables we are going to make a system that detects whether there is an AC voltage of 220V or not using an Arduino digitalRead.

If you want to buy this module here is the link to the store:

Voltage Detector Module


1. Arduino Uno + USB cable

2. Male-Female jumper (3 pcs)

3. Voltage Detector Module

Step 1: Wiring

This is a simple wiring that will give a logic HIGH to Arduino pin 2 if the electrical plug connected to an active outlet.

Step 2: Programming

First, we define that digital pin 2 is called voltagePin from now on, and digital pin 13 as ledPin.

Secondly, we set up the voltagePin as a digital input pin and ledPin as a digital output pin by writing pinMode(voltagePin,INPUT); and pinMode(ledPin,OUTPUT); ,respectively.

In this system we want the on board LED to light up whenever the plug is connected to an outlet. So every time we get a HIGH value from digitalRead(voltagePin) the LED will turn on.

You can download the program attached bellow, if you want to try this.

Step 3: Testing

Here is a video where I tried connecting the plug to a socket. You can see how the LED turn on and turn off according to the plug condition.