It's about time SoundHive got a convenient way to power itself. The bench power supply works fine, but AC to DC adapters are cheap and readily available. For 25$ on Amazon you can get yourself a 24V adapter (That's ~1$/volt!) For an interface a DC barrel jack should do the trick.
That's fine and dandy if you're at home, but what if you're on the go? That's where cheap hobby li-po cells come in, in the spirit of modularity, I'll just hang an XT60 connector off the side. That allows the user to pick whatever battery capacity they require. It's also possible to power Soundhive off 4-6 cells as it has such a wide input range.
But unfortunately it's not as simple as plugging in the batteries and chugging along until they die. If you drain li-po cells flat, you run the risk of permanently damaging the cells. So you're going to need some sort of cutoff circuitry. I'm going to talk about how I did this below.
Typically Li-po cells are ~4.2V max, ~3.6V nominal and ~3.2V cutout. That means for a 4,5,6 cell battery you want the system to cutout at 12.8V, 16V, 19.2V respectively.
The first and most important thing the system needs is a fixed supply, for this I chose 5V. You can't just use any old regulator, it needs to be extremely low quiescent current, this is because even after the battery is cutout - this supply is still running, along with everything else it's powering. For this I chose a TI LM9036MX-5.0/NOPB - it takes about ~20uA to operate.
The user will have to select weather they're using a 4,5 or 6 cell battery. This is done by moving a jumper to the correct position this is changing a simple voltage divider.
After the regulator stage there's a dual opamp stage, the first is a Comparator with hysteresis. The reason for the hysteresis is as follows - when the system is drawing current, their is a voltage drop over the batteries internal resistance, although this is minimal, if a standard comparator was used the system would shutoff, then the voltage would rise to the open circuit voltage, thus turning the compactor back on and drawing load, then shut off again. This would continue for a while until the open circuit battery voltage was drained below the trigger point.
The second opamp is an inverter.
As with the regulator, it's important to keep the quiescent current draw of the opamp + resistors low.
The final stage of the circuit is an N-channel fet, this connects the entire soundhive PGND to the GND of the battery. The most important characteristic of this FET is to have a a low Rds(on), this is to minimize joule heating of the part, which of course results in a lower efficiency.
For cutoff circuity, that's about it. I'm thinking about integrating a battery charger into the next revision, that would allow a pretty awesome on the go / at home setup.
Pretty Kicad 3D happyness:
Next up is a PCB for taking input from a 3.5mm AUX jack, and feeding it up the stack, that certainly doesn't warrant a blog post After that I want to do a SW FFT board that can live on top of the entire stack. Most likely designing all the LED driver circuitry from scratch! Smells like smoke already!