I am looking to use the Raspberry Pi 2 to measure the power consumed by household appliances. I know that the Pi does not have an inbuilt ADC. I found that the MCP3008 can be interfaced with the Pi as an external ADC. Can I use this to measure voltage and current, and are there any tutorials that I can follow?
Asked
Active
Viewed 924 times
3
-
2This could be an interesting project and you might learn a lot doing it. But if you just want to get the answer, consider purchasing a "Kill A Watt" device. It will be much cheaper and easier. http://www.p3international.com/products/p4400.html – May 21 '15 at 18:20
-
1Have a look at ubiquity networks mpower and mport products – May 21 '15 at 19:11
1 Answers
2
Here goes, quick tutorial: -
- Power = volts x amps
- This applies to AC as well as DC
- Irrespective of power factor, power = volts x amps
- You'll need to sample the voltage and current signals at about 1kHz or harmonics in the current waveforms will alias the ADC and give false readings of power
- Once you have a means of digitizing v and i multiply the instantaneous values and average the results through a digital low pass filter.
- This gives you average power
- Energy companies bill you (usually) as kW hours so integrate the average power over time to create kWh
You'll either use a small voltage transformer to give a voltage reference you can digitize or maybe a resistive potential divider BUT beware, the r-divider means your ADC and Micro are at potentially life-snuffing voltages.
For current use a hall effect device or a CT.
-
I was planing to step down the supply voltage by using a voltage divider and give it to the MCP3008 and interface it to the raspberrypi for the calculations. Can I do it that way? – May 22 '15 at 18:37
-