Dutch Smart meter P1 port -> pcb design

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
romix
Normal user
Posts: 16
Joined: 30 Dec 2015, 17:52

Dutch Smart meter P1 port -> pcb design

#1 Post by romix » 30 Dec 2015, 17:59

Hi, Based on Zenit's post on the Domoticz forum (22 Nov 2015, https://www.domoticz.com/forum/viewtopi ... 5&start=40) on how to connect a Dutch Smart Meter P1 port to an ESP8266 to be used with Domoticz, I decided to design a pcb for the interface. Given that the ESP8266-7/12 have multiple IO ports, I decided to break them out and include headers for an I2C Oled display as well (and a DS18b20 while I'm at it).

The initial design can be found here https://123d.circuits.io/circuits/14157 ... p8266-7-12

After testing and improving the pcb, I will have a batch manufactured at Elecfreaks.com. I would appreciate suggestions for the pcb design (features, etc).

buitermark
Normal user
Posts: 10
Joined: 28 Oct 2015, 16:41
Location: Rhenen

Re: Dutch Smart meter P1 port -> pcb design

#2 Post by buitermark » 30 Dec 2015, 22:40

Hi Romix.

Great PCB!
I'll watch your progress, and definitely want one when it becomes available!
Although at the moment my meter only supports an IR-Reading head.

So if i was able to design such a PCB my self, i'd make sure it could also 'embed' most of the parts of the IR-reading head (IEC 62056-21) and create an connector for seperating the IR/LED of the interface so these parts could be easily connected.

Found a bit of info about the electronics for such an IR reading head here http://developer.mysmartgrid.de/doku.php?id=optoreader and here https://gonium.net/blog/2010/10/24/smar ... t--libehz/

Any chance of implementing such a option on your PCB ??

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Dutch Smart meter P1 port -> pcb design

#3 Post by BertB » 31 Dec 2015, 11:36

Nice design, but is it okay to make some remarks?
I wonder why you use a high speed signal diode 1n4148. It has an If of max 300 mA and a Vf of 1 volt at 10 mA.
When the wiring between adapter and regulator is long, you might also want use a 47 uF electrolytic capacitor parallel to C1 to suppress fluctuations due to ohmic resistance.
What happens during boot-up? I see that you have a pull up between GPIO-15 and VCC. At boot-up GPIO-15 should be kept low.

What is the purpose of J1, J2 and Jrj-11?

romix
Normal user
Posts: 16
Joined: 30 Dec 2015, 17:52

Re: Dutch Smart meter P1 port -> pcb design

#4 Post by romix » 31 Dec 2015, 12:40

Hi Bert, thanks for the comments.
I am a bit rusty with circuits.io (123Dcircuits.io, nowadays) and the board and its components are flawed.

The diode is supposed to provide polarity protection (I was thinking using a 1N4001).
The RJ-11 is meant for a standard phone cable (RJ-11 connectors) to link the P1 port with the board.
J1 is the programming jumper (pulls GPIO00 low) J2 is an FTDI header (non standard pinout though)

GPIO15 is tied to ground.

I have changed my mind about the design. Came across the WeMos D1 mini boards. Those make life a lot easier. Will do a new design. Work in progress....

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Dutch Smart meter P1 port -> pcb design

#5 Post by BertB » 31 Dec 2015, 12:55

Okay.
I thought to see a connection from J1 to GPIO-02, hence the remark.
Just to be sure, a diode could have 1 volt across it, leaving only 0,7 volt for the regulator to play with, when your power supply is 5 Volts.

I am looking forward to your progress. I still have an old meter, but sooner or later the smart meter is entering my house as well.

Have a happy new year.

romix
Normal user
Posts: 16
Joined: 30 Dec 2015, 17:52

Re: Dutch Smart meter P1 port -> pcb design

#6 Post by romix » 04 Jan 2016, 16:33

Hi all, an update.

As mentioned I changed plans and have opted for piggybacking on a Wemos D1 mini board. I have also incorporated 2 metering options. The first one is reading the P! port, the second is pulse counting the blinking LED. I have combined two circuits found online for both options. Probably they can be merged, but this is more of a quick hack. Also, I could not resist adding a header for an I2C OLED display (does not make any sense if the thing is mounted in a closet), but I had some space to spare on the tiny board. I have opted for thru hole components instead of SMD components making assembling the board easier (and components easier to get).

The new design is here: https://123d.circuits.io/circuits/14177 ... ort-shield

This is what the pcb looks like:
PCB
PCB
Schermafbeelding 2016-01-04 om 16.30.37.png (98.4 KiB) Viewed 18653 times
The circuit (sans the BPW92 photo diode):

I will do another round of checks and then order a batch of the boards for testing.

As always, comments and suggestions are more than welcome.

romix
Normal user
Posts: 16
Joined: 30 Dec 2015, 17:52

Re: Dutch Smart meter P1 port -> pcb design

#7 Post by romix » 04 Jan 2016, 16:34

forgot to include the actual circuit
Attachments
circuit
circuit
Schermafbeelding 2016-01-04 om 16.31.10.png (91.78 KiB) Viewed 18653 times

snoopy86
New user
Posts: 1
Joined: 09 Jan 2016, 20:16

