-
-
Notifications
You must be signed in to change notification settings - Fork 743
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
Pinecil V2 negotiates too high PD voltage overloading 60W chargers and cables #1904
Comments
Hello, This is actually something that was discussed and planned in the Pinecil chat. When deciding on the voltage to use we include a small fudge factor on the resistance value to compensate for (cable resistance + MOSFET on resistance + PCB resistance + connector resistances). Release 2.21 did actually take this fudge factor out as a test, and it didn't fix charger reset issues with the charger at the time that was being looked at. (A frame.work laptop charger). There has been discussion for if we should expose an option to turn on and off the fudge factor and I'm not against adding this. The original intention was when time permitted, to actually check the chargers specified current limit thresholds if those are available but this has not yet been implemented. Noting that the tip specification for short tips is 6.2 ohms +- approx 0.2 ohms. Any tips that are cloning the Pine64 standard may have issues. I selected 6.2 out of the available options due to having tighter tolerances and also being easier to manufacture. Also noting that cable current ratings are the problem of the charger to check as far as I recall from the specifications. |
Hi! I'm aware that running chargers at their limit could damage them, that's why i opened this thread :v Tell me if i'm wrong, but isn't ironOS already checking charger power/current capability? In PD debug there are pretty detailed info about supported modes, and they are correct. There must be something, because i've heard that soldering is also possible on 45W supply. But for some reason in my case iron is allowed to go over these limits. Cable and charger communicates properly - when using 60W cable the 65W charger reports 3A/60W max, while with 5A cable it will go up to 3.25A/65W. This current limit is also enforced by safety features of a charger properly, iron just don't care. I'm aware that this is quite complicated, because most people probably use pinecil with stock tips, 65W charger, and 60W silicone cable, and if soldering iron would default to ohm-law and usb-spec correct mode it would lost almost half of it's power, that's why i suggest limiting negotiated PD voltage based on calculated max power draw and power limit in settings or separate setting "do not go over xV" |
Hello, I've generally found the cable compensation to be sub-par on most chargers I've used when operating at 20V (appears more aimed at 5V) except on those with tethered cables. I think is is mostly to avoid risk of over voltage as they don't know the cable resistance ahead of time. Yes IronOS is decoding the full PD published specifications from the chargers, (which is used except for the ones that advertise 21V on PPS instead of 20V, as a lot of those can't actually do 21V). (The power limit is an average limit, enforced by limiting duty cycle. This doesn't stop a peak current. We also do actually do this, where the duty cycle for a 60W charger will actually be slightly capped to keep average below 60W. But doesn't help on the discussion of peak current). As mentioned before we have a fudge factor, that is used to account for all the losses + the always existing off time. So that way our effective resistance is slightly higher. (Enforced off time is there as that is the time when we measure the tip temperature). IronOS/source/Core/Drivers/USBPD.cpp Line 138 in ad15a53
If you look in the rest of that function, we do actually follow the ohms law and check what our peak current is. And then check that against all of our voltage options. So the only reasonable answer I would see here would be to offer the ability to disable the fudge factor to suit chargers that have a 0% over current tolerance ? |
I see couple possible solutions, option to disable fudge factor is definitely one of them. Manual lower voltage selection would also solve that problem. Btw, i know that right now power limit is basically PWM, but it could be improved so that if Pmax@lowervoltage>Plimit then choose lower voltage? I'm not a programmer so sorry if my ideas are unreasonable :) If you are interested in some data about chargers behavior (same models as in original post), here it is: |
...or use a flag to know if the power was cut at the start of the heating? And at the next startup (which is necessarily while connected to the same power source since it trips and restarts immediately), you automatically revert to a lower voltage |
Describe the bug
Pinecil V2 always negotiates 20V overloading 60W (20V 3A) charger
To Reproduce
Pinecil V2 with ~6.2ohm tip installed connected to any 20V 3A charger
Expected behavior
While using ~6.2ohm tip on 3A charger it should negotiate 15V (or 18V if PPS is available)
Details of your device:
Apple A1947 61W 20.3V3A/15V3A/9V3A/5.2V3A
Anker A2613 60W 20V3A/15V3A/9V3A/5V2.4A
Doogee TP651C-EU 65W 20V3.25A/15V3A/12V3A/9V3A/5V3A, PPS 3.3-21V3A/3.3-11V6A
Additional context
Depending on tip, cable, and charger combination sometimes it will work, otherwise pinecil restarts after turning the heating on
Tested on both 3A and 5A cables (pinecil also ignores 3A cable limit) - samsung 3A, pine64 3A, apple 5A, baseus 5A
Confirmed chargers and cables performance with fnirsi FNB58 and adjustable load.
Confirmed in debug mode that pinecil is correctly recognizing available PD modes and tip resistance
Most problems are on off-brand 5.9ohm tip that works only with 65W charger and long, high resistance cable (pulse draw with almost 3.5A of current), but genuine tips also cause 60W chargers and cables to work beyond their specification (up to 3.2A).
Possible solution
I suspect that software seeing 60W available counts on cable resistance and overcurrent tolerance of a charger, but some devices have power line compensation and rather sharp current limit. Manual PD voltage select in the settings would solve these problems.
The text was updated successfully, but these errors were encountered: