Yes I coded it that ESP32 actually displays "owo" when i charge its batteries.
PS : ADC reading is noisy as fuck with mVs jumping all over the place, But also to find that battery is kinda flat on charge + i need to add proper filter caps on these.
PS : ADC reading is noisy as fuck with mVs jumping all over the place, But also to find that battery is kinda flat on charge + i need to add proper filter caps on these.
Category All / All
Species Unspecified / Any
Size 598 x 1280px
File Size 795 kB
Listed in Folders
From the serial monitor readings i see so far it's ADC. I made 10k / 1k resistor divider and that should give me 382mV when battery is full.
Readings give me anywhere from 350~400 when capacitor was not added. It was so jumpy that value was not useful at all.
After adding input capacitor for battery voltage plus a small MLCC for ADC line it hovers around 388~395 which seems more legit, Still noise though.
So with that i gave Voltage = 4.2 * mV / 380.
When USB is connected it's around 4.2~4.3V.
Without USB it gives me 4.1~4.2 V.
One thing i also found out is that the ADC reports 0.8V when i detach it from the proto board ( meaning it's floating pin ).
So I think there's definitely a bit of filtering, calibrating to go before i can call this voltage monitor stable.
Two things that came in my mind is
1. Most examples use 100k/10k resistor divider. I only had 10k and 1k, and that might be why
2. The caps i used are what i had at hand, But they're also not exactly something fit for this. I may have to get my hands on caps with smaller values.
Readings give me anywhere from 350~400 when capacitor was not added. It was so jumpy that value was not useful at all.
After adding input capacitor for battery voltage plus a small MLCC for ADC line it hovers around 388~395 which seems more legit, Still noise though.
So with that i gave Voltage = 4.2 * mV / 380.
When USB is connected it's around 4.2~4.3V.
Without USB it gives me 4.1~4.2 V.
One thing i also found out is that the ADC reports 0.8V when i detach it from the proto board ( meaning it's floating pin ).
So I think there's definitely a bit of filtering, calibrating to go before i can call this voltage monitor stable.
Two things that came in my mind is
1. Most examples use 100k/10k resistor divider. I only had 10k and 1k, and that might be why
2. The caps i used are what i had at hand, But they're also not exactly something fit for this. I may have to get my hands on caps with smaller values.
Yeah the built in ADCs on most ESP32s are not all that great in general. A bit of averaging math thrown on top can help a lot.
Smaller voltage divider resistor are actually better because they are less effected by the ADCs internal input resistance. Floating ADC inputs often show some voltage of whatever they float off to (the ADC inputs don't always pull towards ground).
Smaller voltage divider resistor are actually better because they are less effected by the ADCs internal input resistance. Floating ADC inputs often show some voltage of whatever they float off to (the ADC inputs don't always pull towards ground).
Larger resistors drop your idle battery drain. 10k will draw .4 mA and kill the battery in a few thousand houes.
You can get around the ADC impedence issue by using a capacitor at the input. usually the DC impedence is high, you just need a low AC one if multiplexing.
Do averaging in software, you can get extra bits of resolution by dithering.
Often those inbuilt ADCs have a terrible analog reference. Never used ESP but try the bandgap one if it has one instead of Vcc
You can get around the ADC impedence issue by using a capacitor at the input. usually the DC impedence is high, you just need a low AC one if multiplexing.
Do averaging in software, you can get extra bits of resolution by dithering.
Often those inbuilt ADCs have a terrible analog reference. Never used ESP but try the bandgap one if it has one instead of Vcc
FA+


Comments