Re: Dutch Smart meter P1 port -> pcb design

#8 Post by snoopy86 » 09 Jan 2016, 20:20

Hi, do you have code available to test this? I first had in mind to use UNO + ESP8266 but i think it could be done just with ESP.

the cosmic gate
Normal user
Posts: 102
Joined: 14 Nov 2015, 20:17

Re: Dutch Smart meter P1 port -> pcb design

#9 Post by the cosmic gate » 03 Sep 2016, 14:42

romix wrote:Hi all, an update.

As mentioned I changed plans and have opted for piggybacking on a Wemos D1 mini board. I have also incorporated 2 metering options. The first one is reading the P! port, the second is pulse counting the blinking LED. I have combined two circuits found online for both options. Probably they can be merged, but this is more of a quick hack. Also, I could not resist adding a header for an I2C OLED display (does not make any sense if the thing is mounted in a closet), but I had some space to spare on the tiny board. I have opted for thru hole components instead of SMD components making assembling the board easier (and components easier to get).

The new design is here: https://123d.circuits.io/circuits/14177 ... ort-shield

This is what the pcb looks like:
Schermafbeelding 2016-01-04 om 16.30.37.png

The circuit (sans the BPW92 photo diode):

I will do another round of checks and then order a batch of the boards for testing.

As always, comments and suggestions are more than welcome.
Is there a possibility to get one of these pcb 's ?

romix
Normal user
Posts: 16
Joined: 30 Dec 2015, 17:52

Re: Dutch Smart meter P1 port -> pcb design

#10 Post by romix » 04 Sep 2016, 11:02

The PCB, actually a complete unit consisting of the PCB and a Wemos D1 mini, are available at http://romix.macuser.nl

the cosmic gate
Normal user
Posts: 102
Joined: 14 Nov 2015, 20:17

Re: Dutch Smart meter P1 port -> pcb design

#11 Post by the cosmic gate » 16 May 2017, 22:07

romix wrote: 04 Sep 2016, 11:02 The PCB, actually a complete unit consisting of the PCB and a Wemos D1 mini, are available at http://romix.macuser.nl
I'am looking for the shield only, this because a already confgured/used a Wemos with P0 connected . And i want to use the same WeMos for this.
So is it possoble to buy just this P1 shield ?

Domosapiens
Normal user
Posts: 307
Joined: 06 Nov 2016, 13:45

Re: Dutch Smart meter P1 port -> pcb design

#12 Post by Domosapiens » 13 Nov 2017, 23:11

@romix
Is there a way to display Gas and Electrical readings on the OLED?
Thanks for informing me.
Domosapiens
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.

romix
Normal user
Posts: 16
Joined: 30 Dec 2015, 17:52

Re: Dutch Smart meter P1 port -> pcb design

#13 Post by romix » 14 Nov 2017, 08:33

Hi, that should not be too difficult to achieve. I do have a version of the firmware that shows the current electricity and gas usage in the LOG on the Espeasy webinterface (therefore also making the device Domoticz independent). These values can easily be piped to a connected Oled. Contact me through esp8266thingies.nl if you are interested. I can off course share the firmware. Actually, I should update the firmware on the repository, but don't have time to clean up the code at present.

Romix

Domosapiens
Normal user
Posts: 307
Joined: 06 Nov 2016, 13:45

Re: Dutch Smart meter P1 port -> pcb design

#14 Post by Domosapiens » 14 Nov 2017, 10:44

Thanks for the info.

Some remarks:
- The P1 Wifi Gateway is incorporated in the main branch of ESP Easy
- I prefer to stay on the main branch of ESP Easy for maintenance reasons
Hope you can find some time to maintain your module

Some observations:
- If I set the Web log level to 4, Domoticz reacts with P1_SmartMeter hardware thread seems to have ended unexpectly
- Looking at the Web log at level 4 I see CRC errors
- If I set the Web log level to 2, Domoticz reacts sometimes with P1_SmartMeter hardware thread seems to have ended unexpectly
- Looking at the Web log at level 2 no CRC errors are shown
- Load report/minute shows around 20% on Wemos D1 mini where the P1 is the only device
It seems that opening a Web log window, slows-down/locks the responsiveness towards Domoticz??

Is this related to: Fix p1 wifi gateway module ?
https://github.com/letscontrolit/ESPEasy/pull/587

Thanks for your help
Domosapiens
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.

romix
Normal user
Posts: 16
Joined: 30 Dec 2015, 17:52

Re: Dutch Smart meter P1 port -> pcb design

#15 Post by romix » 14 Nov 2017, 12:47

Thanks for your feedback.

I have recently seen that the P1-wifi gateway plug-in is now incorporated in the main branch. However, I have further worked on the plug-in after I had submitted the plug-in to the experimental repository. Keeping things in sync turned out to be hard. I will compare the code in the main branch with what I currently deliver with the hardware and get things in sync again.

Domosapiens
Normal user
Posts: 307
Joined: 06 Nov 2016, 13:45

Re: Dutch Smart meter P1 port -> pcb design

#16 Post by Domosapiens » 14 Nov 2017, 18:12

Great Romix!
Do you support the pull request?
Thanks
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.

Post Reply

Who is online

Users browsing this forum: No registered users and 46 guests