Home > Control Circuits >Complete list of remote control Circuits > How to Make a Hot Tub Smart and Remotely Operated with a Raspberry Pi

How to Make a Hot Tub Smart and Remotely Operated with a Raspberry Pi

Source: InternetPublisher:zht24 Keywords: Remote control control panel Updated: 2024/12/17

background

Is your hot tub heater a little sluggish? No way! Let's make your hot tub smart and remotely operated using a Raspberry Pi 3 and some wiring.

I found a used hot tub online that was a few years old and decided I could make a cool project with it. The built in controls were already annoying and time consuming to fiddle with, so this gave me a reason to tinker with it further. To save energy, I had to lower the pool temperature when not in use, but if I wanted to use the hot tub, I had to turn it up 4 hours in advance. As an example of what I mean by annoying: To save energy, I had to lower the pool temperature when not in use, but if I wanted to use the hot tub, I had to turn it up 4 hours in advance. Another thing that happened was that, somehow, the circulation pump decided to randomly turn on during the night.

Safety Warning

If you're also planning on tinkering with your hot tub, you should be aware of the risks. While high-pressure systems are fun to experiment with, they can be dangerous, and if not treated with care, respect, and intelligence, they can cause fatal injuries. There are many guides online on how to work safely with high pressure. If you're not sure what you're doing, stop immediately and educate yourself.

Supplies

For this project I used a UniPi 1.1 but it is not a must, you can also use a Raspberry GPIO with a relay board, the UniPi also comes in handy for 1-Wire connections. The terminals, mounting rails and cable ducts I used are not necessary but give the cabinet a clean look and can be simplified by direct wiring. The UniPi requires a 5V power supply and I used a DIN rail to mount one with an output current of 3A. The built-in lights are usually powered with 15V, I used a 12V power supply. As a replacement for the old control panel I used a metal plate with 6 waterproof buttons.

tidy

poYBAGKm7NCAAqw7AAYLcdn43oo389.png

I wasn't reusing any of the built in controller electronics so I removed them all.

My hot tub has the following wiring:

Circulation pump

Jet Pump

Blower

Heater

Ozone generator

Temperature sensor

Flow Sensors

2x Display Cable

The clips on the PCB are labeled. It is a good idea to label the cables so you know later what each cable is for.

To make the wiring easier I took the entire cabinet out. Then I removed all the components, cleaned out the old stuff and started the installation.

pYYBAGKm7MuAThibAAN0lrqTPMg629.png

Installation and wiring

I didn't reuse the original control panel. It could probably be integrated somehow, but since it only shows the temperature, it wasn't worth the effort. I also thought about installing a touch screen, but they don't work if your fingers are wet. So I replaced the control panel with a metal plate with 6 waterproof buttons.

poYBAGKm7MeAYCNkAAJPCgTJhpM023.png

The built-in temperature sensor is a temperature dependent resistor (PT100). Although the UniPi has an analog input that I could use to measure resistance, I thought using a 1-Wire temperature sensor would make my life easier.

For safety reasons, a second temperature sensor is installed inside the heater - to monitor the temperature of the heater and prevent it from overheating. This one is also replaced by the 1-Wire temperature sensor.

Now onto the actual wiring. First, I installed cable ducts in the top and middle of the cabinet, on the left and right sides.

Next I installed two DIN rails, one in the middle of the raceway and one 75mm below the middle raceway. I used self-tapping screws to mount all components.

On the lower DIN rail I mounted the terminals, relays and 5V power supply. As clamps I used rail mounted terminals with tension springs. On the left are the terminals for the power cables - 3x grey for 3 phases - 1x blue for neutral - 1x yellow/green for ground. Then for each of the other cables I added one grey, one blue and one yellow/green clamp. Some of the cables in the hot tub are a bit thick. I'm in Europe and the cable thickness standards there are different than in the US. The terminals have to be able to accommodate 6mm^2 for all connections.

To the right of the clip is the relay. The UniPi internal relay can only switch 5A, so it cannot be used directly to switch the load. I used a power relay with 230V AC control voltage, and now the unit is able to handle up to 4kVA.

At the left end of the upper DIN rail I mounted 2 potential distributors, one for GND and one for 12V+. The 12V+ is provided by the UniPi. Next to it I placed the UniPi 1.1 with a mounting plate for the DIN rail.

poYBAGKm7MKAazM_AASaP6Z9bNE793.png

I was lucky with the size of the cabinet and everything fit just right.

Now the fun begins - let's do the wiring. The wire colors are not standard. I used colors in the following way:

Black: 230V power supply

Red: 230V switched

Blue: Neutral conductor

Dark blue: 5V or 12V+

Dark blue/white: 5/12V GND

Green/Yellow: Earth/Ground

I used ferrules on each wire end, they are not needed for this clamp but it looks pretty.

I have 3 phases available and the main fuse is 16A Typ C. The heater has 10A and each pump has about 6A. So I distribute the load to all 3 phases. I use the first to power the control unit, ozone and blower, the second to power the heater and the third to power the two pumps.

pYYBAGKm7L2ABjS1AATjwlBj7aE998.png

The magnetic and flow sensors are digital, so I connected one end to 12V and the other to one of the digital inputs. The same thing happened with the buttons on the new control panel, connecting one solder tail to 12V and the other to a digital input. In total I used 8 of the 14 digital inputs on the UniPi.

