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

Should soldering mode be enabled on weak PD #1875

Open
firstnevyn opened this issue Jan 30, 2024 · 5 comments
Open

Should soldering mode be enabled on weak PD #1875

firstnevyn opened this issue Jan 30, 2024 · 5 comments
Assignees

Comments

@firstnevyn
Copy link

firstnevyn commented Jan 30, 2024

If I plug my pinecil into a dumb non-qc non-pd output like my pc.. the pinecil fails to power the heater circuit because 4.98V is 'undervoltage'

When connected to my phone which does pd negotiation...

PD Debug
State 12 No VBus
1 5v 0.50A

If I exit PD Debug and press plus.. the pinecil makes a valiant effort to get to the set temp of 300C at 2.5W...

If the source is PD capable (like my Samsung phone) it completes pd negotiation. it offers too little power to be useful however it's completed PD negotiation.

@zejjnt
Copy link

zejjnt commented Feb 8, 2024

If you connect it to a dumb 5 V adapter of course it will not get enough power to be useful.

@firstnevyn
Copy link
Author

If you connect it to a dumb 5 V adapter of course it will not get enough power to be useful.

Yes but that's not the question the question is.. if you connect to a PD source that only offers 2.5W should the iron even engage soldering mode and attempt to get to temp? (the current behavior is.. a PD negotiation completed.. and even if the only offered profile was 2.5W you can enable soldering mode. should there be a minimum wattage in a pd profile that's 'acceptable'?

@zejjnt
Copy link

zejjnt commented Feb 14, 2024

I think that the firmware in its current form uses is the easiest and cleanest way to handle PD without needlessly cluttering the code; it is also useful for troubleshooting.
Of course you could add a limit, but why? That time and energy is better spent writing some useful code instead of writing something that essentially would just be there because the user didn't read the owners manual :)

@firstnevyn
Copy link
Author

firstnevyn commented Feb 14, 2024

By turning on the mosfet...

With a normal t101 tip with a nominal resistance of 8.2ohms.
5/8.3 == .6A 3W (not too far above the .5A 2.5W the supply allows for)

With the short pinecil tips the instantaneous draw is
5v/6.5ohm = 0.8A (4w)

with #1868 this gets even more exciting 5v/4ohm ==1.25A and 6.25W

and while it's averaged and smoothed over some Time period that's double what the source allowed so unless it's pulsing the mosfet to stay inside that power/current window somehow it's well outside spec.

Which is substancially more than the pd advertisement was (0.5A (2.5W) so if a pd supply doesn't advertise at least 5V 1A you shouldn't turn on that mosfet. just like 4.95V

@stephen304
Copy link

stephen304 commented Jul 16, 2024

This would be useful to have, there's already an "undervoltage" detection for DC mode which is nice because you know immediately what the problem is, but when using PD 5V and pulling 0.6A (3W) you end up waiting a while before it finally says thermal runaway, so having an undercurrent error condition would make diagnosing the issue quicker and give a clearer indication of what's happening.

I think there are 2 places this could be implemented which handles different causes:

  • For power supplies that advertise less than 5W, it could throw an immediate error when you enter solder mode - this sounds like it might be annoying if you use a PD supply like in the previous comment that supplies more power than negotiated and maybe you know it'll supply enough power anyway so this one should probably be toggleable or maybe default off if implemented
  • For power supplies that advertise enough power but maybe was built poorly / won't supply 5W when it tries to heat up, an error similar to thermal runaway could be implemented but instead of checking for whether the iron is heating up by a certain time, it would check if the wattage goes over 5W by a certain time. So if a power supply stays at 3W for too long while it's trying to heat up, you'll get an undercurrent error and know that the power supply isn't providing enough current. I would assume this would be implemented similar to the thermal runaway logic so hopefully that doesn't require touching the PD code but instead duplicating the thermal runaway check and having it look at wattage instead. One consideration would be that you would want to avoid giving a thermal runaway error during this process, so maybe the thermal runaway code could adjust its expectations depending on the supplied wattage so that it's more lenient when using lower power supplies - maybe that deserves its own ticket.
    • 2a) An alternate / possibly simpler way to implement this one would be to just piggyback onto the thermal runaway detection by keeping track of the wattage during heatup and, when a thermal runaway is triggered, check the voltage history to see if the runaway condition was possibly caused by undercurrent instead. This would have the benefit of not needing to get the thermal runaway detection out of the way, but having them tied together provides less flexibility to tune the undercurrent detection independently of thermal runaway detection. The wattage history could be as simple as a "has exceeded 5W" flag (could be hasExceeded5W = false; while heating {if (wattage > 5v) hasExceeded5W = true}) or some time component like "time spent <5W during the last contiguous period of heatup" (which could be something like lastExceeded5W = now(); while heating {if (wattage > 5v) lastExceeded5W = now();} then if hasExceeded5W = false or lastExceeded5W > 10s when thermal runaway is triggered, show the undercurrent message instead.

If only the second one is implemented, it will handle both cases but won't be as immediate since it will only "realize" the power supply isn't specced for >5W when it stays under 5W for too long (I would assume you would reset the "too long" timer if it reaches temp so it's only counting "continuous heating" time).

My argument for implementing something like this is: it already stops you from soldering if you provide too low DC voltage, why shouldn't it also do that in PD mode with too low current? Also as it is currently, the thermal runaway error is already doing the job, it's just not distinguishing between possible undercurrent and actual thermal runaway when it seems like it should have enough information to do so.

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

4 participants