electronoobb
- Feb 11, 2023
- 26
- Joined
- Feb 11, 2023
- Messages
- 26
Hi I am super confused with reading my lipo battery voltage.
Unfortunately, i tried almost all codes available on the internet but i could not read the right voltage. I believe that there is some issue with my connections.
- I WANT TO CREATE A FUNCTION TO READ MY 3.7~4.2V,1200mAH BATTERY VOLTAGE THROUGH A MICROCONTROLLER (ARDUINO OR ATTINY44).
- THEN I WANT TO CALL THE CREATED BATTERY FUNCTION IN THE FORMULA TO READ PRECISE SENSOR VALUE: int voltage = ((CALLING BATTERY FUNCTION) * (READ SENSOR VALUE)) / 1023;
- I AM USING INTERNAL REFERENCE VOLTAGE 1.1V.
- I NEED A FIXED VREF SO THAT THE SENSOR(voltage) FORMULA VALUE DOES NOT CHANGE.
Unfortunately, i tried almost all codes available on the internet but i could not read the right voltage. I believe that there is some issue with my connections.
