Skip to content

is Battery_Setup broken? #1592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gabizro opened this issue Apr 4, 2025 · 2 comments
Open

is Battery_Setup broken? #1592

gabizro opened this issue Apr 4, 2025 · 2 comments
Labels
question Further information is requested

Comments

@gabizro
Copy link

gabizro commented Apr 4, 2025

is Battery_Setup broken or command changed?
No matter what divider I set 1 is used, vref and AD bits are parsed correct
with Battery_Setup 3300 4200 2 2400 4096

Info:DRV:DRV_BATTERY : Measure Battery volt en perc
Debug:DRV:DRV_BATTERY : ADC binary Measurement : 3315.000000 and channel 0
Debug:DRV:DRV_BATTERY : Calculation with param : 2400.000000 4096.000000 1.000000
Debug:DRV:DRV_BATTERY : Ref battery: 1000.000000, rest battery -57.617187I
nfo:DRV:DRV_BATTERY : battery voltage : 1942.382812 and percentage 0.000000%

same with with Battery_Setup 3300 4200 2.00 2400 4096
And with Battery_Setup 3300 4200 2 2300 4090

Info:DRV:DRV_BATTERY : Measure Battery volt en perc
Debug:DRV:DRV_BATTERY : ADC binary Measurement : 3313.000000 and channel 0
Debug:DRV:DRV_BATTERY : Calculation with param : 2300.000000 4090.000000 1.000000
Debug:DRV:DRV_BATTERY : Ref battery: 900.000000, rest battery -1436.943847
Info:DRV:DRV_BATTERY : battery voltage : 1863.056152 and percentage 0.000000%

@openshwprojects
Copy link
Owner

I am not the author of this driver, but it seems that divider is only used if you have Bat Relay (used to enable this divider)
Image

@openshwprojects openshwprojects added the question Further information is requested label Apr 5, 2025
@gabizro
Copy link
Author

gabizro commented Apr 6, 2025

Indeed there is no Bat Relay just a simple divider between Vbat and GND used by Tuya MCU UM8005

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants