spark_abacus
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
spark_abacus [2016/10/04 21:22] – add orange pi kingkevin | spark_abacus [2017/01/23 14:15] – [Orange Pi] ass pictures 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 with wireless data logging capability. | ||
- | It's a follow-up to the [[spark_counter|spark counter]] for a 3 phases | + | It's a follow-up to the [[spark_counter|spark counter]] for a 3-phase |
+ | |||
+ | ====== electricity meters ====== | ||
+ | |||
+ | For the spark abacus I am using several electricity meters. | ||
+ | This just evolved over time as I wanted to try different technologies, | ||
+ | |||
+ | ===== peacefair PZEM-004T ===== | ||
+ | |||
+ | The [[https:// | ||
+ | |||
+ | {{: | ||
+ | {{: | ||
+ | {{: | ||
+ | |||
+ | Connect mains electricity (AC) and the current sensing coil (put around the wire going to the load to monitor) and this electricity meter will measure voltage, current, power (active), and energy used by the load to monitor. | ||
+ | The energy value is saved (in EEPROM) and can be reset using the button (on the board). | ||
+ | |||
+ | The device also offers a serial port (isolated from mains electricity using optocouplers) so to be able to read out the measured values. | ||
+ | The serial protocol is the same as for the [[spark_counter# | ||
+ | |||
+ | Compared to the [[spark_counter# | ||
+ | Else it uses the same design and chip. | ||
+ | |||
+ | ===== DDM100TC ===== | ||
+ | |||
+ | The [[http:// | ||
+ | |||
+ | {{: | ||
+ | {{: | ||
+ | |||
+ | 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/ | ||
+ | |||
+ | {{: | ||
+ | {{: | ||
+ | {{: | ||
+ | {{: | ||
+ | |||
+ | There is also the DDM100TCR model with an RS-485 interface, but I couldn' | ||
====== EPS8266 ====== | ====== EPS8266 ====== | ||
- | To send the values I used a WiFi module based on the [[http:// | + | To send the values |
Several [[http:// | Several [[http:// | ||
- | Since I only use it' | + | Since I only use its WiFi functionality, |
===== ESP-01 ===== | ===== ESP-01 ===== | ||
Line 13: | Line 62: | ||
{{ : | {{ : | ||
- | To use the device, simply connect | + | To use the device, simply connect GND, VCC (3.3V), RX (module input), TX (module output), RST (using a pull-up resistor), and CH_PD (using a pull-up resistor). |
===== AT firmware ===== | ===== AT firmware ===== | ||
My module showed the following firmware information when powered up (with 9600 8N1 serial configuration): | My module showed the following firmware information when powered up (with 9600 8N1 serial configuration): | ||
- | When using the '' | + | When using the '' |
- | This custom firmware wasn't particularly stable, so I decided to use a more recent standard one. | + | This custom firmware wasn't particularly stable, so I decided to use a more recent, and standard one. |
To flash a firmware you have to enter the bootloader mode by connecting GPIO0 to ground. | To flash a firmware you have to enter the bootloader mode by connecting GPIO0 to ground. | ||
Line 25: | Line 74: | ||
I used [[https:// | I used [[https:// | ||
- | Espressif | + | Espressif |
Since I only want to use this module for its WiFi connectivity I only care about the AT firmware. | Since I only want to use this module for its WiFi connectivity I only care about the AT firmware. | ||
- | The AT firmware allows to use the ESP over serial | + | The AT firmware allows to control |
- | This firmware is provided in the NONOS SDKs (V2.0.0 | + | This firmware is provided in the NONOS SDKs (V2.0.0 |
The module I had uses a 25Q40 flash chip with only 4Mbits/ | The module I had uses a 25Q40 flash chip with only 4Mbits/ | ||
Line 76: | Line 125: | ||
====== Orange Pi ====== | ====== Orange Pi ====== | ||
+ | |||
+ | {{: | ||
+ | {{: | ||
+ | {{: | ||
The [[http:// | The [[http:// | ||
Line 85: | Line 138: | ||
* [[http:// | * [[http:// | ||
* various [[http:// | * various [[http:// | ||
- | Since I'll only use it as server I decided to go with debian jessie | + | Since I'll only use it as server I decided to go with an [[https:// |
The pin header is the same as the [[http:// | The pin header is the same as the [[http:// | ||
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. |
spark_abacus.txt · Last modified: 2024/01/07 17:49 by 127.0.0.1