UPS-Lite Raspberry Pi Zero case

UPS-Lite Raspberry Pi Zero case

thingiverse

Remix for the Raspberry Pi Zero (W) mounted on a UPS-Lite. Printed with 0.2mm layers, no supports. Some action : https://www.youtube.com/watch?v=IbQ9D2eIZqA https://www.youtube.com/watch?v=ZrIysoZl2jI **UPS-Lite software is available here** https://github.com/linshuqin329/UPS-Lite **Here is some Node Red code to retrieve Voltage and battery gauge :** *(>Import >Clipboard)* <code>[{"id":"4e29f32.301630c","type":"i2c in","z":"87a082cf.723f1","name":"Volts","address":"54","command":"2","count":"2","x":408,"y":563,"wires":[["b27088d9.1b3cf8"]]},{"id":"1ad1c751.ef6e09","type":"i2c in","z":"87a082cf.723f1","name":"Batt%","address":"54","command":"4","count":"2","x":408,"y":603,"wires":[["8dc9b062.75247"]]},{"id":"b27088d9.1b3cf8","type":"function","z":"87a082cf.723f1","name":"get_volts","func":"var data=msg.payload[0]*256+msg.payload[1];\nmsg.payload=((data*1.25)/1000/16).toFixed(3)*1;\nmsg.topic=msg.payload;\nreturn msg;","outputs":1,"noerr":0,"x":538,"y":563,"wires":[["1ad1c751.ef6e09","7b80f0c.4a25b1"]]},{"id":"8dc9b062.75247","type":"function","z":"87a082cf.723f1","name":"get_batt%","func":"var data=msg.payload[0]*256+msg.payload[1];\nmsg.payload=(data/256).toFixed(3)*1;\nreturn msg;","outputs":1,"noerr":0,"x":538,"y":603,"wires":[["1ace7efa.d562a1","c2fc9916.4b0e78","90ac1583.a8ddb8"]]}]</code> **And some Python based on the original code** <code>#!/usr/bin/env python import struct import smbus import sys import time def readVoltage(bus): "This function returns as float the voltage from the Raspi UPS Hat via the provided SMBus object" address = 0x36 read = bus.read_word_data(address, 2) swapped = struct.unpack("<H", struct.pack(">H", read))[0] voltage = swapped * 1.25 /1000/16 return voltage def readCapacity(bus): "This function returns as a float the remaining capacity of the battery connected to the Raspi UPS Hat via the provided SMBus object" address = 0x36 read = bus.read_word_data(address, 4) swapped = struct.unpack("<H", struct.pack(">H", read))[0] capacity = swapped/256 return capacity bus = smbus.SMBus(1) # 0 = /dev/i2c-0 (port I2C0), 1 = /dev/i2c-1 (port I2C1) print ("%.2f V|%i%%" %(readVoltage(bus),readCapacity(bus)))</code>

Download Model from thingiverse

With this file you will be able to print UPS-Lite Raspberry Pi Zero case with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on UPS-Lite Raspberry Pi Zero case.