Current + Voltage Sensing

A project log for Wi-Fi Power Switch

ESP8266 based smart power switch/dimmer with Kill-A-Watt class power/power factor readings

Justin KennyJustin Kenny 10/31/2016 at 19:410 Comments

For current sensing I will be using a set of op amps to amplify the voltage across a 2mOhm shunt resistor on the low side (neutral). The resistor selected is the following:

The power dissipated in the resistor is 16 Arms^2*0.002 ohms = 0.512 W. The peak voltage drop is +/- 45.3 mV. The voltage will be AC coupled and DC shifted by 2.048 V, then multiplied by 40 or 400x to make the most of the ADC's range and capture both sides of the waveform. The signal will also be filtered to remove components over the ADC's sampling frequency of 600sps.

Voltage sensing is much simpler, it will be done through a voltage divider which cuts the voltage down by a factor of 201x. The voltage will also be fed through an identical filtering/op-amp network such that the phase response will be the same as the current amplifiers so the real power calculation is still correct for high frequency components that may be phase shifted.