rt_soldering_pen icon indicating copy to clipboard operation
rt_soldering_pen copied to clipboard

Made changes to enable high power output

Open swissfreek opened this issue 3 years ago • 4 comments

Made modifications to code to allow for selectable high power in settings menu. Modified power output bar on display to account for power level. Added tip type parameter and tip detection code. Need help adding code to automatically modify power output based on tip type. Tip Type can currently only be detected once iron starts running, but power output can only be modified on init, which requires power cycle, so tip type is lost. I could use tip type detection to change the power output setting above, but switching from RTU to RTM would require either a manual change or knowingly running the 40W tip with 150W power limit, which is probably not a good idea, even for a short time. So I need to make it run the tip momentarily on startup and THEN declare max power once tip resistance can be measured.

swissfreek avatar Jan 23 '21 00:01 swissfreek

In general it is OK, but:

  • I see another problem, that RTU need supply 24V (24V is currently my limit, on new HW revision will be limit 30V) and currently maximum is 18V, so you never reach 150W (3.5 x 18V = 63W) You need with RTU also update this limit. Also for RTM is better if limit is set to 14V (not more - better less 13V, sometimes these tips will fail with higher voltage) I need to change this in future updates. This value is here: SUPPLY_VOLTAGE_MAX_MV = 18000; // mV

I prefer automatic selection on base of heating element resistance... Yes I know about PID set_constants, this need to manage this in runtime, somehow. Or create function, set_max_power and if the resistance will be on begin more than 3ohm, then it will switch to 150W limit and if the resistance will be less it will keep the limit on 40W.

pavelrevak avatar Jan 24 '21 21:01 pavelrevak

This value is here: SUPPLY_VOLTAGE_MAX_MV = 18000; // mV

I had seen this before, and searched the code, and I can't find anywhere that this value is used. But I will change it to RTM_SUPPLY_VOLTAGE_MAX_MV = 14000; and then add a similar constant for RTU that is set to 26000 (high enough for any 6S LiPo pack, but still some buffer before it hits the 30V limit. For my iron, 30V is the limit, as I swapped out the input capacitor to a 30V one right after I got it. I think you told me at the time that you were going to make a hardware revision as well for the same thing in the future. Maybe it should be 25000 since anyone with v1.0 hardware that didn't swap the input capacitor would have a hard 25V limit, but even if it was set to 25000, there's no code that uses it to throw an error flag or something, so it wouldn't stop anyone from putting 30V in the iron and blowing it up.

I am indeed concerned that 24V will rapidly destroy an RTM tip. I intend to sacrifice one when I get home to see what happens, because personally I like the idea of just being able to use one kind of battery and not having to worry about switching back and forth. Minor inconvenience, but maybe I'm very lazy haha. I usually power the iron from a bench power supply, too, and in that case I would have to switch between power supplies, or get an adjustable voltage module.

Since there's no onboard regulator, I was thinking about seeing if I could add some code to detect the voltage and then just not allow the heating cycle to start if it's an RTM tip and it's being fed more than 12V (or 14V). That way at least, you wouldn't switch tips and forget and destroy your RTM tip (but knowing me, I would forget going the other direction, and then I would be confused why my RTU tip wasn't melting solder as well as usual).

I prefer automatic selection on base of heating element resistance... Yes I know about PID set_constants, this need to manage this in runtime, somehow.

This could be set at the same time as max power. It would just require new constants for the PIDs for RTU tips, once they are determined. But automatic detection wouldn't work for RTPico since it is the same resistance as RTMicro. So there would need to be a menu setting for those in order to apply different PIDs.

Or create function, set_max_power and if the resistance will be on begin more than 3ohm, then it will switch to 150W limit and if the resistance will be less it will keep the limit on 40W.

Yeah, I suppose that logic could be broken out from start() to clean up the code. But since start() is the only place that logic will ever be tested, I think it's more a style question of how you want to organize the code than a question of functionality.

swissfreek avatar Jan 28 '21 20:01 swissfreek

SUPPLY_VOLTAGE_MAX_MV = 18000; // mV

Yes, you are right, I did not implemented this, I forgotten. but voltage limits is important to implement, my plan is to disable ON if the voltage limit is over maximum allowed.

pavelrevak avatar Jan 29 '21 07:01 pavelrevak

SUPPLY_VOLTAGE_MAX_MV = 18000; // mV

Yes, you are right, I did not implemented this, I forgotten. but voltage limits is important to implement, my plan is to disable ON if the voltage limit is over maximum allowed.

This is what I was thinking as well. I should be able to add an argument to the if statement in start() that forces a stop() command (the place where it checks tip sensor status etc.). It will check tip type, and then either apply a max of 14V or 25V and then stop. I will work on this today.

swissfreek avatar Jan 29 '21 17:01 swissfreek