Skip to content

This project allows to use Arduino Leonardo or Arduino Pro Micro as an intelligent UPS controller.

Notifications You must be signed in to change notification settings

blackandwhitetux/JamesUPS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leonardo based 12v DC/DC UPS with LifePO4 battery and current monitoring

Based on https://github.com/abratchik/HIDPowerDevice by Alex Bratchik.

A work in progress...

This design is for a 12v adjustable voltage output UPS using the following items:

  • Arduino Pro Micro
  • XL6009 boost converter to boost the battery from 6.4v to 12-30v
  • XL4005 buck converter to charge the battery more efficiently
  • 2x INA180A2IDBVR current sense chips, one for battery and one for output rail
  • 2x FQP30N06L N channel MOSFETS for switching the battery and output

todo (basics):

work out how to measure the battery voltage on A0

  • 2S LifePO4 6Ah cells - maybe 2S2P for a 76wh pack
  • min (2v2) 4v, nominal (3.2v2) 6.4v, max (3.65v*2) 7.3v
  • through a 100k/10k resistive divider so should be 0.4v - 0.73v - may need to tweak resistor values

work out how to measure the input voltage on A1

  • as above, hopefully vrange is from 0-5v as input voltage is 12v - may need to tweak resistor values

work out how to measure the output current on A2

work out how to measure the battery current on A3 and whether it is functional during charge or discharge

  • as above

decide how to pwm the battery connection so as not to take all the current from the source

  • check battery bms works with pwm or if it needs extra caps

todo (more advanced)

  • adapt my measurement code to Alex's UPS sketch
  • implement coloumb counting as we know battery voltage and current and time
  • implement anti-brownout based auto reset based on output current draw measurements (configurable by jumper bodge wire?)

PCB design 0.1

Schematic Gerber render 2D PCB Render 3D Board photo

Pro Micro I/O pins as follows:

MCU Pinouts

PCB design 0.2

still making changes, ideas as follows:

  • bidirectional battery current measurement

Additional setup step on Linux hosts

Copy linux/98-upower-hid.rules file to the /etc/udev/rules.d/ folder , then reboot. This is required for

Linux device manager (udev) to recognize the Arduino board as UPS.

About

This project allows to use Arduino Leonardo or Arduino Pro Micro as an intelligent UPS controller.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%