Simple RPi setup to measure power consumption with RPi and a 4ch ADC

Hi all,

the OEM project fascinates me a lot and I also want to get started (despite limited electronics background so far).  For first steps, I have researched the OEM website and also some other online resources to have some own thoughts about how to create a simple power logger for my home.  Some questions came to my mind, why it is not possible to set things up even more easily, and I would love to hear your thoughts, what I am missing.

For now, I was wondering what is absolutely necessary to measure (estimated) power readings off of three phases.  I would use the SCT-013-030 transformers with built in 62 ohm load, that already delivers an AC voltage proportional to a max. current of 30A. Can I simply connect the two outputs of the converter to the GND and A0 of a ADS1115 based ADC, which is then read out via I2C from a RPi board?  Sampling is more than 800 samples per second with 16 bit depth, adjustable input range would be set to -1 to 1 V. The ADC would even allow for three more inputs, so I could connect two more phases and have one spare channel to also implement conversion of a voltage signal in future improvement to have more precise power readings. The digital signal would then be converted to power according to the description in the calibration section.

Using a RPi and the DAC board, I was also wondering, why it is not possible to also use the RPi itself to connect to the online database and send the measured data out. Having a USB wireless adapter on the Pi, could this be done?

I am aware that these are just thoughts and there is still a lot of work to have everything implemented and programmed.  But could you please comment on feasibility of my ideas.

Thanks alot, Oli

Oli's picture

Re: Simple RPi setup to measure power consumption with RPi and a 4ch ADC

Any ideas or comments on this?  Maybe my thoughts are too naive, sorry if so - I am very excited but also new to the topic.  Can anyone give me a hint what I am overseeing?

Robert Wall's picture

Re: Simple RPi setup to measure power consumption with RPi and a 4ch ADC

"I was also wondering, why it is not possible to also use the RPi itself to connect to the online database and send the measured data out. Having a USB wireless adapter on the Pi, could this be done?"

I think you're very close to describing the emonPi! The emonPi is a Raspberry Pi with a 2+1 channel emonTx in one box, it has Ethernet or can have a WiFi dongle for connectivity. So not only can it be done, it has been done - and more, the RPi can also be a web server on your LAN running the emonCMS database locally (and with full functionality if you add a hard disc).

But, I'm not too clear on exactly what you want to measure. You mention 3 phases, and yes, to know the power totally accurately you must measure the current and voltage on each phase, because although the aim is to have the 3 currents equal ("balanced") when you'd only need to measure one phase, that never happens in practice. However, we find that we can assume that the three voltages are sufficiently close to each other to not incur too much error. Therefore, although 6 inputs (3 x current, 3 x voltage) would be best, 3 current and one voltage is normally adequate.

I would question the suitability of the ADS115 - 800 samples per second is only 16 samples per cycle, whereas the Arduino ADC can measure approximately 50 sample pairs (voltage and current) per cycle. I think what you are gaining on resolution with 16 bits, you are more than losing on the number of samples per cycle.

Oli's picture

Re: Simple RPi setup to measure power consumption with RPi and a 4ch ADC

Robert, thanks a lot for your input.

Yes, you are absolutely right - thinking about it, having only 800 samples is too little.  So a better ADC would probably be the ADS1015, which has only 12bit depth but roughly four times denser sampling, resulting in 33 points per half-sine.  So that should probably be enough and overcompensate for the lower resolution. The nice thing about it is the integrated programmable amplifier, so the input range can be already be set to what is delivered by CTs with integrated resistors (e.g. -1.024 .. 1.024 V input range), resulting in a very slim board.

With that I plan to analyse the signal of three CTs from the three lines supplying my house.  The fourth channel would simply digitize the AC input from a transformer, but as you describe only of the first phase.  The reason is that only the first phase drives essentially the whole house, while the second and third phases only supply stove and oven.  So on one side, I want to have more precision on the power consumption of all the appliances except for kitchen. And on the other hand, I also simply don't have the AC signals of phases two and three readily available.

This approach also allows for a phased development, starting with only one channel in apparent power analysis mode, which would then easily be extended towards three phases apparent consumption.  The next step would be to also analyse the AC signal and calculate the precise consumption on phase one and finally make use of your suggestion that phase two and three have very similar AC voltage levels but shifted by 120 and 240 degree.

Well, so far its only planning and I will have to see how far I get.  Nevertheless, thanks again for your input, it is highly appreciated.  I will certainly be back at some point with more questions and - hopefully - in the end with decent results.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.