Conversation
|
Note: I'm using a picow, interested in feedback from someone using a pico as the 3.3v supply is slightly different |
Firmware/LowLevel/src/main.cpp
Outdated
| #define VIN_R1 9980.0f | ||
| #define VIN_R2 998.0f |
There was a problem hiding this comment.
Where do these come from? I assume these will be slightly different for every board (10k 1%, 1k 1%), so we should have them at 10k and 1k
|
Thank you for the PR! Looks good!
|
Firmware/LowLevel/src/main.cpp
Outdated
| updateNeopixel(); | ||
|
|
||
| // Disable power saving during ADC | ||
| digitalWrite(PIN_SMPS_POWERSAVE, HIGH); |
There was a problem hiding this comment.
In spite of what the datasheets says this is actually worse on my mower and seems to be a general issue with all picos from https://pico-adc.markomo.me/
Use the charge voltage ADC when mowing to determine ADC offset.
Replaced the logic to check the high-level mode && GPS to determine that it's mowing, ensures it doesn't try to adjust the offset while docking. |
|
I haven't tested this PR in my mower, but I did some measurements to see if it could work since I thought it was a great idea to have self calibration. My 0.13.2 mb is somewhat modified since I had issues getting stable readings - I now have a capacitor over 3.3V and an "external" voltage reference to ADC_VREF. From reading PRs here, and postings on discord, I've got the impression that you have some variations in the ADC errors. Like for me on this one, does the same apply for all boards or is just on 0.13.2, or only mine? |
Use the charge current ADC when undocked to determine ADC offset, tweak the resistors values, and disable SMPS powersaving during ADC.
With this I get v_battery pretty close to the measured value