Note that if you have the switch, the switch has to be on in order for the battery to charge.
Sorry, but this confused me. But, if I now understand what’s happening, the only purpose of the switch is to preserve the battery life during battery operation if there is no USB connection, by disconnecting the battery power (turning the display off).
But if there IS a USB connection, then the switch being in the “off" position still disconnects the battery from the display meaning that it is not actually being charged by the USB connection.
This makes sense and explains why the unit can be plugged in for many hours and the green light never comes on. The battery was not getting charged at all since the switch was off.
It wouldn’t be perfect, but I wonder if you could get a rocker switch that would move the connection to the fuel gauge for checking the battery and then toggle it back for normal operation. It would have to be manually toggled, but maybe for testing purposes it could be interesting?
I connected two 100k ohm resistory paralel switch and connected and resistors IO8 and gnd in wireless module. It reads a percentage from the battery but i am not sure if it is correct. I havent charged also. I will test it these days.
Yea, ultimately we’re translating voltage to percentage. I guess it’s not linear though. I also saw that the voltage changes when it’s charging too. It’s probably better suited for a rough gauge.
My main problem is that it seemed to mess up the battery charging from USB.
Like the other one, it probably needs a brim. I set the brim-object gap to 0.5mm to help it come off a bit cleaner. They should sit in the openings (without getting stuck) and then just put the case on top.
I just started testing. Now it is fully charged. Lets see.. If you guys want to try, I added a note file that written by ai. You can ask AI to integrate for your build. 2x 100kohm resistors used.
That’s similar to the AI generated code I already have.
Does the battery still charge properly from the USB port? Mine charges for less than a minute even though it’s not full and then the charge light goes green. The differences are I’m using 1M resistors instead of 100K to reduce power usage. I also have a capacitor to smooth out the ADC readings. I’m also using GPIO2 instead of 8, which I knew was another alternative.
It is early for me to say something but it looks like it is charging. I forgot the combination I think first switch on so it will use battery then plug in.