Glue Gun Teardown Reveals Microcontroller Mystery

[electrobob] got a Bosch GluePen cordless hot glue gun. The thing has some nice features — it heats up in fifteen seconds, and charges via USB, and is generally handy for those small and quick jobs that hot glue guns were made to perform. At first glance it seems like a huge improvement over the plug-in varieties, which seem to take forever to heat up when all you need is a quick dab of glue.

As cool as the product sounded, [bob] did what any right-minded hacker would do and opened it up to see how that sucker work and found an ATtiny24A inside. What’s most interesting is that there appears to be no temperature regulation or sensing capability, with the exception of the thermistor in the battery-charging circuit. It’s an intriguing mystery.

The ATtiny controls a power MOSFET that brings the heating element to “approximately 170 degrees” according to the manual. [bob] could find no temperature regulation of the hot end, which measures a steady 12 V at the gate of the transistor then entire time the glue gun is powered on.

That ATtiny24A that runs the whole thing packs 12 GPIO pins, 4 PWM channels, and 2 KB program memory. It appears a bit overpowered for a glue gun controller. [bob] found one of the Tiny’s pins connected the heating element and another to the charging circuit. Maybe a shutoff in case the battery catches fire?

Without a clear shot of the back of the board, it’s a bit of a guessing game, but eight of the twelve GPIO pins appear to be in use. Leave your theories in comments. And if you’ve got any bright ideas about what to do with the remaining four GPIO pins, have at it!

For another of [bob]’s tool hacks, check out his constant current sink we posted earlier this year.

