CuVoodoo

the sorcery of copper

User Tools

Site Tools


spark_abacus

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
spark_abacus [2017/01/20 21:09] – [Orange Pi] kingkevinspark_abacus [2017/01/23 19:34] – adjust summary kingkevin
Line 1: Line 1:
-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 ======
Line 23: Line 23:
 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 ======
Line 98: Line 145:
  
 ====== 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.
Line 112: Line 163:
 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.
spark_abacus.txt · Last modified: 2024/01/07 17:49 by 127.0.0.1