Page 1 of 1

Dutch Smart meter P1 port -> pcb design

Posted: 30 Dec 2015, 17:59
by romix
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).

Re: Dutch Smart meter P1 port -> pcb design

Posted: 30 Dec 2015, 22:40
by buitermark
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 ??

Re: Dutch Smart meter P1 port -> pcb design

Posted: 31 Dec 2015, 11:36
by BertB
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?

Re: Dutch Smart meter P1 port -> pcb design

Posted: 31 Dec 2015, 12:40
by romix
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....

Re: Dutch Smart meter P1 port -> pcb design

Posted: 31 Dec 2015, 12:55
by BertB
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.

Re: Dutch Smart meter P1 port -> pcb design

Posted: 04 Jan 2016, 16:33
by romix
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 19476 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.

Re: Dutch Smart meter P1 port -> pcb design

Posted: 04 Jan 2016, 16:34
by romix
forgot to include the actual circuit

Re: Dutch Smart meter P1 port -> pcb design

Posted: 09 Jan 2016, 20:20
by snoopy86
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.

Re: Dutch Smart meter P1 port -> pcb design

Posted: 03 Sep 2016, 14:42
by the cosmic gate
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 ?

Re: Dutch Smart meter P1 port -> pcb design

Posted: 04 Sep 2016, 11:02
by romix
The PCB, actually a complete unit consisting of the PCB and a Wemos D1 mini, are available at http://romix.macuser.nl

Re: Dutch Smart meter P1 port -> pcb design

Posted: 16 May 2017, 22:07
by the cosmic gate
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 ?

Re: Dutch Smart meter P1 port -> pcb design

Posted: 13 Nov 2017, 23:11
by Domosapiens
@romix
Is there a way to display Gas and Electrical readings on the OLED?
Thanks for informing me.
Domosapiens

Re: Dutch Smart meter P1 port -> pcb design

Posted: 14 Nov 2017, 08:33
by romix
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

Re: Dutch Smart meter P1 port -> pcb design

Posted: 14 Nov 2017, 10:44
by Domosapiens
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

Re: Dutch Smart meter P1 port -> pcb design

Posted: 14 Nov 2017, 12:47
by romix
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.

Re: Dutch Smart meter P1 port -> pcb design

Posted: 14 Nov 2017, 18:12
by Domosapiens
Great Romix!
Do you support the pull request?
Thanks