AC Power Theory – Arduino maths - #arduino
AC Voltage and current continually alternate, as the name suggests, if we draw a picture of the voltage and current waveform over time, it will look something like the image below (depending on what’s using power – the current waveform – blue in the diagram below – is what you get if you look at a typical laptop power supply. There’s an incandescent light bulb in there as well). The image was made by sampling the mains voltage and current at high frequency, which is exactly what we do on the emontx or Arduino. We make between 50 and a 100 measurements every 20 milliseconds. (100 if sampling only current, and 50, if sampling voltage and current – we’re limited by the Arduino analog read command and calculation speed).