From f5d7287136b03325de5b8afadfb78ccb5dbcc3d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Sun, 22 Jan 2017 15:39:48 +0100 Subject: [PATCH] document DDM100TC connection --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index aba8ef4..82e84cd 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,24 @@ RTC The onboard Real Time Clock (RTC) is used to track the uptime a periodically start querying all electricity meter for their measurement value. The time interval between the periodic queries is hard coded in `main.c`. +By connecting a (coin cell) battery to VBAT the RTC keeps running, even if the board is not powered anymore. + +DDM100TC +-------- + +This 3-phase 4-wire electricity meter provides an S0 interface. + +On my model this would output 1600 impulse/kWh, thus each impulse corresponds to a power consumption of 0.625 Wh). +To record these impulses a timer input capture is used. +The number of impulses determines the energy used. +It is stored in a backup register, keeping the value in memory even when the board is powered down as long as a (coin cell) battery is connected to VBAT. +The interval between impulses allow to calculate the current power consumption. +The time has a resolution of 0.91 ms (leading to a power calculation error of <1%). + +Connections DDM100TC <-> board: + +- S0+, pin 8; +3.3V or +5V +- S0-, pin 7; TIM4_CH1, PB6 (use pull-down resistor) ESP8266 -------