Connecting a PeaceFair Pzem-004T to an Espressif ESP8266


#5

A few more details regarding the PCB for connecting a WeMos D1 Mini to your Peacefair Pzem-004T. The PCB we use was designed as a generic board for various WeMos D1 Mini projects and therefore not all connections are used with the ESPproMon, so currently JP5 for example is not used. Partly because we don’t really like soldering but also to make it easy to swap parts in and out we don’t solder most of the components directly to the PCB. We expect you to populate the board with 3 and 8 way female headers and 3 way block terminals. If you prefer to solder the components directly to the board that is your choice.
Peacefair Pzem-004T TTL connections
The 4 way cable that connects from the TTL port on the Pzem to the ESP, marked A, B, C and D in the image above is not using the markings on the cable to indicate which pins it connects to on the ESP. For example the cable with the “+” markings is purely an identifier on the cable and doesn’t relate to the positive (3V3 or 5V) on the ESP. The actual connections are as follows:

  • A = Pzem GND -----> ESP GND
  • B = Pzem VDD -----> ESP 5V
  • C = Pzem RX -------> ESP D7
  • D = Pzem TX -------> ESP D6

In the next post we will provide details for the DS18B20 temperature sensor and the RF transmitter etc.


#6

We use these kind of DS18B20’s and they plug straight into a 3 pin female header on the left hand side of the PCB (marked JP1 on the board but not visible in the photo). Marked as GND, D5 and 3V3 in the photo. The sensor faces outwards from the PCB rather than across the PCB.

ESPproMon DS18B20 and RF Transmitter

There is only one resistor needed on the PCB. R1 is 510 Ohms and is used with the RF transmitter at JP2 in the photo. The RF transmitters are almost always sold as transmitter / receiver pairs and should cost you less than $1.

Again the component faces outwards from the PCB rather than across it and shown as GND, 5V, R1 on the photo. The RF transmitter will work at 3V but you will get better range at 5V. R1 connects to D0 on the PCB (or your WeMos if you are not using the PCB).

If you have any questions about any of the connections please post them here.


#7

If I’m correct these are the right connections :slight_smile:


#8

Yes @Tony they are correct but remember the markings you have on the last image are the connections ON THE PZEM, not the connections you are making to the ESP. The importance of this is simply that the RX and TX are crossed over to the ESP i.e. Pzem RX to ESP TX (D7 GPIO 13) and users choice of putting a voltage divider or not between Pzem TX and ESP RX (D6 GPIO 12).

Are they Peacefair Pzem-004T images from the internet or do you actually have the Pzem with you? I thought you only ordered yours about a week ago?

As an aside is your computer set for English or your native language?


#9

Correct RX/TX crossed. Yes it’s mine … I just received it. Now waiting for your Pcb :slight_smile:

English is indeed set as my native language on my Pc, Why ?


#10

For a few dollars more you could have had the Pzem with the case and LED display. Easier to fit in the consumer unit and an extra point of presentation for the data.

The first Pzem I bought was actually without the case and LED display but then I bought two further full units. Unfortunately you can’t but the case and LED separately.

I’m looking for someone that doesn’t use English on their computer to test out our multilingual facility as per this.


#11

Quick question … does the PZEM provide power to the Wemos D1 via the 5V/GND on the PZEM ?


#12

No it’s the other way round. The ESP is providing power to the TTL port of the Pzem.


#13

“This” shows me Chinese and Taiwanese characters ?


#14

So indeed the Wemos D1 also needs power via it’s USB port for example …


#15

Yes but if you click the globe icon it will translate the post to English or whatever language your computer is using.


#16

Will check this …


#17

That’s correct.


#18

Ok … I have everything hooked up in a test setup. When I start the ESPproMon App it keeps telling me “EspproMon” is offline. I can see that the device is connected to my AP. Is yjis because my license isn’t activated yet (which I will do right now)


#20

I have received your registration details thanks @Tony
Please confirm the following:

You scanned the required QR image.
You created an account on our cloud based server.


#21

Hmmm … I have the App up and running and yes I scanned the QR code. What server are you referring too ? I registered on emocms.org


#22

Nothing to do with EmonCMS.org that comes much later in the setup.

Account creation on our server and provisioning your ESP with our server is covered at Provisioning your ESP8266 with our server

Take a look at this and let us know how it goes.


#23

Logged in indeed … Next step I am asked to chose my Wifi network but only shows one of my SSID’s … not able to selmect another one unless I type it in manually …


#24

I’m intrigued as to why you didn’t see the account creation screens.

Can you post a screenshot of your phone and then we can go through a reset etc.


#25

Guide is unclear in py opinion … We need a clear step by step guide. I did get tyhe login when I was testing a week or so ago … my mistake. So yes, I am logged in now but see message above oin selecting the WIFI network to connect to.