Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hubmartin/rapsberry-pi-still-ftp-webcam-with-arduino-power-management
https://github.com/hubmartin/rapsberry-pi-still-ftp-webcam-with-arduino-power-management
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/hubmartin/rapsberry-pi-still-ftp-webcam-with-arduino-power-management
- Owner: hubmartin
- Created: 2019-12-31T15:50:18.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-13T22:37:14.000Z (about 5 years ago)
- Last Synced: 2024-10-28T09:35:53.022Z (3 months ago)
- Language: Python
- Size: 1.63 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Solar-powered Raspberry Pi picture camera with Arduino for power-on/off
This project contains Python script that will take a still picture from Raspberry Pi camera after boot and transfer it over network to the FTP server.
The Rpi is periodically turned on and off by Arduino and P-FET. This way the node can work from batteries with solar-charger.
In the image there is also embedded temperature and humidity from DTH22 AM2302 sensor. In the FTP taget folder there is also created `log.csv` file and Rpi appends new line on every boot containing timestamp, temperature, humidity and battery voltage.
If there is a `update.py` file in the target FTP directory, the script in Rpi is automatically downloaded over FTP and updated. Next time is run this updated version.
![Prototype](img/prototype.jpg)
# Hardware
- Rpi 3, 4
- Arduino Nano 3
- DHT22 temperature & humidity sensorInput voltage 7 - 14 V (Arduino has 10.8 V threshold for battery protection)
Solar panel is using step-down DC/DC converter with CV/CC directly connected to the 3S Li-Ion batteries with balancer module.
This voltage is connected to the VIN of Arduino. Arduino switches power for Raspberry, the 12 V input voltage is stabilized to 5 V thanks to second DC/DC converter.
# Arduino
### Pinout
- D2 - Output to power on/off the Raspberry Pi using P-FET and NPN transistor. [See this schematic](http://electronics-diy.com/electronic_schematic.php?id=1012).
- A6 - input voltage measurement with 100k/10k voltage divider
- TX1 - UART 115200 sending measured input voltage send in string with newline. Example: `12.6\n` so python can use `readline()`. **Use voltage divider/shifter to convert Arduino's 5V to 3V Rpi**. Connected to pin 10 on Rpi (`UART0_RXD`/`GPIO15`)# Raspberry Pi
Add this line to `\etc\rc.local` to start script after boot
```
cd /home/pi/
python cam_ftp.py
```Example CSV file on the FTP server `log.csv`:
```
2020-01-02_10-23-14, 23.0, 38.9, 12.55
2020-01-02_10-24-19, 23.0, 39.4, 11.67
2020-01-02_10-25-23, 22.9, 38.8, 11.78
2020-01-02_10-26-27, 22.9, 39.1, 11.56
```