Automatic Soap Dispenser Hides Arduino Board

If you’ve been hanging out here at Hackaday for awhile, you’ve certainly seen projects that were based around the concept of putting a miniature computer inside the carcass of some other piece of electronics. In fact at this point it’s something of a running joke, certainly we must have seen an Arduino or Raspberry Pi shoehorned into every type of consumer gadget ever built by this point. But if you thought this would be another example of that common trope by the headline, you might be in for something of a surprise.

[zapta] didn’t put an Arduino inside this GOJO LTX-7 soap dispenser, it was already in there to begin with. That’s right, apparently we’ve hit the point that even cheap soap dispensers are now running on programmable microcontrollers. While we can’t blame those of you who are no doubt groaning and/or rolling their eyes thanks to this particular case of computational gluttony, it does mean we’re able to report with a straight face something which frankly would have passed as an April Fool’s joke in previous years: the development of an open source soap dispensing firmware.

So how does one upload a new Arduino sketch to their GOJO soap dispenser? It’s not like the thing has a USB port on the side for convenient hacking. As explained by [zapta], it involves stripping the dispenser all the way down until the electronics board is free, and then adding in a programming header to make subsequent firmware fiddling a bit easier. Writing a new firmware to the ATTiny48 powered board will require an external ISP (the Atmel AVRISP MKII was used for this hack, though any should work), but it’s otherwise pretty painless.

[zapta] has done an excellent job documenting the different components on the board, and reverse engineered enough of the critical aspects (such as the motor controller and proximity sensor) to write a new open source firmware which can be flashed to the GOJO LTX-7. Beyond allowing you to “Open Source All the Things”, using this new firmware does have some practical advantage in that you can configure how much soap is dispensed per activation. Going further, we’d be exceptionally interested in hearing about anyone who manages to come up with a firmware that enables some hitherto impossible soap dispensing trickery.

We’ve seen hacks involving dispensers of all types, from Halloween games that spit out candy to gadgets which let dogs get their own treats, but a soap dispenser hack is something truly new for us. More proof that there’s still plenty of hardware out there just waiting to be hacked!

