How to get M5stack-paper actual correct voltage during charging?
-
Hello,
I am using this functionM5.getBatteryVoltage() / 1000.0;
to get the battery information of M5stack-paper and display the remaining battery status on the display. It is giving me the correct value of voltages if the M5Paper is running on a battery.
However, If I connect the M5Paper to the charging cable then this function gives4.35 vol
irrespective of the actual battery status. This displays the incorrect100%
battery status on the display.Is there a way Or any other function to get the actual correct voltages during the charging? So I can display the battery status correctly
Thanks
-
This is brainstorming and may be a stupid idea, but that doesnt usually stop me...
You could use one of these
https://shop.m5stack.com/products/grove2grove-expansion-unit
and run your charging cable through it. Every few seconds, your program could briefly disconnect the charging cable programatically through this unit, read the voltage from the battery internally while the charging has stopped, then resume charging. You would have complete control for an extra $4.50 USD. And you would also be able to display the incoming current/amps from your charging source during charging as well (since the unit can provide that info)
-
Hello @ScheduleDisplay
my M5Paper starting with a flat battery returns the following numbers when the battery is charged (read every second):
3976, 3986, 3990, 3998, 4002, 4008, 4014, 4020, 4022, 4026, 4030, 4038, 4044, 4046, 4052, 4060, 4060, 4068, 4070, 4070, 4076, 4078, 4078, 4090, 4092, 4094, 4098, 4102, 4104, 4108, 4114, 4114, 4116, 4120, 4122, 4124, 4126, 4126, 4130, 4134, 4136, 4142, 4142, 4148, 4150, 4152, 4154, 4156, 4162, 4160, 4164, 4168, 4170, 4174, 4176, 4176, 4176, 4178, 4180, 4182, 4184, 4186, 4188, 4192, 4194, 4196, 4196, 4198, 4200, 4204, 4204, 4206, 4210, 4210, 4212, 4214, 4218, 4218, 4224, 4226, 4226, 4226, 4226, 4228, 4228, 4228, 4230, 4232, 4230, 4236, 4238, 4240, 4242, 4244, 4244, 4246, 4246, 4250, 4252, 4252, 4256, 4254, 4254, 4258, 4258, 4258, 4262, 4266, 4264, 4266, 4268, 4268, 4270, 4276, 4274, 4276, 4276, 4276, 4276, 4278,
I suspect that in your case, reading 4.35 V, the battery was almost full.
Thanks
Felix -
@mtylerjr Thanks for your answer. This device is great to have full control but It is not fitting in my use case.
-
@felmue I think 4.35v are somehow coming from the charging cable, because as soon as I connect the charging cable the
M5.getBatteryVoltage() / 1000.0
giving me4.35v
but if I remove the charging cable then I get the actual battery voltages e.g3.8v
.
Is it possible that somehow I can read the actual battery voltages even if the device is connected to the charging cable?