Giter VIP home page Giter VIP logo

Comments (4)

entozoon avatar entozoon commented on July 29, 2024

Hmm, if I set my refVoltage to 3306, which is what I measure across the 3V3 pin and GND (despite powering from 5V USB) then the figures are much closer. Still half a volt out, but I guess it's better than nothing and I can fudge the numbers ..

from batterysense.

rlogiacco avatar rlogiacco commented on July 29, 2024

from batterysense.

entozoon avatar entozoon commented on July 29, 2024

Hi @rlogiacco, thanks. I have a Wemos S2 mini which is an ESP32-S2FN4R2.
I do not understand how to discovery the correct ref voltage.. :(

This ESP32-S2 document mentions 1100mV as the ADC calibration reference voltage but that sounds way too low to me..

from batterysense.

rlogiacco avatar rlogiacco commented on July 29, 2024

Yours is a 3.3V board and also the ADC seems to be recommending an external 100nF capacitor:

So, it would help if you change the begin method parameter to 3300 (as for ´3.3V´) and add the capacitor. I also suggest measuring the real values of the two resistors used for the voltage divider to increase accuracy: unless you go for precision resistors, values might be quite different from what you expect.

To be clear, the ESP32 (the MCU at the core of your board) has a 1.1V vRef (specs from the manufacturer state this is just a median value though), this is then converted to a 3.3V reference by the board (by using a voltage divider, which might be introducing inaccuracy), on top of that you are using an additional voltage divider... Sadly the board you are using is not really the best choice for your goal if accuracy is key.

BTW, I do not own the board you are using, thus I’m only reading specifications found on the internet.

from batterysense.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.