Spaduino Heats Up A Used Hot-tub

[Ryan] and the roomies decided that a hot tub was just what they needed to spice up the place. They hit Craig’s List and found one for the right price. After acquisition and setup they were pleased to find that the jets and pump worked great. But you’re not going to want to stick as much as your big toe into this ice-cold cryogenics experiment. Some poking around in the control system exposed the dead relays which are responsible for switching the heater. Instead of swapping the parts, [Ryan] began building a control system that will replace the twenty-year-old original.

The heating element still works, but it’s rated at 5.5 kW and here’s no way to automatically switch it on and off. [Ryan] found a 60 Amp solid state relay which can handle the load, and plays nicely with his Arduino. Initial tests got the tub up and running again. Obviously you want the tub to maintain temperature and so a thermistor was added to take readings from the heater core. There’s also a potentiometer to adjust the temperature, and an LCD screen to show the current settings. But [Ryan] hopes to add more features over time, like incorporating jet control, and adding wireless communications via an Xbee module.

38 thoughts on “Spaduino Heats Up A Used Hot-tub

  1. Careful!

    I have personal knowledge of a hot tub malfunction which caused the hot tub to overheat. Unfortunately the owner did not know that. He stuck his leg into the near boiling water, and was burned halfway up his leg. It was a crazy bad burn.

    There are safety features intended to prevent something like this, but those can fail if the tub is modified. I don’t know the types of typical safety features… I can imagine heater features, thermostat features, and even drain plugs that melt at a certain temp.

    Please make sure you have some fool-proof safety features.

    And whenever you get into a hot tub, make sure the temp is safe before committing.

    1. @fartface – I used to think your posts were unintentionally misinformed… hurried maybe.

      You actually troll on purpose? Do you single out H-A-D for this, or do you resent other groups besides engineers?

  2. Excellent project! I always wanted to do this on my hot tub. An idea for you – Try adding a pH sensor, since that will be something that has to be balanced out, and greatly affects the water clarity.
    You could also add a fish tank dosing pump to add chlorine automatically when you get out of the hot tub, and even a 15 minute SMS reminder to tell you to go put the cover back on after you added the chlorine! I always wanted to do this! keep us posted on its’ progress!

  3. XBee? What the heck. Come one do it right throw a Beagle Bone in there and use Wifi and add an IR sensor for a remote and then add voice commands. You could throw in some speakers and make it a web radio and mp3 player as well.
    Or put in an old over clocked P4 running Linux and use the water from the hot tub to cool the system!

    Just kidding actually it is a really cool hack.

  4. Hate to say this again, but folks: please note that these type of hacks can make you homeless and financially ruined. If you really want to do something like this, design it and let an electrical contractor implement it.

    If for any reason this hot tub causes a fire and burns down the house, your homeowners insurance will latch onto it super-quickly and pay ZERO. You’ll have a nice pile of rubble and a mortgage you’ll still have to keep paying. Even worse is if you’re renting – add some lawsuits on top of the prior scenario.

    So please, only use hacks that are plugged into the wall while you’re watching them, unless you’re ok with the risk vs reward.

    1. Wow over-reaction much? What qualifies an electrical contractor more than say an engineer? And the hot tub looks like its outside anyway? Its also full of water so Would probably have a hard time starting a good fire. That’s also why we invented circuit breakers and fuses. Although I do admire your skills for taking it from a simple heater mod to full blown financial ruin in just 3 paragraphs.

      1. @Fool2cool – (or are you @fartface?)

        ALL that matters is this:
        What violates your insurance policy. ANY policy violation will be an automatic “DENIED” to any claim.

        You don’t address that point at all, and instead you manufacture a laundry list of strawment, and insult other posters. Thanks for sharing, but please refrain from trolling here.

    2. Gee, sorry for reminding folks about risk versus reward. I’ll be sure to support you as you ding similar comments on future human octocopter warning comments. Lesson learned for me.

      Fool2Cool: My, oh my..
      1. “What qualifies a contractor more than an engineer?” Licensing and insurance. And this guy doesn’t appear to be either.
      2. “And the hot tub is outside” Right next to the house.
      3. “It’s full of water..” Yes, water would indeed spill after the wood frame burns away and the plastic tub melts.
      4. “Thats why we invented circuit breakers and fuses.” No, it’s certaintly not. A circuit creaker couldn’t care less that my code left an IO line high – leaving the heater in full-on mode forever. The circuit breaker would be helpful in cutting the juice after the fire spilled tons of water on the circuit though.

      Go ahead and pan me, but in reading the OP, he hardwired the heater first in lieu of controls, but after undesireable results (too hot maybe – hence the nuclear explosion pic?) decided that a controlled relay was a good thing.

      The only concern this dude had was in opto-isolating the arduino so as not to damage that sizeable investment.

      Finally, check out the last thing on his ‘to-do’ list:

      6.Additional safety precautions. There is a water pressure sensor that is supposed to turn the heater off while the jets are not running. Because of the location of the thermistor, the heater core would be turned off by the temperature regulation before it ever got too hot.

      Note that #1 on the list is adding XBee. Hah!

      On the positive side: He did, however, gracefully thank folks on IRC and slashnet for solving quirks in his code. Probably minor quirks though.

      1. There is a water pressure sensor. I couldn’t get any readings from it, so I’m guessing it was dead before we got the hot tub. It also has rust spots on its exterior regardless. I do plan to use the pressure sensor once I obtain a replacement, but currently we have the low-speed pump for the filtration cycle set to always on. This way water is always moving across the heater, helping reduce the risk of a potential overheat scenario.

  5. Back when I had a hot tub, what would have really been helpful would have been a telephone-controlled remote starter. It was a gas-powered tub, and took about an hour to warm up, so that would have made it easier to have the tub be warm when I got home from something. (Of course, having a landlord who’d keep the tub’s mechanisms working would have also helped, but that applied to a variety of things around the house, like the heating system, and the caulking he’d forgotten when he put a new french door on the back porch :-)

  6. Really guys? Come on. This is, not “”. It is (or should be) implied that all of these hacks (HACKS guys! not UL Labs certified products!) carry inherent risks, you should use proper caution when fiddling with high voltage, etc, and if you’re not competent, either don’t mess with it or you’ll land on the darwin awards for the year!

    Now, if he was using scotch tape in place of electrical tape, and had the whole 220v board precariously perched on a piece of plywood right next to the hot tub, exposed to water, then fine.. troll about safety. Otherwise, STFU, and go hack something!

    Those that cant hack, troll. go hack.

    1. I actually took the time to look at his code. I don’t think he should “hack” if he doesn’t really know how to program.

      Two interesting things:
      if (temperaturetempAdjustValue + 3 || !coverON)
      Maybe I’m getting old, but in my time that was the same as if(1)
      His program doesn’t ever call heaterOn!!!!
      It seems like this program is just all wrong. It shouldn’t work at all.

      1. Let me try to clear this up for you a bit, since heaterOn is called in the following line after the one you questioned. In the following section

        //Heat Limiter, Variable Adjust
        if (temperaturetempAdjustValue + 3 || !coverON)

        The first if statement determines that, if the temperature is below the set maximum, AND coverON is equal to 1, the heater turns on.

        In the second if statement, if the temperature is greater than the set value, PLUS 3 so that the heater doesnt turn back on every 5 seconds, OR if coverON is equal to 0, the heater is turned off. This is to make sure the heater does not turn on while the jets are running. The assumption here is, if the top of the hot tub is off, people are in it, and the jets are on. It would also be a waste of energy to have the heater on at this point.

      2. Ryan: You are wrong. heaterOff is called there. heaterOn is not!

        There is no such variable in the program, and even if there were, “temperaturetempAdjustValue + 3” would be false only if temperaturetempAdjustValue = -3. This program cannot possibly work.

      3. It worked in all initial testing. Before it was every wired to the hot tub I used a lamp. The code DOES indeed work exactly as intended. It may just not be written in a very optimized matter.

    2. +1 to what you say, but also +1 to @PWRX’s original warning. It’s just the nature of this project that someone would pop out a warning, and you could ignore it as redundant if you like.

      Unfortunately @Fool2cool had to troll with his response, so instead of just 1 warning, we now have 1 warning, 1 troll, and a bazillion responses.

    3. joeinbend: I can certainly hack, hence my warnings above. Maybe it wasn’t welcomed but ignoring what I said above, will provide a simple code recommendation.

      Hottub Guy: Considering enabling the built-in watchdog timer, then feed the dog in your main loop. That way if anything else hangs up, your chances of getting stuck in a ‘heater always on’ scenario by some unforeseen glitch are reduced a bit.

  7. lol, a tarduino-controlled human cooker / house burner downer


    maybe consider putting a (permanent) TCO (thermal cutoff) thermally connected to the water (i’ll leave the implementation to you) and electrically connected in series to the SSR trigger so that the heater cuts out and can no longer get turned on if something bad happens… assuming your POS chinatech SSR doesn’t experience a stay-on failure mode.

    throw on some redundant, independent safety features

  8. Like most projects its just a matter of following a few basic safety rules.

    to stop the tub overheating ( should the code crash) there should be a manual safety cut out, this is normally in the form of a fixed temp cut out , mounted directly on the heater tube ( A hot tub heater is just a element in a tube)

    to stop the trip activating when it shouldn’t most (if not all) hot tubs have a pressure switch so that the heater will only activate when the circulation pump is running, this stops the water boiling in the tube

    The tube is the number one safety feature…. the heater element is inside the tube and the tube is earthed, so if the element bursts there is a very short path to ground, which will trip the RCD, very important that the heater tube earth is maintained !

    an RCD Should always be fitted , most tubs have them internally anyway, mine has one built in , there is also one about a metre away from the tub on the isolator switch and one in my house fusebox too!

    in some countries its a requirement that the isolator is in plain view of the tub, but not close enough to be operated while your in it (makes sense !)

    so if you don’t compromise the basic safety rules, and lets face it most of them are already built into the design of the heater and the tub, I can see no reason why you cant replace the standard mechanical/ electronic controls with a super duper Arduino based controller.

    I have already started my own little project to this end.

    here is were I am at, at the mo………..

    the new controller will be house in the original controllers box and will use the original heater, over temp cut out and pressure switch these will be wired in series with the arduino heater relay, so there will be no issue with over temperature.

    the arduion will control the heater and all the pumps and lighting.

    the original topside display will be removed and a new one made out of a nice piece of Perspex, which will be machine from the underside to house a 4 line lcd and some waterproof tact switches I have purchases, when this is screwed into place it will be fully waterproof.

    the arduino is connected to two one wire temp sensors, one for the tub temp and one for the outside temp, a real time clock, a bank of relays and a GSM shield.

    once finished it will allow full control , send me SMS updates, and allow me to remotely set the temp.

    the hardware is already been tested and I am just writing the code, most of the basic hot tub functions are complete, just coding the SMS stuff.

    if anyone wants more details drop me a line

      1. Sorry I have not logged in for so long, my project had a bit off a stall, due to work commitments and a house move, but back on track now, had a bit of a re think and decided to add more features, upgraded the prototype to a mega 2560 £8, which has given me more I/o pins, flash and runtime ram, went around in circles for a bit with the sms, until I discovered that the serial buffer in the arduino is just 64bytes, software wise I have had to update a few libraries for the mega, and I still need to re write the user interface as I am not happy with it, now I have more I/O, I will use one one button rather than the ‘one wire many buttons’ method.
        as it stands I have SMS commands to change mode (frost, standby, run, rundown), set the temp, set the time from the sms, and report back its status, it replies by decoding the number from the incoming sms and uses it to send the status back.
        I still need to add some code to Register your phone number , just for security, and then I want to store some of the run time variables into the EEProm , so that if you cut the power and re apply it goes back exactly to the same mode and temp (just in case of a power cut)
        I have ordered some nice stainless waterproof push buttons, with integral led’s so I am nearly set to go from prototype to final build !

        1. Why use GSM for your UI? A web interface is more versatile, and very cool. We built a 5-foot deep, 5-foot diameter cedar barrel tub from a kit, including a natural gas heater. Adding computer control gave me a reason to take my first dip into html.

          I run a webserver on the arduino so I can check status and select the temp from any web browser (usually my phone). It shows water temp, user-selected target temp, whether the pump pump is running, whether the heater is running, and whether the computer is requesting the pump. Radio buttons allow selection of four presets from 102 to 106 F. The Arduino prevents heating if the water temp exceeds the computer-set target temp. To save energy, the user selection expires after 4 hours. Then the target drops to “idle” so the tub can’t fall below 50 F.

          The original mechanical timer still drives the daily 2-hour filtration cycle, and the original push button is still able to turn on the pump. The Arduino reads the water temp in the tub by a probe in a through-wall portal, so it knows the water temp even when the water isn’t circulating. When a user requests heat via the Arduino, the Arduino drives the pump via a a solid state relay I installed in parallel with the mechanical timer.

          Whether the pump is called by the timer or the computer, the heater will sense the pressure and try to heat the water, subject to the limit of the original mechanical thermostat. I’ve set that one to 108 F.

          The Arduino limits heat by means of a normally-closed relay in series with the pressure sensor. If the water temp in the tub exceeds the Arduino’s selected temp, the Arduino will open the relay to deny heat.

          In this way, all the original safety features remain in place, and if the Arduino is offline, the tub returns to normal operation. “Normal” means heating to the mechanically set temp whenever pump is running, even if it’s just running the daily filtration cycle. I figure we save about a dollar a day in heating cost for every day that the heater doesn’t have to run. And I love to reach for my phone before I get out of bed, set the tub for 105, and then confirm that it’s ready by the time I’ve showered and made my coffee.

Leave a 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.