63 thoughts on “Glue Gun Teardown Reveals Microcontroller Mystery

  1. Probably works the same way as described in one of HaD’s previous posts: “It has a positive temperature coefficient, which means that its resistance increases from around 2.5 kΩ at room temperature to about 7 kΩ at its 150 ºC operating temperature. This limits the current, and provides a very simple thermostat action.”

    From like 2 days ago…

    1. +1
      and finishing what you probably left unspoken because of obviousness: by using an ADC to measure the voltage division between the PTC heating element and a reference resistor you can determine the resistance and using a table or formula, you can then work out the temperature that matches that resistance.

      1. Yes, this.

        Primary regulation and fail-safe is probably due to the heater being PTC, and finer regulation can be achieved by measuring the element resistance. Easy way to check is to stick a CRO on it and see if there’s any PWM action (or even just bang-bang control would do) when it gets near temp.

    2. jeez, could’ve added a spoiler alert — i’ve not read that yet.

      anyhow, the best way to test that theory perhaps, is to run the gun at minumum and maximum ambient temperatures + test the time/temp of the gooey outputs. i’ve not sought out the manual to see the operating temp specification. breaking-out the battery so as not to do damage to it (via cold/hot) would be smart/easy.

    3. That is my guess. There is a step up converter to drive the MOS switch at 12V, for all i tested this stays there all the time, no PWM. It can be that the simple positive coefficient of the heating element is enough. Hot glue is not really known for being very temperature sensitive.

  2. “Without a clear shot of the back of the board…” there actually is one, where he figures out that it’s actually a steinel hot glue gun in a bosch case :D I have a Steinel here, might open it (stuff tends to stay that way sometimes though, when I open it)

    You get annoyed fast when you have to charge it to use it.

    1. good call. “Without looking at the provided clear shot of the back of the board…”..please guess and comment.

      possibly unrelated to what you were saying, but.. industrial cordless hot glue guns have existed for more than 15 years. and i don’t mean the ones which are made to be socketed/docked for mains AC, which cool every time they’re undocked. i mean the ones warehouses use to glue cardboard boxes. i figure i’d mention this because it’s helpful to realize how industrial tools lead to eventual hobbyist tools.

  3. AvE did a tear down of a little chainsaw that also left me scratching my head: Why do these simple tools have more processing power than an Apollo moon lander?

    I can only surmise that a) they’re ridiculously cheap and/or b) they were designed by fresh engineering interns who only know how build stuff if has an Arduino for street cred.

    1. Faster to develop on a overpowered yet fairly simple uC.

      And sufficiently cheap enough that it’s not worth to design a equivalent circuit using only transistors/mosfets, opamps and passive components

      1. I had a boss back in the 70’s [when the 8080 just came out] that said a micro was a negative cost factor – the moment you had to change the circuit it cost a lot more to change hardware than software,

    2. I haven’t seen the AvE teardown. But I’d guess the chainsaw used a 3-phase BLDC motor, which presents the kind of closed-loop control problem that was non-trivial before the arrival of dirt-cheap 32-bit microcontrollers. This technology is already in washers, dryers, HVAC blowers, and higher-end cordless tools; soon I expect it to be ubiquitous.

    3. The point and purpose of the micro is not really controlling the temperature, but to control the battery.

      The PTC heating element can and will do just fine without any control, but the lithium cell needs some babysitting to prevent it under/overcharging, and negotiating charging current with the charger or other USB power source – and – should the micro ever be powered off (“dead cell”) it’s probably designed to brick itself like one of my Phillips shavers that decided not to work anymore after the battery cell was replaced.

    4. It makes more sense to design for popular MCUs, it usually leads to lower prices, better availability and less chance of it going end-of-life. And going fully analog will just add to design time, require tighter component tolerances and also make it much more expensive to make small adjustments.

      So sticking arduino clone into everything might be a smart move.

    1. I don’t think ATTiny will ever fail in such device. First thing to fail is the battery, but Bosch put off-the-shelf 18650 and made that repair easy for (advanced) user. I saw same thing in their small drill/screwdriver, same cell, easy to replace.

        1. there is enough EEPROM and SRAM space to store the # of uses (cycles) of the gun, allowing for such a disabling feature. a feature like that could be defended as necessary for the safety of users, if ever found out.

          1. As I said already, the micro probably makes sure the battery is never discharged below a safe limit, and after being powered off it probably reboots into a fault mode and refuses to work.

            That’s a “safety” feature in case the battery cell ever undergoes deep discharge, because it may burn if you try to use it any more, but of course it will also prevent anyone from fixing the device, and will brick the device if it sits on a shelf too long.

      1. ˙ɹᴉɐ ǝɥʇ uᴉ pǝʇɐolɟ sǝɹods ǝʞᴉl-ɥsɐ ǝlᴉɥʍ ‘uoᴉsuǝɯᴉp sᴉɥʇ oʇ ǝʌᴉʇɐu sɐʍ ‘ɹoʇɐpǝɹd pᴉouɐɯnɥ ɐ ‘lɐɯᴉuɐ ǝlqɐzᴉuƃoɔǝɹ ǝuo ʇsɐǝl ʇ∀ ˙ǝɔɐɟɹns ʎɹǝʌǝ ʎllɐɔᴉʇɔɐɹd ƃuᴉɹǝʌoɔ sǝuɐɹqɯǝɯ lɐɔᴉƃoloᴉq puɐ slᴉɹpuǝʇ ǝʞᴉl-ʇooɹ ‘ʎdoɹ ɥʇᴉʍ uʍoɹƃɹǝʌo ƃuᴉǝq pɐǝʇsuᴉ ‘ǝɟᴉl uɐɯnɥ ɟo pᴉoʌǝp sᴉ uʍop ǝpᴉsd∩ ǝɥ┴ ˙ƃoɟ ʇuǝsǝɹdᴉuɯo uɐ ʎq pǝɹnɔsqo puɐ ɹǝploɔ ‘ɹǝʞɹɐp ɥɔnɯ sᴉ ʇᴉ ʇnq ‘plɹoʍ uɐɯnɥ ǝɥʇ sɐ ǝɹnʇɔnɹʇsɐɹɟuᴉ puɐ suoᴉʇɐɔol ǝɯɐs ǝɥʇ suᴉɐʇuoɔ ʇI ˙plɹoʍ uɐɯnɥ ǝɥʇ oʇ lǝllɐɹɐd uᴉ ƃuᴉʇsᴉxǝ uoᴉsuǝɯᴉp ǝʇɐuɹǝʇlɐ uɐ sᴉ uʍop ǝpᴉsd∩ ǝɥ┴

  4. Probably programmed to do a finite state machine, fuzzy logic (the ECU on a tiptronic electromechanical transmission integrates that and it only took me a few lines of C to pull off a simple “fuzzy” system), or some other kind of simple sanity check routine/automaton. I see the point of paranoia in a work of engineering like that.

    1. Explain simple fuzzy logic

      For what experience I have, in the end it just rounds down to regular logic, like if A is in a certain range and B is in a certain range, output is switched on, otherwise off. There’s nothing fuzzy or indeterminate about it, as in the end you still need to make up your mind about some exact signal level where a thing is either on or off, and once the functions are defined then it’s just that, forever.

      1. It’s more like “if f(a) + g(b) > C”. The functions could be linear ramps, logarithmic, cubic, might go up and down at certain key points, etc.

        You can also have slow moving variables that adjust operation over time. e.g. my old car had a throttle sensitivity response curve that adapted depending on how much of a lead-foot the driver had.

        This is more “fuzzy” than what you described, but yes, it’s still a very rigidly mathematical behaviour.

  5. “What’s most interesting is that there appears to be no temperature regulation or sensing capability, with the exception of the thermistor in the battery-charging circuit. It’s an intriguing mystery.”
    There is a simple temperature sensing method in which you measure the resistance of the heater element – most heater materials (whether some metallic alloy or some PTC device) have a large thermal coefficient. You can guess at the temperature of the heater from the voltage and current going into it.
    Or for a simple device like this you don’t really have to measure the temperature, provided you are confident of your thermal design – at max power the temperature will stabilize at some value.

    1. My bet is the micro has three functions here:
      1) battery management / under voltage cutoff
      2) running a low current boost converter for the gate drive to that MOSFET
      3) measuring the current across the PTC thermistor hot end over time.

      The reason for my third guess is that there is a limited themal mass in this thing. If the element draws enough juice for long enough that it cannot reasonably still be heating up and the user cannot be possibly bevpumping glue through it that fast for that long it is probably a safe bet the nozzle is resting on something that’s wicking heat away and probably getting hot enough to hurt the user (metal table for instance). I could also see an auto-shutoff if idle for too long (i.e. not enough current drawn to account for heating any additional glue) since this is a battery operated device.

      1. (of course I have, for the purpose of prolonged uninterrupted gluing, totally hot glued several sticks of hot glue end to end to avoid having to stop and reload in the middle of a long uninterrupted sealing bead, so such “smart” behavior would be an anti-feature for such uses, although I would think that for that you’d always want a plug in glue gun anyway).

  6. Microcontroller isn’t much of a mystery. The glue gun has a bicolor LED running to two GPIO. It’s turned on and off with a pushbutton attached to another GPIO, most likely set up as an external interrupt to wake it from deep sleep. Another GPIO can turn the heating element on and off. Two ADCs can monitor battery voltage and current, to provide second stage (if the battery itself is protected) over- and under-voltage protection, and overcurrent protection. It likely has a timeout so that the glue gun doesn’t stay on forever if turned on.

    So we have at least 6 I/O pins in use, protection features, timers, and user interface functions. Sounds like a perfect application for a little 8-bit micro. Perhaps the only question is why some obscure micro in an epoxy blob wasn’t used.

    1. If he really wanted to know he would have reverse engineered the schematic from the PCB. Without that, it could be a slew of different mechanisms.
      But, my bet is like MIHU proposes – just like tungsten light bulbs, just like hot-wire air-flow-meters (in older cars). The resistance of a heating element changes as it changes temperature. Why use a temperature sensor when you already have one, you just need the brains (and a micro) to use it.

  7. For unused pins, how about I2C to LCD display (something small like 1×8) that displays the estimated temp of the heating element, and estimated battery life remaining. Unless ’24 doesn’t have enough memory left to do I2C communication, compute temp and battery life, and display them.

    1. I am not sure how these would help. The thing does have a 30% threshold for low battery which I found to be good enough.
      What could help save a bit of battery is to have temperature regulation at a lower temperature than the stable one, but still hot enough for the glue. But I am guessing those are outside of the scope for such a cheap thing.

    1. There is (part on top labelled 100), but a step up with a micro has some risks, in case it hangs with the MOS on, you will practically short the battery. Probably why they went for the dedicated IC.
      What I think would have worked equally well would have been a doubler/tripler charge pump.

    1. one of the applications of hotglue is to save 3D fdm prints that start to get loose from the bed. A dab of hotglue keeps them stuck, even on a heated bed (if it is not too hot of course).
      Both hotglue and 3D printer filament are engineered for adhesion, and that is what they do. Why would hotglue not be a glue?

  8. Electro Bob did a reasonable job in his original teardown article. But with as many good quality photos as he’s taken, he could have answered most his questions, and produce a much more informative article, by drawing a schematic.

    On the other had, John B’s Hackaday summary doesn’t contribute much. Many recent Hackaday articles are just a useless (and often long-winded) rehash of the original article. If you don’t have anything to say, a single paragraph summary and a link would suffice.

  9. If I had to guess they probably know the characteristics of how the glue gun nozzle heats and maintains temperature. It’s probably something as simple as keeping the heating element on for 5 or 10 seconds to bring it up to a ballpark temperature, then PWM modulate the element to maintain a ballpark temperature. This is a glue gun after all, no need to be terribly specific about the temperature. Same as the old plugin variety glue guns which are a simple heating element wired to the plug with no switch’s or other control. They know it takes say 15 watts of heat to bring the nozzle to and maintain a ballpark temperature. It’s why the glue guns of old take so long to heat up. They get to temperature using the same wattage as needed to just maintain the temperature

  10. Saw the UK price and thought ’25 quid? That seem a bit rich’ but I found out I hadn’t realized how much the pound has dropped.
    And looking on a Chinese site I only found one alternative, which it turns out is close to the same price.
    So you might as well go Bosch.

Leave a Reply to GenkiCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.