Daniel Porrey
Published © GPL3+

Opto-Isolated AC Voltage Sensor

Use a 120VAC Pilot Light and a photoresistor to create a simple inexpensive AC voltage sensor based on opto-isolation.

IntermediateFull instructions provided9,007
Opto-Isolated AC Voltage Sensor

Things used in this project

Hardware components

5mm Photoresistor
120VAC Amber Pilot Light
2.2K Ω Resistor
1K Ω Resistor
16 inch 22 GA. Solid Lead Wire - Red
16 inch 22 GA. Solid Lead Wire - Black
16 inch 22 GA. Solid Lead Wire - Yellow
3/8" diameter by 2.5" hard plastic tube
I used a smoothie straw.
Heat Shrink Tubing
I used 4 pieces by 4". 1x 3/8", 1x 1/4", 1x 3/16" and 1x 3/32"

Software apps and online services

Windows 10 IoT Core
Microsoft Windows 10 IoT Core
Visual Studio 2015
Microsoft Visual Studio 2015


Read more


Wiring Diagram - Breadboard

Wiring Diagram - Schematic

Voltage Divider Circuit - Theoretical

This is the Fritzing file for the theoretical circuit diagram.

Voltage Divider Circuit - Wiring

This is the Fritzing diagram for wiring the device.


Visual Studio 2015 C# Source Code


Daniel Porrey

Daniel Porrey

50 projects • 303 followers
I lead a software development team for a large Chicago based organization. I also develop applications personally.