{"id":13657200,"url":"https://github.com/adoconnection/raspi-supercap","last_synced_at":"2025-03-17T13:19:40.965Z","repository":{"id":52278418,"uuid":"162478840","full_name":"adoconnection/raspi-supercap","owner":"adoconnection","description":"Raspberry Pi supercapacitor UPS shield","archived":false,"fork":false,"pushed_at":"2021-04-17T17:34:07.000Z","size":282,"stargazers_count":12,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-10T10:39:27.468Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adoconnection.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-19T18:58:36.000Z","updated_at":"2023-06-20T02:44:58.000Z","dependencies_parsed_at":"2022-09-12T10:31:23.975Z","dependency_job_id":null,"html_url":"https://github.com/adoconnection/raspi-supercap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adoconnection%2Fraspi-supercap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adoconnection%2Fraspi-supercap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adoconnection%2Fraspi-supercap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adoconnection%2Fraspi-supercap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adoconnection","download_url":"https://codeload.github.com/adoconnection/raspi-supercap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244039215,"owners_count":20387835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T05:00:38.453Z","updated_at":"2025-03-17T13:19:40.944Z","avatar_url":"https://github.com/adoconnection.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# raspi-supercap\nOpen source Raspberry Pi supercapacitor UPS hat\n\n## Goal \nMake reliable turn on / shutdown shield for Raspberry Pi\n\n## Status\nPoC assembly\n\n(!) Not yet tested ;)\n![v1](https://github.com/adoconnection/raspi-supercap/blob/master/PCBv1.0.PNG)\n![v1](https://github.com/adoconnection/raspi-supercap/blob/master/PCB-B.1.PNG)\n\n## BOM\n* PCB – https://easyeda.com/adoconnection/raspi-supercap\n* 20F x 2 supercapacitors\n* ATMega328\n* resistors\n* diodes\n* MT3608 DC-DC Step up converter board\n\n## Open questions\n- [x] Use special supercapacitor chargers or not? (https://www.analog.com/en/ltc3225) – not in v1\n\n## To-Do checklist \n- [x] Firmware\n- [x] Monitor PI state\n- [x] Call shutdown pin\n- [x] On power on wait for capacitors to be charged and turn on Raspberry\n- [x] I2C slave to query external power status and capacitors charge level\n- [x] Reset Raspberry pi if shutdown was activated and power is restored\n- [ ] Customizable power off behavior\n\n![v1](https://github.com/adoconnection/raspi-supercap/blob/master/Workflow.png)\n\n## I2C \nDefault bus address is 0x77\nRegisters:\n\n| Address  | Mode | Default value | Info |\n| ------------- | ------------- | ------------- | ------------- |\n| 0x01  | R  | 0x64 | Test register, always return 0x64  |\n| 0x02  | R  |  | External power connected. Return 0x00 or 0x01  |\n| 0x03  | R  |  | Capacitor charge in percents 0 - 100  |\n| 0x04  | RW  | 3 | Turn off timeout in seconds. Wait for N seconds before issue a turn off command.  |\n| 0x05  | RW  | 50 | Turn off threshold. Shutdown pi at 50% charge left. |\n| 0x06  | RW  | 30 | Turn on threshold. Pi boot at 40% charged capacitors. Valid values 0 - 100  |\n| 0x50  | RW  | 0x21 | I2C address |\n\n\n\n## Sources of inspiration\n* https://juice4halt.com/\n* https://www.saveyourpi.com/\n* https://www.youtube.com/watch?v=m20o3P-S5s8\n* http://www.hackerspace-ffm.de/wiki/index.php?title=Raspi_EDLC_UPS\n* https://raspberrypi.stackexchange.com/questions/74641/how-to-make-a-simple-reliable-15-second-ups-for-shutdown\n* https://raspberrypi.stackexchange.com/questions/22579/pi-headless-how-to-confirm-that-the-pi-is-shut-down\n* https://raspberrypi.stackexchange.com/questions/5489/how-do-i-turn-on-my-raspberry-pi-after-shutdown\n* https://code.google.com/archive/p/tinkerit/wikis/SecretVoltmeter.wiki\n* https://www.arduino.cc/en/Tutorial/MasterWriter\n* https://raspberrypi.stackexchange.com/questions/3704/i2c-library-for-mono-c\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadoconnection%2Fraspi-supercap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadoconnection%2Fraspi-supercap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadoconnection%2Fraspi-supercap/lists"}