grodansparadis / vscp-p1-pulse-interface

P1 interface for smart meters to computer
MIT License
5 stars 0 forks source link

ESP32 and vscp-p1-pulse-interface #1

Closed kirilldem closed 1 year ago

kirilldem commented 1 year ago

Hello,

I wonder if you can help me to connect your P1 port reader to the Omnia e-meter and lilygo T8 C3 ESP32 board.

unnamed

I looked at the GitHub instructions and still not sure how it should be connected, maybe you can share your thoughts on my reasoning below:

1 +5V - 5V on the ESP32 Board 2 +3.3V or 5V - Not connecting? 3 +3.3V or 5V - Not connecting? 4 Not Connected 5 RX (Received data TTL level) - GPIO09 as per my software (AMS2MQTT) 6 GND - GND

grodansparadis commented 1 year ago

I responded to your mail wit this answere. Is it unclear? If so please aks again.

If you connect the card to the meter and install jumper J3 you will have +5V to power to the EPS32 board on pin 1 of the interface. But as the ESP32 inputs are 3V you need to connect 3.3V to one of pin2/3 or both. Now connect pin 5 to your rx and connect ground together.

ESP32 - Interface

+5V - pin 1 +3.3V - pin 2/3 GND - pin 6 RX - pin 5

Baudrate 115200. Non inverting.

You have 250 mA you can use form the +5V on the meter. Wifi can give peaks that are above this so a large capacitor 1000uF or bigger on +5V is good. You can power the ESP32 module externally of course and then leave the J3 open and do not connect +5V to pin 1.

kirilldem commented 1 year ago

Thanks for the response - I did not receive your response, just checked my spam and nothing there either - so I thought perhaps github is a better place to ask :)

The explanation makes sense, except J3 jumper, do you mean these?

image

Should I put one of these on the J3 jumper?

image

grodansparadis commented 1 year ago

Strange that you did not recveive it. It was sen 16:41 the same day you wrote. Anyway Github is better in case someone else have the same questions

Put in the jumper if you intend to power everything from the meter. Then you will get +5V on pin 1. If it's there all positions marked +5V will be connected together. If you intend to power your board from USB or by other means don't put the jumper in. Connect +5V instead to pin 1.

kirilldem commented 1 year ago

Hi again, thanks for the clarification and sorry for the delay in getting back to you. I am still trying to figure this out.

I intend to power the board from the meter, I checked with the multi meter and I get 5v on pin 1 with the jumper (good that I also got the serial connector from you as that one had one spare :) ) I get no voltage on pin 2 and 3 - I guess this is expected.

So here is my revision of it should all be connected:

image

Just not sure why 5V from pin 1 doesnt go to 5V on the ESP board and if I need pins 2 and 3 connected to the ESP board at all.

I'm quite new to this, so excuse me for maybe stupid questions :)

grodansparadis commented 1 year ago

With the jumper installed

Pin 1 - should go to +5V on the ESP board! Connecting it to 3.3V will probably burn the ESP board. Pin 6 - GND should go to GND (any) on the ESP board. Pin 2/3 - One of 2/3 should go to +3.3V on the ESP32 board. Pin 5 - Should go to the RX input. Looks like this is GPIO20 on your board from the picture.

kirilldem commented 1 year ago

With the jumper installed

Pin 1 - should go to +5V on the ESP board! Connecting it to 3.3V will probably burn the ESP board. Pin 6 - GND should go to GND (any) on the ESP board. Pin 2/3 - One of 2/3 should go to +3.3V on the ESP32 board. Pin 5 - Should go to the RX input. Looks like this is GPIO20 on your board from the picture.

That has worked, thank you so much for your advice and patience.

grodansparadis commented 1 year ago

No problem, happy to help.