playground: update to include energy consumption
This updates the playground with a few interesting features:
- The terminal is replaced with a new system that should look a bit better. It also clearly shows when it has started and when stopped.
- There is a new 'Power' tab, for energy consumption estimation.
Of these, the power tab is the big one. It looks like this:
The idea is that this could help people who want to control longer LED strips and want an idea how much power they're going to consume, and for people wanting to optimize battery life. Though if you really want to reduce current consumption, the information is probably not fine-grained enough yet. Specifically, I'm planning on adding a tour on how to use WS2812 ("NeoPixel") LED strips, and having estimated current consumption seems helpful for that.
Questions/thoughts:
- Maybe this is not the best name, what about "Energy"?
- What about integrating this information directly into the properties tab? So that the devices listed there have both the current state (for example, for LEDS "on" or "off") and the current consumption. I'm just afraid it might become more difficult to read, especially for long LED strips.
- I wanted to include how much current the MCU uses, but unfortunately that's near-impossible to measure on typical boards. So I just left them out. All current consumption that I couldn't attribute (including the MCU) is part of "Other".
- The tree doesn't look very nice, I took the lazy way out. This could certainly be improved.
- I'm using current (amperes, milliamps, etc) here. The main reason for this is that this is what most datasheets list, and because most devices use linear regulators. This means that the current (and therefore energy consumption) remains more or less constant across voltages, so using watts instead only makes things confusing. Batteries are also typically listed in mAh and not in Wh.
- Most boards use a ton of energy, even when sleeping! For example, the pico uses way more than the datasheet is the lowest it can go. We might want to investigate this and try to optimize sleep current consumption.
@deadprogram what do you think?
Maybe this is not the best name, what about "Energy"?
Power is good.
What about integrating this information directly into the properties tab? So that the devices listed there have both the current state (for example, for LEDS "on" or "off") and the current consumption. I'm just afraid it might become more difficult to read, especially for long LED strips.
It is good to have on separate tab.
I wanted to include how much current the MCU uses, but unfortunately that's near-impossible to measure on typical boards. So I just left them out. All current consumption that I couldn't attribute (including the MCU) is part of "Other".
Good enough for now.
The tree doesn't look very nice, I took the lazy way out. This could certainly be improved.
It is not bothersome, so probably not worth worrying about.
I'm using current (amperes, milliamps, etc) here. The main reason for this is that this is what most datasheets list, and because most devices use linear regulators. This means that the current (and therefore energy consumption) remains more or less constant across voltages, so using watts instead only makes things confusing. Batteries are also typically listed in mAh and not in Wh.
Makes sense to me.
Most boards use a ton of energy, even when sleeping! For example, the pico uses way more than the datasheet is the lowest it can go. We might want to investigate this and try to optimize sleep current consumption.
Yes, please!