Hot Tub Controller Circuit Board |
The controller is built to mount on top of a Raspberry Pi and does the following:
● Monitor the water temperature
● Turn a circulation pump and heater on to heat the water as needed
● Respond to buttons that increase/decrease the desired temperature
● Respond to buttons that turn the water jets on and off
● Display the current temperature
● Detect various failure modes and place system in safe mode
● Listen for commands from a smart phone app to control hot tub
● Detect various failure modes and place system in safe mode
● Listen for commands from a smart phone app to control hot tub
● Upload data periodically to an Internet of Things service
Temperature monitoring is performed by a waterproof DS18B20 from Adafruit. It uses a simple 1-wire bus to read the data.
The display, also from Adafruit, is a 7-segment LED display and is controlled using an I2C bus.
The device is powered by a 24V DC power supply since the relays on the hot tub are controlled by a 24V signal. A 5V step down regulator provides power to the Raspberry Pi.
Relay Control with LED Indicator |
The push buttons are connected to GPIO inputs which drive interrupts. These require "debounce" conditioning and this is explained in this post.
The Internet of Things support is using ThingSpeak and the method is described in this post. You can see the live data at this URL.
The system also listens on a network socket for incoming commands from a smart phone app that allows me to monitor and control the hot tub remotely. It's actually not an app, rather just a web page designed for a mobile screen. This way it can easily be used by my Android, my wife or son's iPhone, or from any web browser.
Here is a video showing the completed controller in action.
And, yes, I really do keep my hot tub that hot. One advantage of making my own controller is that I am not limited to 104 degrees max.
I uild something similar, perhaps u can use my code?
ReplyDeleteSee:
http://www.instructables.com/id/Hottub-Pool-Controller-Web-Interface/
Thanks, but I already have a system that works fine. Yours only controls one pump. Mine uses 3 and the heater relay must handle 220V 40A which is way more than relay board you use.
DeleteI do like that style relay board and use it in my home automation system.
Hey Ted! Perfect timing! I am resurrecting a hot tub. just got the power in and the fuses replaced and nada. I have put together a few pi projects but never any wiring projects so this would be perfect!
ReplyDeleteCan you post your materials list?
I will probably need some guidance along the way so hopefully your up answering a few questions (or many...).
thanks!
Link to code and material list should be in a new post soon.
Deleteexcellent, thanks ted!
DeleteTed, Hi. I have a similar problem with my hot tub and decided to have a go with a pi. It is many years since I did any programming or electronics, however I have managed to write a simple program in Python, to read temperatures (DS7B20) and operate relays, it's clunky but works. Is your program available for viewing or downloading. It might save me lots of time.
ReplyDeleteThanks
Steve from England
Look for a new post soon with more details of my hot tub project.
Deletegood work, I may look to mod this to do differential temperature for solar heating
ReplyDeleteBrilliant! I have an older Morgan hot tub that was given to me. I don't have an extensive electrical background, but have a Pi sitting on the shelf needing a job and I would love to be able to figure this out. The transistors, regulators, and resistors are where I'm going to get lost. Are you open to questions?
ReplyDeleteI can always answer questions. Well, almost always. And look for a new post soon with more details of my hot tub project.
DeleteAwesome! I'm going to start ordering some parts, but will hold off on the questions til I see the new post. Thanks!
DeleteHas anyone considered using a touch screen as the GUI? If so can I have your code please?
ReplyDeleteAny takers?
ReplyDeleteCurious, has the parts list been posted?
ReplyDeleteHi, this looks awesome and I'm looking at it for my first PI project. I've started with a lite raspberry pi install and worked out that I needed to install
ReplyDeletesudo apt-get install npm
sudo apt-get install python-pip
sudo pip install cherrypy
sudo pip install twilio
Running startup.py I get missing file errors. What is supposed to be in the following files?
/home/pi/alerts.json
/home/pi/filter.json
/home/pi/users.json
Thanks in advance
I have no idea. I have never used any of those packages. search Google or ask on https://www.raspberrypi.org/forums/
DeleteAlso, a hot tub controller is not a beginner project. The Pi programming is intermediate level but the actual wiring of the relays to control the hot tub, while straightforward, involves high voltage and high current (40 amps at 220V in my case) so it can be quite dangerous. If you do it, be sure to use relays that can handle that high a load.
DeleteVery well done. This is what I need. I've forked your GitHub and started to make some changes that will suit my requirements(Mostly single 2 speed pump verses you 2 2-speed jets and circulation pump) I was wondering if you would be able to provide the web page coding. I can get through C, PHP and HTML not so well...
ReplyDeleteThanks...
Hi! What is the original control panel used in the spa? Mine has a Balboa GS100 and I had the idea replacing it with my own.
ReplyDeleteI don't know the controller model. The hot tub is a Dimension One Californian.
DeleteAny chance you can share your Web page coding? I'm having difficulties getting the communication between the C and Web page
DeleteYes. I just haven't had time to write up a blog post explaining how it's done. Whn I p[ut the code on github, I will let you know.
DeleteBasically, I use Apache and PHP for the web pages and communicate via TCPIP sockets. I use PHP functions to connect to a C program that is listening on a socket. That allows me to have the web server on a different system.
The code for the Hot Tub Controller was already on github
Deletehttps://github.com/tedhale/hottub
Now I have added the web interface
https://github.com/tedhale/hottub-web-interface
The magic happens in "command.php"
Thank you
DeleteGreat project.
ReplyDeleteIs there any plan for expanding it with more pumps, ozone generator and led light control?
It would be pointless to expand it to more pumps than the hot tub already has and the ozone generator still works fine without my help. I have thought about LED lighting, but 99% of the time I prefer it to be dark.
DeleteOki. See your piont.
DeleteMy pool have 3 pumps so i just have to figure out how to solve that.
Hi Ted. There is no need for the external controller if you just use a Web interface to control the hot tub, correct?
ReplyDeleteControlling pool equipment with smart phone
ReplyDeleteI bought the smart pool timer from Thermomart in the following link,
http://www.thermomart.com/cellphone-wifi-app-google-alexa/Timer-Pool-Spa-Hot-Tub-Sauna
The product works. It’s good quality. It is easy to download the app and I paired it in 15 minutes.
This timer saves me $30-$50 a month and also I do everything on my cellphone or by voice (by Amazon Alexa, Google Assistant) from anywhere!
The Timer can be programmed as scheduled (24 hours 7 days with 8 events) or loop timers if you want to use more event every day. It has a countdown timer too.
It has a waterproof box and it is suitable for outside. I use the sharing system and now my wife can control the pool pump too.
Would definitely recommend purchasing.
Are you powering all pumps and the heater from a single 40amp 240volt gfci circuit?
ReplyDelete