Hot glue guns are pretty simple beasts: there’s an on/off switch, a heating element, and a source of current, be it battery or wired. You turn it on, and the heater starts warming up; eventually you can start extruding the thermoplastic sticks we call “hot glue”. Since there’s no temperature control, the longer you run the gun, the warmer it gets until it is inevitably hotter than you actually want– either burning you or oozing thermoplastic out the tip. [Mellow_Labs] was sick of that after a marathon hot-glue session, and decided to improve on his hot glue gun with PID tuning in the video embedded below.
PID tuning is probably a familiar concept to most of you, particularly those who have 3D printers, where it’s used in exactly the same way [Mellow_Labs] puts it to work in the hot glue gun. By varying the input (in this case the power to the heater) proportional both to the Parameter (in this case, temperature) as well as the Integral and Derivative of that value, you can have a much steadier control than more naive algorithms, like the simple “on/off” thermostat that leads to large temperature swings.
In this case [Mellow_Labs] is implementing the PID control using a thermistor that looks like it came from a 3D printer, and a MOSFET driven by an RP2040. Microcontroller gets its power via the hot glue gun’s battery fed through a buck converter. Since he has them, a small OLED screen displays temperature, which is set with a pair of push-buttons. Thus, one can set a temperature hot enough to melt the glue, but low enough to avoid oozing or third degree burns.
He does not share the code he’s running on the RP2040, but if you are inspired to replicate this project and don’t want to roll your own, there are plenty of example PID scripts out there, like the one in this lovely robot. No, PID isn’t reserved for thermostats– but if you are controlling heat, it’s not reserved for electric, either. Some intrepid soul put built a PID controller for a charcoal BBQ once. Continue reading “Tired Of Burnt Fingers? Try PID Tuning The Hot Glue Gun”








