CuVoodoo

the sorcery of copper

User Tools

Site Tools


spark_counter

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
spark_counter [2016/09/30 17:29] – update links kingkevinspark_counter [2016/10/01 10:01] – [peacefair PZEM-004] connector kingkevin
Line 37: Line 37:
 {{:spark_counter:dsc02328.jpg?0x200|PZEM-004 opto-couplers}} {{:spark_counter:dsc02328.jpg?0x200|PZEM-004 opto-couplers}}
  
-The meter also provides a UART port to query the measured values.+The meter also provides a UART port (using an XH-4P connector) to query the measured values.
 Two opto-couplers isolate the main power meter circuits from the TX and RX UART ports. Two opto-couplers isolate the main power meter circuits from the TX and RX UART ports.
  
Line 52: Line 52:
 The {{:spark_counter:pzem-004.rtf|manual}} provides the corresponding commands, but lacks some information. The {{:spark_counter:pzem-004.rtf|manual}} provides the corresponding commands, but lacks some information.
 The UART configurations is 9600 bps 8N1. The UART configurations is 9600 bps 8N1.
-Before querying the measurements, you have to set an address to the device+All commands include a device address (i.e. C0 A8 01 01 = 192.168.1.1). 
-Else it won't reply to the other commands+Only the device with the specified address will respond. 
-The manual uses an IP as address (192.168.1.1 = C0 A8 01 01)+This allows to query multiple devices on the same UART portone after another, when they have different addresses. 
-No idea why you would set an IP for a UART address.+Thus you have to set the device's address at least once using the 0xA4 command before querying measurements
 +This address will be saved so the next time (even after power down) you can directly query measurements using the address(se) set in the device(s).
  
 The commands use the following 7 bytes message format: The commands use the following 7 bytes message format:
spark_counter.txt · Last modified: 2024/01/07 17:49 by 127.0.0.1