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 [2015/12/08 16:27] – [Orange Pi] kingkevinspark_counter [2016/02/21 10:40] – add warning kingkevin
Line 12: Line 12:
  
 {{:spark_counter:dsc02371.jpg?0x300|complete spark counter}} {{:spark_counter:dsc02371.jpg?0x300|complete spark counter}}
 +
 +**warning: the electricity meter I am presenting will only work for 1 phase 2 wires power distribution systems. I have a 3 phases 4 wires system and I am doing it wrong.**
  
 ====== peacefair PZEM-004 ====== ====== peacefair PZEM-004 ======
Line 37: Line 39:
 The meter also provides a UART port to query the measured values. The meter also provides a UART port 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.
 +
 +^ UART ^ PZEM-004 ^ note ^
 +| 5V | VDD | 3.3V is not enough |
 +| TX | RX | the UART pin needs to be able to sink ~4 mA |
 +| RX | TX | the UART pin needs to be idle high |
 +| GND | GND | |
 +
 +I used a CP2102 based USB to UART converter.
 +CH340 based USB to UART converters will not work (it seems to not be able to sink enough current).
 +And when using the Arduino you should not use the USB port (for serial), since that interferes with the UART signals.
  
 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.
Line 152: Line 164:
 Also only Android supports the video hardware acceleration currently. Also only Android supports the video hardware acceleration currently.
 The official [[http://www.orangepi.org/downloadresources/|images]] are quite old (e.g. Android 4.2.2), but there are a bit newer images made available by the community: The official [[http://www.orangepi.org/downloadresources/|images]] are quite old (e.g. Android 4.2.2), but there are a bit newer images made available by the community:
-  * such as [[http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=755|Android]], with weird [[http://www.orangepi.org/Docs/SDcardinstallation.html#Install_Android_OS_image|installation process]]+  * [[http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=755|Android]] (often ROMs from other Allwinner based products), with weird [[http://www.orangepi.org/Docs/SDcardinstallation.html#Install_Android_OS_image|installation process]]
   * various [[http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=342|linux]] distributions   * various [[http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=342|linux]] distributions
 Since I'll only use it as server I decided to go with debian jessie minimal. Since I'll only use it as server I decided to go with debian jessie minimal.
  
 The pin header is the same as the [[http://www.raspberry-projects.com/pi/pi-hardware/raspberry-pi-2-model-b/rpi2-model-b-io-pins|40-pin Raspberry Pi]]. The pin header is the same as the [[http://www.raspberry-projects.com/pi/pi-hardware/raspberry-pi-2-model-b/rpi2-model-b-io-pins|40-pin Raspberry Pi]].
 +The SPI port to connect the nRF24L01 is also available over ''/dev/spi''.
 +But else this board is not really worth spending time on.
 +
 +Also don't forget to put a heat sink on the CPU, else they will be slowed down quite often because of the high temperatures.
spark_counter.txt · Last modified: 2024/01/07 17:49 by 127.0.0.1