tim-balloon / TIMflight

Flight MCP repo
0 stars 0 forks source link

Hard Drive diskmanager.c: Auto-Standby & TIM FTS 2024 #117

Closed shubhagrawal30 closed 3 weeks ago

shubhagrawal30 commented 3 weeks ago

Context

Two main changes. 1) Correct UUIDs for hard disk drives as (to be) flown in Fort Sumner during TIM's 2024 test flight. We have two sets of 5 Western Digital Red Nas Pro HDDs in two orange pressure vessels ("black boxes") mounted on either side of the inner frame. Each set gets 12 V DC, and talks to one flight computer each via a USB hub inside each vessel. 2) Each disk draws ~2A for spin-up and ~1A when the disk is spinning (at 12 VDC). We spin down the disks to prevent unnecessary heat or power consumption by putting them in standby mode. We do this by setting some hdparm settings. We do this "regularly" to prevent random HDD flash bit flips from causing spin ups.

Expected Behavior:

1) All disks spin up when the gondola is powered up. 2) Once the flight computers and hard drives are in contact, the disks will spin down if unmounted. 3) Whenever mcp (or something else) mounts a disk drive, that drive should spin up (drawing 2A, and then going down to 1A). 4) Once mcp unmounts a disk, it should go to standby mode or spin down within 5 seconds.

This amperage behavior has been tested at the Penn lab, but not in FTS yet (TODO once current sensing is reliable enough off the motor Pbob labjack).