Watchy
Watchy copied to clipboard
Display upgrades
This PR has commits that affect the display in these aspects:
- Moves the display init/config/callback from Watchy.cpp to Display.cpp (Where it should be imo)
- Move the init()/callback to the constructor, no need to call it manually
- Allows the darkborder feature to be changed on demand using the function, not only on init()
- Allows to asyncPowerOn() the display, to prepare the HW ahead of time if it will render [-16ms]
- Remove redundant soft reset after hard reset [-6ms]
- Reduce init() reset time from 10ms -> 2ms (possibly unsafe? not sure) [-8ms]
- Change the booster configuration to soft start slower (possibly unsafe? not sure) [-220ms]
In all, this change makes display update take 250ms less (650ms -> 400ms). Not all of the time saved is power saved, since some of that time the CPU was in light sleep already. I theoretically computed that the power reduced ~30% (~9mA * 650ms = 6mW -> ~10mA * 400ms = 4mW)
I would value that this change is tested before merging, specially the changes:
- init() 10ms -> 2ms time
- Booster configuration
Today I managed to test this PR for Power. I found some inconsistent results so I wouldn't merge it.
Original Watchy v1.0 HW (2.9V) -> ~170uA (650ms per update) Original Watchy v1.0 HW (2.9V) + PR -> ~190uA (400ms per update) NOTE: 2.9V is not standard but works (if we do not use WiFi), the ESP CPU needs >1.8V and the Display >2.7V. Using 2.9V bypassing the LDO and saving more power, shouldn't really affect the overall trend of the PR code.
Similar results I found in another board, this needs further examination. Why the reduction in time actually increases power usage. Maybe the booster code uses more power.
Had some time to measure with a power meter, and updated my PR with proper changes.
- Modified the delay and strenght parameters of the phases to be as strong as possible and as short as possible. Using the datasheet of SSD1675B (the display controller).
- Updated the code to be safer, keeping the init() inside the watchy code.
The PR is now in a mergeable state.
These are the measurements of Energy/Power:
I am not sure why the ESP reported times don't match the times in the capture graph, maybe the ESP reports the power off comand and the display does some extra stuff using power. Anyway, it is clear that the Booster configuration uses less power during the "flat" phase. The reset reduction and async make the startup be much faster, and the delay reduction make the display also faster.
Power wise this PR condenses the power usage in a smaller period of time, but reduces the total Energy. From 1.39uAh to 1.18uAh per update (-15% power).
I will continue investigating other things like:
- Strange power spike on powerOn
- LUT configuration for an even faster update
- Power off seems costly
Last change removes a redundant 10ms delay after the hard reset. Current PR gives:
Time: 471 ms Energy: 1.09 uAh Average Power: 30.8 mW Average Current: 8.33 mA
-21% energy usage compared to master.
Amazing work!!! Apologies it took so long to merge, thank you !!