That was an example with the cap.
You SHOULD add the transistor!. Just use cap for more stable reading when R's are higher and have more time waitng for sampling. Also you do nothave to keep the divider active all the time, just for the few ms to read the AD valu. Then switch it off.
Ioannis
Thanks Ioannis but what about the load?
Roger
What load? I did not understood that.
Ioannis
Honestly, you are coming up against traditional design tradeoffs. To be able to measure the battery reserve, how much battery capacity are you willing to burn vs cost of the circuit? Using just 2 high value resistors without the transistor can be almost as efficient as having the transistor in there when you consider leakage currents if the values are high enough, and simplify the circuit, simplify the software, and cost a few pennies less. The problem is that the input impedance of the pin could load the resistor divider if the values get too high, and of course the high values add a susceptibility to electrical noise. The cap helps with removing noise, and prevents the load caused by sampling to impact the result if the reading is taken fairly quickly compared to the time constant of the RC product. If you don't care about cost and a relatively minor increase in complexity, then use lower value resistors to make the parasitics less of an issue, and use the transistor to switch on the circuit. If you are not comfortable with analog design, then the transistor simplifies the math.
Roger, do follow post #19 and just add a capacitor in parallel to the 560 resistor. A 1uF would be just fine. Or bigger if you have one.
This will give consistent AD values.
Thats all.
Ioannis
Received loud and clear![]()
Roger
Bookmarks