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 revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
spark_counter [2016/10/04 23:23]
kingkevin [Orange Pi] moved to spark abacus
spark_counter [2017/01/23 18:07]
kingkevin [peacefair PZEM-004] better pictures
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.
-All commands include a device address (i.e. C0 A8 01 01 = 192.168.1.1). +You have to set the device'​s ​address (i.e. C0 A8 01 01 = 192.168.1.1 ​in the examples) ​at least once using the 0xB4 command before querying measurements. 
-Only the device with the specified address will respond. +This address will be saved so the next time (even after power down) you can directly query measurements using the address(es) set in the device(s)
-This allows to query multiple devices on the same UART port, one after another, when they have different addresses. +All commands include the target device address and only the device with the specified address will respond, except for the command setting the address in the first place. 
-Thus you have to set the device'​s address ​at least once using the 0xA4 command before querying measurements. +This allows to query multiple devices connected to the same UART port, one after another, when they have different addresses. 
-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).+Note: the optocouplers on the Tx pin of the device have a pull-up resistor. Be sure to remove all but one when using multiple devices, else the low value of the signal will be too high for the receiver to decode the serial communication.
  
 The commands use the following 7 bytes message format: The commands use the following 7 bytes message format:
Line 80: Line 80:
 I removed the pizeo-element to prevent this annoying sound. I removed the pizeo-element to prevent this annoying sound.
  
-{{:​spark_counter:​dsc02344.jpg?​0x200|PZEM-004 board front}} +{{:​spark_counter:​pzem-004-01.jpg?​0x200|PZEM-004 board front}} 
-{{:​spark_counter:​dsc02325.jpg?​0x200|PZEM-004 board back}} +{{:​spark_counter:​pzem-004-02.jpg?​0x200|PZEM-004 board back (without buzzer)}}
-{{:​spark_counter:​dsc02327.jpg?​0x200|PZEM-004 board IC}}+
  
 The power meter uses a single chip solution, the [[http://​www.sdicmicro.com/​products.html?​ic=SD3004|SDIC microelectronics SD3004]] ({{:​spark_counter:​sd3004_datasheet_v0.2c.pdf|datasheet}}). The power meter uses a single chip solution, the [[http://​www.sdicmicro.com/​products.html?​ic=SD3004|SDIC microelectronics SD3004]] ({{:​spark_counter:​sd3004_datasheet_v0.2c.pdf|datasheet}}).
spark_counter.txt · Last modified: 2017/02/03 16:34 by kingkevin