Skip to content

BL0937 accuracy/res improvement by slow down readout#1854

Open
listen-obk wants to merge 72 commits into
openshwprojects:mainfrom
listen-obk:main
Open

BL0937 accuracy/res improvement by slow down readout#1854
listen-obk wants to merge 72 commits into
openshwprojects:mainfrom
listen-obk:main

Conversation

@listen-obk
Copy link
Copy Markdown

adopt measure intervals to output frequency of bl0937 for more resolution (~1,7W at 1Hz)

frequency > Hz for low power
Updated pulse handling to account for overflow and changed timestamp calculations.
Added command to set measurement interval dynamically.
@listen-obk listen-obk changed the title BL0937 accuracy BL0937 accuracy/res improvement by slow down readout Nov 5, 2025
Removed the multi-platform CMake workflow configuration.
Added calibration variables for voltage and power measurements.
Refactor pulse counting and measurement intervals for BL0937 driver.
Refactor pulse timestamp handling and measurement calculations for voltage, current, and power. Introduce debug logging for pulse timestamps and measurement changes.
@divadiow
Copy link
Copy Markdown
Contributor

divadiow commented Nov 8, 2025

This looks interesting. What's the effect of OTA updating to this version of you've already got BL0937 configured? Does it breaks stats or keep working as before?

Have you tried it on multiple platforms?

@listen-obk
Copy link
Copy Markdown
Author

Currently I test only on new Tuya plugs with EC6600. OTA from .205 (and to .207) main version worked well but new calibration is required. Because I wanted to see frequency of BL0937 in log and due to restrictions of Scale (raw values in int) I added a factor of 100 for V and 1000 for I and P. There might be better solutions for that.

I did not check impact on stats yet - I would expect it will work well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants