3

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?

migrated from electronics.stackexchange.com May 25 '15 at 2:13

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

  • 2
    This 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. p3international.com/products/p4400.html – mkeith May 21 '15 at 18:20
  • 1
    Have a look at ubiquity networks mpower and mport products – Dan May 21 '15 at 19:11
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? – Rohit Seshadri May 22 '15 at 18:37
  • Read my penultimate paragraph. – Andy aka May 22 '15 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.