Skip to content

Commit ab9e8f2

Browse files
Added a README.md.
1 parent c6e4bf3 commit ab9e8f2

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# smartMeterLogger-esp32
2+
3+
## About
4+
5+
`smartMeterLogger-esp32` connects to a smart meter (slimme meter) and logs the electricity use per minute to an sdcard.
6+
7+
![screenshot](img/screenshot.png)
8+
9+
![screenshot](img/screenshot_android.png)
10+
11+
## How to use
12+
13+
1. Change your credentials in `wifisetup.h`.
14+
1. (Optional) In `smartMeterLogger-esp32.ino` uncomment `#define SH1106_OLED` if you compile for sh1106 instead of ssd1306 and set the i2c pins (and address) for your oled screen.
15+
3. Save all files and flash the sketch to your esp32.
16+
4. Connect your esp32 to the smart meter. [See here how](https://github.com/matthijskooijman/arduino-dsmr#connecting-the-p1-port).<br>Take note that to connect to the esp32 the `DATA` signal has to be inverted and level shifted.
17+
5. If you added a ssd1306/sh1106 oled screen, the ip address will be visible on the screen.<br>If there is no oled you can check the ip address on the serial port in the Arduino IDE.
18+
6. Browse to the ip address of your esp32 to see your current energy use.
19+
20+
If you have a garbled screen you most likely compiled for the wrong oled type.<br>Try to comment/uncomment `#define SH1106_OLED` to solve this.
21+
22+
## Needed libraries
23+
24+
- [https://github.com/me-no-dev/AsyncTCP](https://github.com/me-no-dev/AsyncTCP)
25+
- [https://github.com/me-no-dev/ESPAsyncWebServer](https://github.com/me-no-dev/ESPAsyncWebServer)
26+
- [https://github.com/matthijskooijman/arduino-dsmr](https://github.com/matthijskooijman/arduino-dsmr)
27+
28+
Download and install these in the Arduino libraries folder.
29+
30+
The driver library for a ssd1306/sh1106 oled can be installed with the Arduino library manager. Use the ThingPulse driver.
31+
32+
## DSMR v5 P1 port standard specifications
33+
34+
[DSMR v5.0.2 P1 Companion Standard.pdf](https://github.com/matthijskooijman/arduino-dsmr/blob/master/specs/DSMR%20v5.0.2%20P1%20Companion%20Standard.pdf)
35+
36+
## Hardware
37+
38+
### ESP32: LilyGo TTGO T7 with external antenna
39+
40+
My personal preference is for the LilyGo TTGO T7. The LilyGo TTGO T7 is a good board with an external antenna connector and a decent 3.3v LDO. Without an external antenna the WiFi signal tends to be too poor to be of any use over longer distances and/or through several walls. The board will have to modified slightly to enable the external antenna.
41+
42+
![T7 pic](img/t7.jpg)
43+
44+
Below you can see how to enable the external antenna. Move the zero ohm resistor from position 1-2 to position 3-4. Or remove the resistor and solder position 3-4 closed.
45+
46+
![external-config](https://user-images.githubusercontent.com/17033305/78676790-34fd1080-78e7-11ea-8bb0-aee88efe75a6.jpg)
47+
48+
See [this LilyGo issue](https://github.com/LilyGO/ESP32-MINI-32-V1.3/issues/4#issuecomment-610394847) about the external antenna.
49+
50+
### Level shifter / inverter
51+
52+
To invert and level shift the signal you can use a bc547 transistor with some resistors. For example like this:
53+
54+
![invert-and-level-shift](https://willem.aandewiel.nl/wp-content/uploads/2019/04/DSMR_LevelShifter_Circuit-300x251.png)
55+
56+
See [willem.aandewiel.nl/dsmr-logger-v4-slimme-meter-uitlezer/](https://willem.aandewiel.nl/index.php/2019/04/09/dsmr-logger-v4-slimme-meter-uitlezer/)
57+
58+
### Some board variants
59+
60+
![board no oled](img/board_no_oled.png)
61+
62+
![board sh1106](img/board_sh1106.png)
63+
64+
![board ssd1306](img/board_ssd1306.png)

0 commit comments

Comments
 (0)