Code: Select all
VCELL/SOC (02/04): 4.08V (86%) Hibernate (0a): True ActThr (0a): 0.060V HibThr (%/h) (0b): 26.62 CRATE (%/h) (16): 0.00 VALRT min. (14): 3.40V VALRT max. (14): 4.20V VL (1a): False VH (1a): False Dis (18): False VRESET (18): 3.00V
Very good job!, amazing congratulationssimonbr wrote:Hi all,
For your information, I published an article about an ongoing project with this UPS board on my website. It contains various technical details, such as a reverse engineered circuit diagram. The article also suggests how the board might be modified to enhance its functions. Let me know what you think!
Have a look at:
https://brousant.nl/jm3/index.php/elekt ... spberry-pi
sepie wrote:I bought one on aliExpress and after some initial hurdles I have it up and running on Raspberry with OSMC. I use a script that ensures battery is charged to a minimum level each time and turns down when battery is below a certain level. So far it works well in the car (that is the use case). I am less happy about the small on/off switch on the board. I need to find a way how to make this bigger and easy accessible on outside of Cyntech case. Another thing what would have been nice is that you could program how it turns on. For me best would be always on when outside supply available.
Code: Select all
# file created by holland-ict 29-11-2017 # # batt_voltage raw=$(($((`i2cget -y 1 0x62 0x02 b`))*256+$((`i2cget -y 1 0x62 0x03 b`)))) fine=$(($raw*305/1000)) echo voltage of battery :$fine mv #Calculated battery fill rate perc_batt=`i2cget -y 1 0x62 0x4 b` perc_batt_dec=$(($perc_batt)) echo fill rate of battery calculated by ic $(($perc_batt_dec*100/256))% #version version= $((`i2cget -y 1 0x62 0x00 b`)) echo version of the hat: $version #get alert - if voltage of batt drops under set variabel then alert bit 7 - or most significant bit - will be set alert_raw=`i2cget -y 1 0x62 0x6 b` alert_dec=$(($alert_raw)) if [ "127" -lt "$alert_dec" ] ; then echo alert alert alert. sudo shutdown pi and sink the stash; alert=$(($alert_dec-128)) else echo no alert.;fi mins_remain=$(($((`i2cget -y 1 0x62 0x7 b`)) +$((256*alert_dec)))) echo calculated minutes remaining by cw2015 ic: $mins_remain # have fun!
I am interested in your python script, thank you for sharing.nvdias wrote: ↑Thu Feb 22, 2018 4:37 pmHi all:
I know a lot of time passed since the last post was submited.
I've been using this UPS board for the last months with a lot of succes using my own python script installed as a service.
From my tests, and looking at the i2cdump I'm pretty sure the geekworm ups hat has the higher performance MAX17048 chip with much more registers then previously reported in this topic.
https://datasheets.maximintegrated.com/ ... X17049.pdf
If someone finds interesting, I may also post here my python script that controls the ups.
Code: Select all
Raspi UPS HAT. Scripts by nvdias March 2018 Python script and service Install with: sudo ./install.sh - It will install the necessary python and i2c modules (python i2c-tools python-smbus) - Adds i2c activation in /boot/config.txt (device_tree_param=i2c_arm=on) - Adds module to /etc/modules (i2c-dev) - Service will load at boot time, - Detects for raspi ups hat in i2c, channel 1, address 0x36. - Writes log into /var/log/raspiupshat.log, - If kodi is running, it will send notifications to TV Screen. Detects battery mode, if battery is less than 30% it will gracefully shutdown. After pi is shutdown, and power gets back, the system WILL NOT turn on automatically. It will be needed a long press in ups button to power it off. Long press again will power-on. Removing battery from ups will reset the system (not advisable). The battery will loose capacity from time to time. Lowering the charged status from around 96% to les than 80% in around 8 months. The provided service will do a quick reset to the UPS at boot to recalibrate the battery, and each time external power is recovered. A good approach is to do the following procedure every 6 months: power off the pi and the ups and charge it overnight disconnected from the raspberry pi. After reconnection, the battery level should be back to around 95% For notifications to work in kodi: settings -> services -> control -> allow remote control from applications on this system
Forcing a quick reset after the power return it will force the ups to recharge the battery.simonbr wrote: ↑Thu May 25, 2017 9:08 pmHi Fermars, thank you!
Following your suggestion, I added an article on my website describing a relatively simple modification of the UPS board. I hope it is of use to you and others.
Check out https://brousant.nl/jm3/elektronica/105 ... n-detailed
Also, I made some updates to the original article. I think I found out the type of U3, it's ETA9741 . See https://brousant.nl/jm3/elektronica/104 ... spberry-pi
You need to send 0x4000 to the register 0x06 of the ups controller which is at address 0x36 of smbus 1