What to do if voltage supplied is a little higher than the required voltage.? #7
-
Hi I will be using the library to measure the voltage of a battery rated at 3.7v and my circuit would be supplied with 3.3v.For this scenario,i don't need a voltage divider circuit.So would it be ok if i made the default voltage divider ratio as 1(No effect on output,i think) and the default reference voltage as 3330 Milli volts in Battery.h file? Do let me know if i am correct. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
This is not an issue, but a question. |
Beta Was this translation helpful? Give feedback.
-
I am actually waiting for the battery to arrive.And yes i would like to just report the battery level not the output from the micro controller.So what changes would i need to make in order to correct the wrong part as mentioned by you.Do you mean to say that i need to keep the reference voltage also as 3.7v and the dividing ratio as 1 is ok? |
Beta Was this translation helpful? Give feedback.
-
No, I'm saying you should use a voltage divider and, supposing yours is a Li-Ion battery (4.2V - 3.7V) you'll need to use a voltage divider with a ratio between I've added a few usage examples to the README: please refer to that. |
Beta Was this translation helpful? Give feedback.
No, I'm saying you should use a voltage divider and, supposing yours is a Li-Ion battery (4.2V - 3.7V) you'll need to use a voltage divider with a ratio between
1.3
and2
.For example, you can use a 4.7kΩ (R1) and a 10kΩ (R2) and set a ratio of
1.47
allowing you to measure batteries with a maximum voltage of 4.85V, well within the swing of a Li-Ion.I've added a few usage examples to the README: please refer to that.