add project and pinout description
This commit is contained in:
parent
3d38b0eaea
commit
8b98987d1d
44
README.md
44
README.md
|
@ -1,3 +1,17 @@
|
|||
the spark counter is a custom electricity meter with wireless data logging capability.
|
||||
|
||||
on one side I have:
|
||||
* peacefair PZEM-004 power meter to measure the electricity consumption
|
||||
* ATmega328P micro-controller to read the measurements out
|
||||
* nRF24L01+ radio to transmit the values
|
||||
|
||||
on the other side:
|
||||
* nRF24L01+ radio to receive the values
|
||||
* Raspberry Pi single board computer to store the measurements in an influxDB time series database
|
||||
* grafana graphical monitoring tool to display the electricity consumption
|
||||
|
||||
more information is available in the [wiki](https://wiki.cuvoodoo.info/doku.php?id=spark_counter).
|
||||
|
||||
arduino_nano
|
||||
============
|
||||
|
||||
|
@ -21,14 +35,27 @@ Don't forget to use `make eeprom` to write the configuration data on the micro-c
|
|||
|
||||
The source code is interrupt driven when possible (timers, USART, SPI, nRF24 IRQ).
|
||||
|
||||
Arduino - nRF24L01+ connection
|
||||
------------------------------
|
||||
|
||||
ATmega328P signal,ATmega328P pin,Arduino Nano pin,nRF24L01+ board pin,nRF24L01+ signal
|
||||
GND,GND,GND,1,GND
|
||||
,3V3 (add cap.),2,VCC
|
||||
I/O,PB1,D9,3,CE
|
||||
SS,PB2,D10,4,CSN
|
||||
SCK,PB5,D13,5,SCK
|
||||
MOSI,PB3,D11,6,MOSI
|
||||
MISO,PB4,D12,7,MISO
|
||||
INT0,PD2,D2,8,IRQ
|
||||
|
||||
rpi
|
||||
===
|
||||
|
||||
Raspberry Pi program for the computer side of the spark counter.
|
||||
|
||||
the source files are written in C and require the RF24 library (https://tmrh20.github.io/RF24/RPi.html) for the nRF24L01+ radio transciever and libcurl to save the measurement data in the influxdb time series database.
|
||||
the source files are written in C and require the [RF24 library](https://tmrh20.github.io/RF24/RPi.html) for the nRF24L01+ radio transciever and libcurl to save the measurement data in the influxdb time series database.
|
||||
|
||||
on the Raspberry Pi the [https://www.raspberrypi.org/downloads/raspbian/|raspian] OS is installer and the bcm2835 SPI kernel module is enabled (through `rasp-config`).
|
||||
on the Raspberry Pi the [raspian](https://www.raspberrypi.org/downloads/raspbian/) OS is installer and the bcm2835 SPI kernel module is enabled (through `rasp-config`).
|
||||
|
||||
connect to nRF24L01+ to the SPI port of the Raspberry Pi and set up an influxdb database.
|
||||
|
||||
|
@ -41,6 +68,19 @@ add the folling line to the corresponding source file:
|
|||
#include <unistd.h>
|
||||
error seen in `gettingstarted.cpp`, `gettingstarted_call_response`, and `transfer.cpp`
|
||||
|
||||
RPi - nRF24L01+ connection
|
||||
--------------------------
|
||||
|
||||
RPi signal,RPi pin,nRF24L01+ board pin,nRF24L01+ signal
|
||||
GND,P1_20,1,GND
|
||||
+3V3,P1_17,2,VCC
|
||||
GPIO25,P1_22,3,CE
|
||||
GPIO8/CE0#,P1_24,4,CSN
|
||||
GPIO11/SCLK,P1_23,5,SCK
|
||||
GPIO10/MOSI,P1_19,6,MOSI
|
||||
GPIO9/MISO,P1_21,7,MISO
|
||||
GPIO24,P1_18,8,IRQ
|
||||
|
||||
pzem-004_probe.rb
|
||||
=================
|
||||
|
||||
|
|
Loading…
Reference in New Issue