Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
spark_abacus [2017/01/18 20:27] – EPS8266 kingkevin | spark_abacus [2017/01/23 19:34] – adjust summary kingkevin |
---|
The spark abacus is a custom electricity meter with wireless data logging capability. | The spark abacus is a custom electricity meter monitoring system. |
It's a follow-up to the [[spark_counter|spark counter]] for a 3-phase 4-wire mains electricity power distribution installation. | It's a follow-up of the [[spark_counter|spark counter]], but for a 3-phase 4-wire mains electricity power distribution installation. |
| |
====== electricity meters ====== | ====== electricity meters ====== |
Compared to the [[spark_counter#peacefair_pzem-004|PZEM-004]] it comes without display and buzzer, but is much smaller. | Compared to the [[spark_counter#peacefair_pzem-004|PZEM-004]] it comes without display and buzzer, but is much smaller. |
Else it uses the same design and chip. | Else it uses the same design and chip. |
| |
| ===== DDM100TC ===== |
| |
| The [[http://www.china-huabang.com/en/product-show.asp?id=31&tt=101|DDM100TC]] (you can find it under different brands) is a 3-phase 4-wire electricity meter. |
| |
| {{:spark_abacus:ddm100tc-01.jpg?0x200|DDM100TC module, front side}} |
| {{:spark_abacus:ddm100tc-02.jpg?0x200|DDM100TC module, connectivity}} |
| |
| The meter provides: |
| * 1 LCD to show the energy used in kWh (with a precision od 0.1 kWh) |
| * 3 LEDs to show which phase powered (L1, L2, L3) |
| * 1 LED to show the direction to the current (reverse if REV is on) |
| * 1 LED to show impulses as energy is used |
| * 1 S0 interface to output impulses as energy is used |
| |
| The S0 interface (labelled TEST on the side) allows me to collect the energy used on my micro-controller. |
| Connect the + side (pin 8) to a positive voltage (i.e. +5V), an the - side (pin 7) to an input (with a pull-down resistor). |
| Each impulse will generate a high signal (+2.5V in my case) on - for ~ 90 ms. |
| The number of impulses indicates the energy used, and the time interval between impulses indicates the current power consumption. |
| I chose one with a high impulse rate of 1600 impulses/kWh (= 1 impulse for every 0.625 Wh). |
| |
| {{:spark_abacus:ddm100tc-03.jpg?0x150|DDM100TC module, LCD board, front side}} |
| {{:spark_abacus:ddm100tc-06.jpg?0x150|DDM100TC module, LCD board, back side}} |
| {{:spark_abacus:ddm100tc-04.jpg?0x150|DDM100TC module, meter board, front side}} |
| {{:spark_abacus:ddm100tc-05.jpg?0x150|DDM100TC module, meter board, back side}} |
| |
| There is also the DDM100TCR model with an RS-485 interface, but I couldn't find any documentation about the protocol messages, thus I wasn't interested in this feature. |
| |
| ===== Eastron SDM120-Modbus ===== |
| |
| The [[http://www.eastrongroup.com/|Eastron]] [[http://eastrongroupco.hk02.057321.com/productsview/14.html|SDM120-Modbus]] is a slim 1-phase 2-wire electricity meter. |
| |
| {{:spark_abacus:sdm120-02.jpg?0x200|SDM120 front}} |
| {{:spark_abacus:sdm120-01.jpg?0x200|SDM120 side}} |
| {{:spark_abacus:sdm120-03.jpg?0x200|SDM120 board back}} |
| {{:spark_abacus:sdm120-04.jpg?0x200|SDM120 board side}} |
| {{:spark_abacus:sdm120-05.jpg?0x200|SDM120 board side}} |
| |
| Be aware as numerous SDM120 models exist, combining following options: |
| * in-line current measurement or using a current sensing coil (CT) |
| * with electro-mechanical display or LCD, sometimes with backlight |
| * only with 2 pulse outputs, or with additional MBus or Modbus interface |
| |
| I chose the {{:spark_abacus:sdm120-modbus_user_manual_scan.pdf|SDM120 model}} (one per phase) since I wanted to learn about the RS-485 interface and Modbus protocol. |
| The [[http://eastrongroupco.hk02.057321.com/data/uploads/Eastron_SDM120-Modbus_protocol_V2_3_(1).pdf|corresponding Modbus document]] ({{:spark_abacus:sdm120-modbus_protocol_v2.1.pdf |older v2.1}}) lists the registers containing the measurements (input registers) and configuration (holding registers). |
| This document also explains the Modbus protocol, but I rather recommend to read the one for the [[http://eastrongroupco.hk02.057321.com/data/uploads/Eastron_SDM630MV_CT_protocol_V1_0_.pdf|SDM630]] since it contains more information, most importantly the timing between messages. |
| |
| |
====== EPS8266 ====== | ====== EPS8266 ====== |
| |
====== Orange Pi ====== | ====== Orange Pi ====== |
| |
| {{:spark_abacus:opi-01.jpg?0x200|Orange Pi PC, front side}} |
| {{:spark_abacus:opi-02.jpg?0x200|Orange Pi PC, without heat sink}} |
| {{:spark_abacus:opi-03.jpg?0x200|Orange Pi PC, back side}} |
| |
The [[http://www.orangepi.org/orangepipc/|Orange Pi PC]] is a cheap [[http://www.aliexpress.com/item/Orange-Pi-PC-ubuntu-linux-and-android-mini-PC-Beyond-and-Compatible-with-Raspberry-Pi-2/32448079125.html|$15 alternative]] to the Raspberry Pi 2. | The [[http://www.orangepi.org/orangepipc/|Orange Pi PC]] is a cheap [[http://www.aliexpress.com/item/Orange-Pi-PC-ubuntu-linux-and-android-mini-PC-Beyond-and-Compatible-with-Raspberry-Pi-2/32448079125.html|$15 alternative]] to the Raspberry Pi 2. |
* [[http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=755|Android]] (often ROMs from other Allwinner based products), with a weird [[http://www.orangepi.org/Docs/SDcardinstallation.html#Install_Android_OS_image|installation process]] | * [[http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=755|Android]] (often ROMs from other Allwinner based products), with a weird [[http://www.orangepi.org/Docs/SDcardinstallation.html#Install_Android_OS_image|installation process]] |
* various [[http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=342|linux]] distributions | * various [[http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=342|linux]] distributions |
Since I'll only use it as server I decided to go with debian jessie minimal. | Since I'll only use it as server I decided to go with an [[https://www.armbian.com/orange-pi-pc/|armbian]] debian jessie image. |
| |
The pin header is the same as the [[http://www.raspberry-projects.com/pi/pi-hardware/raspberry-pi-2-model-b/rpi2-model-b-io-pins|40-pin Raspberry Pi]], but seeing the support of the OS I wouldn't rely on the hardware drivers. | The pin header is the same as the [[http://www.raspberry-projects.com/pi/pi-hardware/raspberry-pi-2-model-b/rpi2-model-b-io-pins|40-pin Raspberry Pi]], but seeing the support of the OS I wouldn't rely on the hardware drivers. |
I am only using this SBC a cheap computer rather than hardware platform. | I am only using this SBC a cheap computer rather than hardware platform. |
Also, don't forget to put a heat sink on the CPU, else they will be slowed down quite often because of the high temperatures. | Also, don't forget to put a heat sink on the CPU, else they will be slowed down quite often because of the high temperatures. |
| |
| On it I've installed an [[https://www.influxdata.com/|InfluxDB]] time-series database to store the values (using the HTTP API), and [[http://grafana.org/|Grafana]] to visualize them. |