Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current (1A) is flowing when entering calibration menus #337

Open
stawel opened this issue May 19, 2023 · 5 comments
Open

Current (1A) is flowing when entering calibration menus #337

stawel opened this issue May 19, 2023 · 5 comments
Assignees

Comments

@stawel
Copy link
Owner

stawel commented May 19, 2023

reported:
#336 (comment)
#336 (comment)

@diggit:
Waveforms below were observed when current calibration range is highlighted (Value nor whether charging or discharging does not matter.) and start button is pressed (Current should not be flowing yet.).
Measured with 11.1 V battery on output.
Same test with 15.6 V battery produced same waveforms. So it does not seem to be voltage dependent.

There are 2 issues

  • 50 ms discharge pulse with approximately 950 mA flowing
  • very short discharge peak around 4.7 A

238179872-229d2a45-bc4b-4217-9dfd-7241e184069f

@stawel
Copy link
Owner Author

stawel commented May 19, 2023

50 ms discharge pulse with approximately 950 mA flowing

from my understanding this issue is caused by:
https://github.com/stawel/cheali-charger/blob/master/src/core/calibration/CurrentCalibrationMenus.cpp#L114

Program::dischargeOutputCapacitor() should only discharge the output capacitor, not
the battery.

very short discharge peak around 4.7 A

this needs more investigation

@stawel stawel self-assigned this May 19, 2023
@diggit
Copy link
Collaborator

diggit commented May 19, 2023

I believe that discharging circuit is never fully disconnected due to body diode in Q22 (schematic)

So it's not possible to discharge output capacitor without current draw from battery.

@diggit
Copy link
Collaborator

diggit commented May 19, 2023

Attempting to discharge C22/C23 will always draw current from battery, which is connected right to it. Am I missing something?

I can't see a reason in attempting to do so.

stawel added a commit that referenced this issue May 21, 2023
Previously we tried to discharge the output capacitor before
starting anything including calibration or charging.

Output capacitor discharge was introduced with led support
and unnecessarily extended to everything.
It seems that it is impossible to discharge only the capacitor
if a battery is connected to the output, because there will always
be current flowing through the transistors diode at "batt (-)"
@stawel
Copy link
Owner Author

stawel commented May 21, 2023

@diggit

Attempting to discharge C22/C23 will always draw current from battery, which is connected right to it. Am I missing something?

I missed it

I can't see a reason in attempting to do so.

Yes, It doesn't make sense to me either now, and I don't remember why I've added it.
(probably I should write better commit messages in the future)

Ok, I've removed the dischargeOutputCapacitor() code,
Thanks for Your measurements, without them I would probably ignore this.

@diggit
Copy link
Collaborator

diggit commented Jul 6, 2023

@stawel
Maybe there is one reason to attempt discharging at the beginning.
In scenario, when you are starting charging/discharging/..., output voltage is checked. Charger could measure just some residual charge of output capacitor instead of battery voltage and allow charging/discharging to start which would end up in immediate UV/OV condition.
I guess this could be the original reason for short discharging prior any other battery action. 1 A is probably excessive, I'd go with minimum discharge current (battery or charger, whichever is higher) and disable it in calibration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants