Skip to content

Supercapacitor UPS

Tony Kuker edited this page Dec 4, 2022 · 6 revisions

Background

The PiSCSI service caches data in RAM. When power is pulled from a PiSCSI/Raspberry Pi setup, it is possible to lose some or all of this data. In order to allow a graceful shutdown of the PiSCSI service and the Raspberry Pi OS, a USP can be added to the assembly. This way, when power is removed, the Raspberry Pi will have enough saved power to properly shut down.

Prototype Phase: Dr. Scott M. Baker design

Dr. Scott M. Baker has designed two different UPS versions that will work with the PiSCSI. He has generously made these available on this blog for other people to use. Tutorial video.

Assembly

image

For akuker's initial prototype, he started with the gerber files provided by Dr. Baker. At the time of this writting, ATTiny85 chips are in very short supply. However, I was able to acquire some through [Amazon] in small volumes. (https://smile.amazon.com/gp/product/B06W9JBJJ6/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&psc=1) The rest of the parts were ordered from Digikey: image

Note that for my initial prototype, I did not populate all of the connectors. I also did not populate the voltage dividers on the USB port (R15, R16, R17, R18). The "ORK" buck converter used by Dr. Baker was also not available. For one prototype, I used a 7805TV voltage regulator. For the other, I bodged in a LM2596S voltage regulator, which has a higher amperage rating.

Programming the ATTiny85

For programming the ATTin85, I followed these instructions: https://create.arduino.cc/projecthub/arjun/programming-attiny85-with-arduino-uno-afb829

For me, the pin names were very confusing. Here's my conversion table:

Arduino Pin ATtiny85 Physical Pin ATtiny85 Logical Pin UPS Board Name
5v 8 Vcc +5v
Gnd 4 Gnd Gnd
Pin 13 (D13) 7 Pin 2 SCL
Pin 12 (D12) 6 Pin 1 VIN_Sense
Pin 11 (D11) 5 Pin 0 SDA
Pin 10 (D10) 1 Reset Reset

You'll need to install the TinyWireS library following these instructions.

"Official" PiSCSI version

For the PiSCSI, akuker will be focusing on the 12v version of Dr. Baker's UPS. A modified version of this is being designed and will be offered in the Tindie store (when it is ready).

Clone this wiki locally