Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adoconnection/raspi-supercap
Raspberry Pi supercapacitor UPS shield
https://github.com/adoconnection/raspi-supercap
Last synced: about 1 month ago
JSON representation
Raspberry Pi supercapacitor UPS shield
- Host: GitHub
- URL: https://github.com/adoconnection/raspi-supercap
- Owner: adoconnection
- Created: 2018-12-19T18:58:36.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-17T17:34:07.000Z (over 3 years ago)
- Last Synced: 2024-08-02T05:06:50.018Z (5 months ago)
- Language: C++
- Size: 275 KB
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# raspi-supercap
Open source Raspberry Pi supercapacitor UPS hat## Goal
Make reliable turn on / shutdown shield for Raspberry Pi## Status
PoC assembly(!) Not yet tested ;)
![v1](https://github.com/adoconnection/raspi-supercap/blob/master/PCBv1.0.PNG)
![v1](https://github.com/adoconnection/raspi-supercap/blob/master/PCB-B.1.PNG)## BOM
* PCB – https://easyeda.com/adoconnection/raspi-supercap
* 20F x 2 supercapacitors
* ATMega328
* resistors
* diodes
* MT3608 DC-DC Step up converter board## Open questions
- [x] Use special supercapacitor chargers or not? (https://www.analog.com/en/ltc3225) – not in v1## To-Do checklist
- [x] Firmware
- [x] Monitor PI state
- [x] Call shutdown pin
- [x] On power on wait for capacitors to be charged and turn on Raspberry
- [x] I2C slave to query external power status and capacitors charge level
- [x] Reset Raspberry pi if shutdown was activated and power is restored
- [ ] Customizable power off behavior![v1](https://github.com/adoconnection/raspi-supercap/blob/master/Workflow.png)
## I2C
Default bus address is 0x77
Registers:| Address | Mode | Default value | Info |
| ------------- | ------------- | ------------- | ------------- |
| 0x01 | R | 0x64 | Test register, always return 0x64 |
| 0x02 | R | | External power connected. Return 0x00 or 0x01 |
| 0x03 | R | | Capacitor charge in percents 0 - 100 |
| 0x04 | RW | 3 | Turn off timeout in seconds. Wait for N seconds before issue a turn off command. |
| 0x05 | RW | 50 | Turn off threshold. Shutdown pi at 50% charge left. |
| 0x06 | RW | 30 | Turn on threshold. Pi boot at 40% charged capacitors. Valid values 0 - 100 |
| 0x50 | RW | 0x21 | I2C address |## Sources of inspiration
* https://juice4halt.com/
* https://www.saveyourpi.com/
* https://www.youtube.com/watch?v=m20o3P-S5s8
* http://www.hackerspace-ffm.de/wiki/index.php?title=Raspi_EDLC_UPS
* https://raspberrypi.stackexchange.com/questions/74641/how-to-make-a-simple-reliable-15-second-ups-for-shutdown
* https://raspberrypi.stackexchange.com/questions/22579/pi-headless-how-to-confirm-that-the-pi-is-shut-down
* https://raspberrypi.stackexchange.com/questions/5489/how-do-i-turn-on-my-raspberry-pi-after-shutdown
* https://code.google.com/archive/p/tinkerit/wikis/SecretVoltmeter.wiki
* https://www.arduino.cc/en/Tutorial/MasterWriter
* https://raspberrypi.stackexchange.com/questions/3704/i2c-library-for-mono-c