In the original setup, the light was connected to an isolated light controller. Instead of reusing the light controller, I connected the ribbon cable directly to a 12V power supply. The light has an RGB LED, and I connected the red and blue LEDs to create a purple light. Disadvantage: I no longer have any fancy light effects, only purple light.

To improve the WiFi connection, I stopped using the original metal cover and replaced it with an acrylic cover.

poYBAGKm7LqAYwQxAAWn3axC5ig712.png

The hot tub has retaining clips on the lid so the wind won't accidentally open it. Of course, I forget to close these clips, so I installed a magnetic switch that notifies me when the lid is open.

So far so good, it's time to prepare the brain for action.

operating system

I use nymea to control the UniPi and BerryLan for the WiFi setup.

Get the latest nymea flavored Raspberry Pi Buster image here: https://downloads.nymea.io/images/raspberrypi/latest

After downloading, I flashed the SD card using https://www.balena.io/etcher/, inserted the SD card into the UniPi and turned on the hot tub. Since the latest image version does not require changing anything in the OS itself, BerryLan and nymea are pre-installed.

The default mode of BerryLan is "Offline", which means that the BT server starts when the Raspberry Pi is not connected to any network.

BTW: Using BerryLan one could set the Raspberry also to access point mode, so clients could connect directly to the hot tub without a router.

Ok, now the OS is good to go, we can move on to the final steps.

set up

I am using the desktop application from nymea:app. You can also install it on Android and iOS devices and control your UniPi in the same way.

The nymea plugin for UniPi is not pre-installed, so I installed the plugin using nymea:app:

Menu->System Settings->System Update->Install or Remove Software->nymea-plugin-unipi2->Install

Add a device

To tell nymea which UniPi is used, I need to add a UniPi type: Add Device -> UniPi -> UniPi 1 In my case - nymea UniPi plugin supports all Neuron, Neuron extension and UniPi device models.

After that I was able to add the relay output so nymea knew how much IO was available: Add Device -> UniPi -> Digital Output -> Select DO1 and name it "Heater"

I repeated these steps for all relays and set up the controls as follows:

Relay 2: Injection pump

Relay 3: Circulation pump

Relay 4: Blower

Relay 5: Ozone generator

Relay 6: Light

Then I added the input: Add Device -> UniPi -> Digital Input -> Select "DI 1" and name it "Flow Sensor". I repeated these steps for all the inputs I had:

Input 1: Flow sensor

Input 2: Cover sensor

Input 3: Button 1

Input 4: Button 2

1-Wire Temperature Sensor: Add Device->Single Wire Interface->Name to "Single Wire Interface"

Inside the 1-Wire Interface Device there is a toggle button "Auto-add 1-Wire Devices", I have enabled this option so the 1-Wire Temperature Sensor will be automatically added.

Last but not least, I added 2 toggle buttons. They are not really devices but more like "statuses". This helps me use them later in my "Favorites" list so that I can quickly toggle everything on or off.

Add Device -> nymea -> Toggle Switch -> Name: Summer Mode "Summer Mode" completely deactivates the heater during the summer months. Add Device -> nymea -> Toggle Switch -> Name: Ready Mode "Ready Mode" switches the target temperature between 37°C (Ready) and 29°C (Not Ready).

Adding some magic

A "magic" is basically a set of rules that instructs nymea to do things automatically.

If Ready Mode is on and Summer Mode is off and the temperature is below 37°C, the heater and circulation pump will be activated, otherwise they will be deactivated.

The heater and circulation pump will start if Ready Mode is off and Summer Mode is off and the temperature is below 29°C, otherwise they will be deactivated.

If the circulation pump is on and the flow sensor is not on, an alarm is sent.

If the water temperature drops below 3°C, an alarm is sent.

If water temperature reaches 37°C, send notification "Hot tub is ready"

If the magnetic sensor is off, then send a notification "hot tub lid open".

The injection pump was turned on between 10:00 and 10:15.

If button 1 is pressed, the blower is turned on/off

If button 2 is pressed, the injection pump is turned on/off

If button 3 is pressed turn the light on/off

If button 4 is pressed Play/Pause Denon Heos (external device)

If button 5 is pressed Turn Philips Hue on/off (external device)

If button 6 is pressed, all lights are turned off (external devices)

Setting up a remote connection

I don't use my hot tub every day, so I don't have a "heat" rule set up. Sometimes, when I get home from get off work, I just want to jump in as soon as possible, so I turn on the heater in advance using the remote connection. My hot tub heats up at a rate of about 2 degrees per hour. I usually keep the temperature at 29° in idle mode, so I have to turn on the heater 4 hours in advance. PS.: Some people think that heating a hot tub requires more energy than keeping it at temperature all the time, but I've checked and this is not the case on my side.

The remote connection settings also have push notifications enabled, so you can get cool notifications like this:

poYBAGKm7LKACJWnAARB_U8p8Hk708.png

Now I can turn each pump on/off, set the hot tub mode to "Ready" or "Summer," check the temperature, and switch the blower.

pYYBAGKm7K-AbSZyAAUg_L00qDA843.png

That's it, the hot tub is ready - I love to open the pool from the comfort of my couch or on my way home from get off work. For those lazy Sunday mornings, I set specific timers so I can take a dip before breakfast.

poYBAGKm7KqAA39XAAChvRlZDAU454.png

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号