The modified hot glue gun, reassembled

Tired Of Burnt Fingers? Try PID Tuning The Hot Glue Gun

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”

Robot Balances Ball On A Plate

Imagine trying to balance a heavy metal ball bearing on a cafeteria tray. It’s not the easiest thing in the world! In fact, it’s perhaps a task better automated, as [skulkami3000] demonstrates with this robotic build.

The heart of the build is a flat platform fitted with a resistive touchscreen panel on top. The panel is hooked up to a Teensy 4.0 microcontroller. When a heavy ball bearing is placed on the touch panel, the Teensy is thus able to accurately read its position. It then controls a pair of NEMA 17 stepper motors via TCM2208 drivers in order to tilt the panel in two axes in order to keep the ball in the centre of the panel. Thanks to its quick reactions and accurate sensing, it does a fine job of keeping the ball centred, even when the system is perturbed.

Projects like these are a great way to learn the basics of PID control. Understanding these concepts will serve you well in all sorts of engineering contexts, from controlling industrial processes to building capable quadcopter aircraft. Continue reading “Robot Balances Ball On A Plate”

Combining Gyro Stabilisation With Weight Shift Balancing

Gyroscopes are perfect to damper short impulses of external forces but will eventually succumb if a constant force, like gravity, is applied. Once the axis of rotation of the mass aligns with the axis of the external torque, it goes into the gimbal lock and loses the ability to compensate for the roll on that axis. [Hyperspace Pirate] tackled this challenge on a gyroscopically stabilized RC bike by shifting a weight around to help keep the bike upright.

[Hyperspace Pirate] had previously stabilized a little monorail train with a pair of control moment gyroscopes. They work by actively adjusting the tilt of gyroscopes with a servo to apply a stabilizing torque. On this bike, he decided to use the gyro as a passive roll damper, allowing it to rotate freely on the pitch axis. The bike will still fall over but at a much slower rate, and it buys time for a mass on the end of the servo-actuated arm to shift to the side. This provides a corrective torque and prevents gimbal lock.

[Hyperspace Pirate] does an excellent job of explaining the math and control theory behind the system. He implemented a PD-controller (PID without the integral) on an Arduino, which receives the roll angle (proportional) from the accelerometer on an MPU6050 MEMS sensor and the roll rate (Derivative) from a potentiometer that measures the gyro’s tilt angle. He could have just used the gyroscope output from the MPU6050, but we applaud him for using the actual gyro as a sensor.

Like [Hyperspace Pirate]’s other projects, aesthetics were not a consideration. Instead, he wants to experiment with the idea and learn a few things in the process, which we can support.

Continue reading “Combining Gyro Stabilisation With Weight Shift Balancing”