Smart Home Automation Forum
KC868-A8 uart port for PZEM-0004T - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=20)
+--- Forum: KC868-A8 (https://www.kincony.com/forum/forumdisplay.php?fid=23)
+--- Thread: KC868-A8 uart port for PZEM-0004T (/showthread.php?tid=2958)



KC868-A8 uart port for PZEM-0004T - allbeq - 05-31-2023

First, hello All!
I succesfully run my ESPHome project and used almost all available pins on topic board. 
I would like also use IR rx and tx pins for uart port for PZEM 004T sensor which works perfectly on my previous esp32 node..
here is piece of code Im trying to use:

Code:
uart:
  tx_pin: 2
  rx_pin: 15
  baud_rate: 9600

modbus:
#i2c temps and pzem
sensor:
  - platform: pzemac
    current:
      name: "PZEM-004T Prąd"
    voltage:
      name: "PZEM-004T Napiecie"
    power:
      name: "PZEM-004T Moc"
    energy:
      name: "PZEM-004T Energia"
    frequency:
      name: "PZEM-004T V3 Frequency"
    power_factor:
      name: "PZEM-004T V3 Power Factor"
    update_interval: 60s

I have use also GND and vcc 5V from IR pins but it does not work - is it ok to run uart on these pins? 15 and 2 ?

Regards


RE: KC868-A8 uart port for PZEM-0004T - admin - 06-01-2023

which board model you are using? A8 not have IR.


RE: KC868-A8 uart port for PZEM-0004T - allbeq - 06-01-2023

Yes, it's A8.
Sorry, I meant RF 433 module pins 15 and 2, it's described as 433M R and 433M T
Can I use them as uart pins?


RE: KC868-A8 uart port for PZEM-0004T - admin - 06-01-2023

433T can use, 433R can't use.
another Pin, you can try to test with S1 or S2 (that's for DS18B20), just GPIO14 or GPIO13


RE: KC868-A8 uart port for PZEM-0004T - allbeq - 06-01-2023

Hmm ok so 433T as rx could be..
Im using all pins except 15,2 and analog inputs.
Im using temp3 and temp4 as inputs so maybe could I move them to analog input and use temp3 and/or temp4 (36,39) as uart tx? Smile


RE: KC868-A8 uart port for PZEM-0004T - admin - 06-01-2023

[Image: KC868-A8-1_03.jpg]

Only S1,S2 of digital input port can use for IO, S3,S3 only use for I
IO=input and output
I=input


RE: KC868-A8 uart port for PZEM-0004T - allbeq - 06-01-2023

Thanks a lot, works with
uart:
tx_pin: 13
rx_pin: 2
baud_rate: 9600


RE: KC868-A8 uart port for PZEM-0004T - admin - 06-02-2023

ok, good.