How to effectively sense AC voltage using arduino

Thread Starter

Dumken

Joined Oct 7, 2014
31
Good day guys. Please can someone help explain to me a way or ways I can measure sense accurate AC voltage within 0-240VAC range. Thank you
 

Papabravo

Joined Feb 24, 2006
17,023
Use a transformer and an optocoupler. Measure the frequency of the output as 50 or 60 Hz. as appropriate. This will tell you if the AC voltage is there. If you want to measure the actual value you still use the transformer, but add a half-wave rectifier and an A/D converter.
 

shteii01

Joined Feb 19, 2010
4,644
The short answer is: Analog to Digital Converter (ADC).

The long answer is:
1. Arduino uses 5 volt system (Uno) and 3.3 volt system (Due). You have to decide which system you want.
2. 240 VAC is too much for Aruino ADC. If you try to measure 240 VAC with Arduino, you will fry the Arduino. You need circuit to reduce 240 VAC to something that Arduino ADC can safely read.
3. Safety. This website has specific guideline that forbids discussing systems that directly connect to mains voltage sources. Like Papabravo said, you will need another circuit (transformer and some other bits) to separate your mains voltage source (0-240 VAC) from your measuring circuit.
 

spinnaker

Joined Oct 29, 2009
7,835
Moderator's note: part of quote containing less than safe advice was removed.

But you are opening yourself up to danger with mains.

So then why would you give advice that could be dangerous to the TS and is against the rules of the forum?

Moderator's note: The post this one refers to has been removed.
 
Last edited by a moderator:
Top