4 ms·
Tangentially related question I'm actually trying to answer in earnest at the moment: I want to put together an EDC portable Linux box using something like a R
by exikyut 4y ago
Tangentially related question I'm actually trying to answer in earnest at the moment:
I want to put together an EDC portable Linux box using something like a Radxa Zero or OrangePi Zero, with the idea that it'll run for some nominal amount of time away from a wall outlet.
A power bank is obviously the answer, but I don't want "push the status button and guess at what the 5 LEDs are saying" to be my answer to "how much power is available?". I want something I can ideally turn into an ETA, so that I can then monitor that ETA and send myself alerts when the battery is critically low.
I've found RPi hat "UPSes" that seem to provide exactly this data over I2C... but none of these seem to also provide an all-important enclosure that would ensure I don't accidentally short anything out and literally burn a hole in my pocket. Not viable.
I've not yet explored the world of 3D printing, but I do understand enough to be know that my first 3 or 5 or 28 prints will be slightly janky. :)
So, I'm trying to find a premade solution to this problem - either a power bank that provides Actual Data™ over the USB connection (!), or some kind of devkit-style solution that'll viably/safely fit into a standard enclosure of some kind.
- nine_k 4y agoSomething like OpenUPS2 [1] seems to provide data over USB, and even has Linux software to support that. It does not seem to have an enclosure though; it's apparently intended to be put into an enclosure of the device it supports. Also, pricey. [1]: https://www.mini-box.com/OpenUPS2 https://www.mini-box.com/OpenUPS2
- dicknuckle 4y agoFind someone locally who has a 3d printer. If you don't already know how to model 3d objects, they will likely charge you for that time and then 3d print a test. Then when you have it right, there are plenty of pro shops that can produce a more permanent 3d object through Laserjet Fusion or other methods.
- rektide 4y agoOne of those plagues of shitty consumerism & no market pressure: there's a standard that works great but no one implements it, cause they suck & are no good & there's no consumer pressure to do basic shit. USB HID has all kinds of sensors & telemetry it can do. USB HID includes a whole sub-spec on Power Devices, with all kinds of information that chargers & batteries can report. To take one example, the Battery System Page (x85) can report Current, Voltage, Temperature, Absolute/RelativeStateOfCharge, RemainingCapacity/FullCapacity, RunTimeToEmpty, ChargerConnection, OutputConnection, ChargingIndicator, and CycleCount (among many other factors) to tell you what is happening. You can set RemainingCapacityLimit or RemainingTimeLimit to trigger a USB alarm condition when capacity falls under threshold. You can monitor individual inputs & outputs separately. (The one ask I have that's not supported by the spec: a StopChargeAtCapacity setting for batteries, so I can stop my UPS's 5000mah battery at 4200mah to extend it's life drastically) It's a stupid senseless world where the obvious never happens. Consumers aren't educated enough to have sensible asks. What is possible is ignored. I'll try to break out 'lsusb' more in the future when charging, but my impression is that basically no one- not batteries nor chargers- implements the ancient, obvious, sensible, & easy spec for power devices to report the basics about what they are doing. For shame!
- joshspankit 4y ago> StopChargeAtCapacity I’d also love to see this on power bricks so that I can tell the charger to stop charging my phone and tablet at 80%, regardless of what the device manufacturer gives in terms of software control
- rektide 4y agoSeems like you want the charger to be aware of the hosts state of charge. Typically telemetry only flows from device to computer, which this violates. Most laptops/tablets/phones/&c do know their state of charge & can in software disable charging, although only some expose this to users. This is often available in Linux but I dont think any particular scripts/apps for controlling this have risen to notice yet.
- joshspankit 4y agoWith USB-C, communication (and even charging) can be bidirectional. It’s built in to the spec
- rektide 4y agoCharging can be yes. But you are still asking for a complete rewrite of how everythinf works, for it all to be totally different. It's not a totally unreasonable ask, it's just not in reach. Unlike my discussion above, which proposes a plan entirely doable with standards we have. USB-PD negotiates power delivery, but it doesnt communicate battery or other status. It uses a different sideband to nevotiate outside regular usb communications, and conveys very limited information. There's no battery informatuon conveyed. My above post spoke to how multi-decade old USB HID standards can be used to present current battery status for battery packs. We'd have to flip the relationship around- make the charger be a host that can manage an attached battery, the laptop be a peripheral that exports it's power status, to invert tbe control system as you want, to make the charger responsible for battery managememt & not the device. Or we'd need to radically revamp usb-pd & layer in a lot more capabilities. It'd be cool, in some ways. Plug in any device & it'll only 85% charge. But it's also far more complicated & rewrites all the rules in every way, unlike what I was talking about, which is just battery packs & chargers kind enough to export their status over some very very old simple specs.