coloradocube / balloonsat

COTS balloonsat mission to test the RPi 4 with a battery UPS, a quad camarray, a GPS module, a RockBLOCK module, and a small number of Qwiic sensors
0 stars 5 forks source link

FE v0.0.2 - Read the voltage and capacity from UPS #45

Closed ivogeorg closed 2 years ago

ivogeorg commented 2 years ago

Description

  1. Setup:
    1. Latest Raspbian OS image on Micro SD card.
    2. Python 3.9+.
    3. Connect X728 PSU. image
      Note: There are no batteries in the UPS and the Qwiic hat with the attached sensors are not needed.
    4. TODO: UPS documentation and library/package?
  2. Single process, single thread.
    1. Note that running Python examples for PSU or sensors with run will create separate processes (possibly, subprocesses). So:
      1. The output has to be parsed.
      2. If single-output, does the subprocess exit?
      3. If in a loop, how to read the output (stdio pipe)?
  3. Procedure:
    1. Turn on the UPS by pressing the blue button on the side of the batteries. This starts the RPi.
    2. Run fexecutive.py.
    3. It prints the UPS readings to stdout.

Knowledge

  1. Python subprocess package.
  2. According to the X728 shell script and documentation:
    1. Low battery is < 20 %.
    2. Shut down voltage is by default 3 V.

Deliverables

  1. Release with tag v0.0.2.