46 thoughts on “Automatic Soap Dispenser Hides Arduino Board

      1. Maybe that the Arduino bootloader was present in the first place and the serial pins available to program it?
        One of the main advantage of Arduino is that you don’t have to use ISP, so it’s a bit of a stretch to call this soap dispenser an Arduino out of the box…

        But it’s always nice to see a mass produced item receiving an easily flashable open source firmware.
        What can we do with it?
        Hum, maybe dispense other things than soap? Like alchool for coktail or syrup / honey for pancakes?

  1. While the dispenser uses an Arduino compatible ic, it most likely does not have Arduino compatible firmware and thus is not an Arduino. Also as the soap dispensing is merely a motor pulling down on the nozzle of the soap bottle itself the most control one would have it’s how many pumps per activation one gets. Although it would be nice to control the activation as we fight the ones at work to even activate half of the time.

  2. Everyone can snicker if they like, but ensuring proper handwashing in medical settings is a significant part of the effort to reduce the incidence of hospital-borne infections. It’s actually a potential billion-dollar industry (not to mention life-saving) and so – never mind a microcontroller; an IoT-equipped soap dispenser will more than likely be part of a monitoring solution.

    And Merry Christmas/Happy Holidays to all. May all your gifts be hackable.

    1. I completely agree as I know medical professionals and have heard the horror stories. However, I will say that it should be instinctual and monotonously beat into their heads so that it is done out of habit.

      While learning to repair radars, radios, and everything in between it was beat into our heads that there are to be no watches, rings, out dangly things and that one was properly isolated. To this day I still do it instinctively and ensure that those around do the same.

      As a side note it was also beat into our heads the difference between being shocked and electrocuted. Electrocuted means your dead!

      1. It’s estimated that the average health-care professional at a hospital (eg a nurse) is washing their hands an average of 140 times per shift. The sheer number, plus the often high-pressure nature of their work moment to moment, means that not every wash is to spec.

  3. Its interesting that some models of these dispensers are IOT devices, if you had a source of a few used free/cheap ones then the board might make a good starting point for a treat dispenser for a pet. Gonna need to ask the building maintenance guys to hold me a few the next time they replace these and maybe a touchless towel dispenser too.
    .

  4. I’m always happy when I read about an AVR chip in a mass-produced product. This sort of thing is a big step towards making the world more open-source and hackable.

    I’m quite curious about why such a powerful chip was selected. Presumably, whoever made the soap dispenser knew what they were doing- they had to design the PCB, write the firmware, etc. This probably wasn’t the work of a newbie (like I am). So why would they include such an overpowered chip? I can think of 3 possibilities:

    (1) Perhaps Gojo is planning on adding features in the future. If so, it might make sense to start using a powerful board.
    (2) Perhaps we’ve gotten to the point where it is cheaper to include a single powerful chip (the AVR) instead of a bunch of weaker components? I wasn’t aware that we’ve reached that point yet. And since the AVR chip is protected by capacitors (as it should be), the board has almost as many components as it would have if discrete components were used instead of the AVR. So I’m not convinced that the “using the AVR is cheaper” argument applies here.
    (3) Perhaps the designer really didn’t know that an AVR is unnecessary? But I struggle to believe that.

    tl;dr: AVR chips are great, but I can’t think of a convincing reason why someone put one in this soap dispenser.

    1. We’re absolutely past (2) for something that’s both a proximity sensor and a motor controller.
      Not to mention, a 555 or whatever (plus detector Schmidt trigger) would cost just as much at bulk quantities, and be much less flexible to design changes.

    2. We’re absolutely past (2) for something that’s both a proximity sensor and a motor controller.
      Not to mention, a 555 or whatever (plus detector Schmidt trigger) would cost just as much at bulk quantities, and be much less flexible to design changes.

    3. Some models have more capabilities then others Gojo/purell has the Smartlink software that can be linked to these dispensers and other sensors to verify compliance as well as do predictive ordering and stuff, heck they even have an android app for collecting data which might be fun to play with if anyplace around has this setup.

    4. Author mentioned RFID capability of the device, not sure for what it’s used, but that definitely requires microcontroller and not 555 or similar device. He also talks about current and voltage sensing, so device can probably figure out if it is stuck or if motor is running idle (no soap).

      1. Interesting- it looks like the modern soap dispenser is more complicated than I thought. I should have read the Github page more carefully… It seems like this could be used to DRM soap, but since it can be reprogrammed, I probably shouldn’t be too worried.

        1. i can only really comment from the soap perspective, but DRM is basically it. there was an issue where for a while, people in hospitals were putting in scented hand wash into the dispensers instead of the antibacterial. so they started chipping the soap with RFID, each soap bottle has a little thing on it with an induction coil and an RISC(if i remember correctly) you can see in the github page this pic https://raw.githubusercontent.com/zapta/misc/master/soap_dispenser/web/IMG-1022.JPG the sticker “GRY” , GRY was there part number so to speak for that specific frequency for that kind of soap. there was like 11 or so different ones

    5. Seriously? You do realize that AVRs are heavily used microprocessors in a multitude of mass marketed products right? I work at an EMS and several products we build use AVR chips. The range of products is vast. I am not surprised that the chips are used as in volumes, they are quite cost effective. Oh, and not a single one is loaded with Arduino code…..

      1. I didn’t intend to suggest that AVRs in mass-market products use Arduino code. In fact, I’m not really concerned with how the original code was written. When a product is controlled by an AVR, it’s often possible to replace the firmware with custom firmware (as shown by OP). The process isn’t trivial, but it’s a lot more possible when there’s an AVR than when there’s an obscure chip that doesn’t even have a datasheet available to the public.

    6. I know why they do this. The pump house for the GoJo and Purell dispensers read an RFID chip on the refill and will not operate if you try to use the wrong-brand or unbranded refills. Even though GoJo owns Purell, you can’t even use a GoJo product in a Purell dispenser. I guess when you’re selling a commodity (hand sanitizer/soap), this allows you to control the supply chain and avoid cheaper competitors. Frustrating!

  5. Having it keep track of how many squirts it’s dispensed, and alter the cadence as the level gets low, would be an easy reminder for situations where the angle or lighting doesn’t make it easy to peek into the little window. Or, add some radio goodness and let it reorder soap when the old bag is nearly empty.

    I know what you’re thinking. “Did it dispense six squirts, or only five?” Well, to tell you the truth, in all this excitement I kind of lost track myself. But being as this is a Gojo LTX-7, the most powerful soap dispenser in the world, and it’ll wash your crud clean off, you’ve got to ask yourself one question: “Do I feel yucky?” Well, do ya, punk?

    — Dirty Handy

  6. All this tells me is that there will be more great, reprogrammable, repurposeable hardware that I will be able to dig out of the garbage in the future– like that Intel 8085 based John Deere engine controller I found, which only requires a ROM chip swap for programming– I’m really excited now that I have a ROM burner!
    Dumpster Divers —- UNITE!

  7. This could make a brilliant April Fool’s joke!
    *Don’t dispense until the Nth hand wave
    *Dispense only after holding hand under for N seconds
    *Randomly dispense tiny/ricidulously large amount
    *If possible, don’t dispense at all but just ‘click’
    *Delay dispensing until after hand moves away

    Now that I think about it, I wonder if nearly all public touch-free faucets/dispensers/dryers are already hacked. Would explain a lot…

  8. I am a little late to the party, but maybe someone one will wonder past this comment way at the bottom. I recently had an encounter with a gojo dispenser that wouldn’t take a different model of refill bag all though it was the same in ever way. I noticed a few coils of wire that the head of the cartridge passes through, which I believe to be some kind of rfid reader! Further test to ensue

  9. I salvaged a whole bunch of these dispensers a few months ago. Finally got around to openining one up today and discovered to my immense disappointment that the PCB had been redesigned and now uses a PIC16F677 device. Doh!!!

    1. I had the same version with PIC16F677 ,is model LTX12 ,and I found a very clean solution.When i read the PIC i found that the eeprom data code is not protected ,that means you can read and write it.All you need to use the dispenser with old RFID chip is to change eeprom data at first adress 0x00 with value 0x00 (or another value.you may write this change, but without erase the chip.I used PICKit2 and set ONLY eeprom data enabled .Do not enable the Program data .Read the chip, modify the byte at first adress ,and write the eeprom.do not use Erase.Put the old RFID chip in the place and start using the dispenser.

  10. GW2002 hit it on the head. I’m really not familiar with the particular processor involved but the motive is clear.The whole thing is based on allowing only a particular product (or range of products) to dispense from a given model. The dispenser is sold under at least three brand names, each of whom may offer multiple versions to suit their product line. I just learned this the hard way, found a source (one of our regular vendors) who had some Purell hand sanitizer in stock, their web page referenced a GoJo dispenser, I bought both. After some investigation the reason for it’s failure to function finally came out. The manufacturers certainly don’t offer much information regarding the incompatibility. Their disposal procedure suggests removing the collar containing the RFID chip (if that’s what it is) and throwing it away before disposing of the empty container. I suppose they don’t want the chips floating around. I’ve ordered a bottle of the hand soap intended for this dispenser and intend to swap chips to see if it will then dispense the hand sanitizer I bought. Maybe someone can provide a hack which allows the dispenser to utilize any product which fits.

    1. Pull the tab with the rfid chip out of the collar. Cut the tabs off with a tin snips and sand down until almost flush. Take the rfid that works in your dispenser and stick it in the recess where the reader is. Pull the rfid out of the refill of your choosing and install it into your dispenser. I’ve just today done this to all my dispensers at work. I decide what refills to use, not the machine manufacturer.

      1. Pretty much what I did. I snapped the whole collar off the bottle and exchanged it with the one from the hand soap it was intended to dispense. Would still like to know if I can permanently disable the sensor loops somehow, maybe a jumper.

Leave a Reply to masterknuutCancel 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.