Taken from here
Basically its a project using a microcontroller to measure the mains AC voltage.
While I understand the use of the voltage divider to drop the level to a lower voltage that the uC can read - the bit that confuses me is the 28k and 6k8 resistor. How can you connect the the 6k8 resistor to the arduino's 5V. That 5V will be an AC voltage - correct? How can they power the arduino from that?
Basically its a project using a microcontroller to measure the mains AC voltage.
The voltage is measured using an AC to AC step down power adapter. The power adapter steps the voltage down from 230V AC to around 9V AC. Using the power adapter method rather than making a direct measurement on the high voltage side maximizes safety as no high voltage work is needed.
Sensor Electronics
As with the current measurement the voltage produced by the power adapter needs to be converted to a voltage that the arduino can read.The two 1M and RsensV resistors make a voltage divider that reduces the voltage waveform amplitude further and the 6.8K and 27K resistor biases the resultant waveform by about 4.0V.
When the voltage adapter is also used for powering the arduino there is some interference with the voltage measurement circuit. Biasing by 4.0V instead of 2.5V and using the two 1M resistors minimizes this interference.
Taking a voltage measurement allows us to gain more information about the energy use than a current measurement alone, real power and power factor can now be calculated and its also easier to measure the grid frequency than with current measurement only.
While I understand the use of the voltage divider to drop the level to a lower voltage that the uC can read - the bit that confuses me is the 28k and 6k8 resistor. How can you connect the the 6k8 resistor to the arduino's 5V. That 5V will be an AC voltage - correct? How can they power the arduino from that?