Power talks

It’s been a while now – I started logging data over the power usage back around 17th of April. I wanted to make sure that the script I was running was stable before writing about it.

In the beginning I noticed a few times where the script terminated without any good reason. I think the reason now was due to some changes in my network setup. The raspberry Pi REALLY does not like when the IP address in the middle of a data transmission. Well, The network have been stable and now I think I can safely say that this is the script that I will continues to use.

Yes, I know – the rPi is really overkill for this application – I would like to use an ESP8266. The system is using the Wi-Fi anyway. But for now I will stick with this I continue to get data into my database and I am happy with it.

I THINK the script is not using any special libraries apart maybe from the pySerial that I needed to install.

In all its simplicity the script reads 37 registers (74 bytes) from the RS-485 device with address 01. This is the Eastron device. This is done every 29th second. There is a timeout of 1 second in the reading routine so data should come approximately every half minute into the DB. The data is sent using a REST interface (homegrown) and the PHP catch page is inserting the timestamp and separating the data. For now I am only saving the following:

  • Voltage per phase
  • Current per phase
  • Power per phase
  • Total power
  • Total accumulated power
  • Frequency

I could log a lot more data but it just seems a bit… over the top and I really don’t know what I would do with the info.

The interface is a FTDI USB-to-Serial converter along with an RS-485 interface chip.

Related posts:

Leave a Reply