1. Home
  2. /
  3. Projects
  4. /
  5. Wi-Fi-Enabled Controller for Hot Tubs
Integra Sources home button.

GET IN TOUCH

Wi-Fi-Enabled Controller for Hot Tubs

Custom software development Embedded hardware development Firmware development Internet of Things Mobile app development

Backstory

The customer's company produces hot tubs made of natural materials. Demand for these products is not always stable.

The customer wants to equip products with modern high-tech solutions to gain competition in their market segment.

In addition, the fact that users will be able to control their hot tubs using a mobile app should boost demand for the product and the company's sales.

Hot tubs remote controlled via mobile app

Request

The client contacted Integra Sources with a request to make a device that would allow customers to control hot tubs via smartphones.

The device is a Wi-Fi hot tub controller. It should be able to read data from various sensors and control the equipment inside the hot tub through a mobile application. 

We needed to automate the functioning of the device. Using the application on the phone, the user could control the filling, heating, circulation, and disinfection of water, lighting, and other functions.

The product must be certified according to the UL standard to be sold in the United States.

The client asked Integra Sources to design and prototype the control unit and develop a cross-platform application for iOS and Android to control the hot tub and see its settings.

It was important to meet the budget set by the customer and complete the project within the allotted time.

PCB of the control unit and a mobile application to control the hot tub and see its settings

Solution

The device we need to make supervises the pump, UV lamps, lights, and heater. The user can also control this device using the app on their phone and set the settings via Wi-Fi. The application connects to our device via Wi-Fi and can monitor and regulate all functions.

For hardware, we designed a PCB scheme and layout, found suitable components, and assembled the PCB.

To enable wireless communication with the mobile app, we used the ESP32-S2 Wi-Fi Microcontroller SoC. 

The device uses a low-voltage lamp that requires alternating current, so we couldn’t use a standard DC-to-DC converter. Instead, we had to mount an FS12-1600-C2 power transformer. The transformer is certified for operation in high humidity conditions.

To control the pumps and the entire power section, we use the G5LE-1A-E DC5 and G5LE-1A4 DC5 relays. These are simple and reliable solutions that are suitable for finished device certification.

We used a heat sensor to measure fluid temperature, as well as pump and valve control elements, a heater, and a cooler.
We also developed the firmware for the device and the mobile applications for iOS and Android.

The first version of the Hot Tub application (iOS platform, App Store screenshot)
Screenshot of the first version of the application in the App Store

The application connects to the device and shows its status. Using the application, you can turn the device on or off, set the heating temperature, and enable certain functions.

The application works via Wi-Fi. The device creates an access point to which the app initially connects.

Schematic diagram of the initial connection process to the spa controller

Going forward, we can connect to the device through the local wireless LAN. At the moment, we are working on the possibility of managing and interacting with the device through the MQTT broker via the Internet.

The device itself scans Wi-Fi networks and gives the list of networks to the end-user. Thus, the user can select a network.

Our programmers created the application using the cross-platform Qt framework. The application is written in C++ and QML. To create web requests and receive replies, we used the QNetworkAccessManager class.

We worked with the iOS SDK and Android SDK to build the application for the iOS and Android platforms.

Our team tested the functionality of the device and application following the requirements of the customer. 

The tester wrote test cases describing various situations. For example, when the water temperature drops to certain values, the motor for water circulation and heating should turn on. 

The specialist set the required conditions and monitored the device’s behavior to see if it matched the expected one.

Control unit printed circuit board and iOS application

Major Issues Resolved

The great deal was to find components that would enable the device to work properly and, at the same time, comply with UL certification requirements. The team had to choose relays and connectors from the list of UL-certified components.

The Scope of Work

  • Prototyping
  • Embedded hardware development
  • Firmware development
  • Mobile app development
  • Testing

Technologies Used

  • We used Altium Designer for schematics and PCB design.
  • We wrote custom firmware in C++ using Visual Studio Code
  • The CMake tools were applied to manage the process of the assembly of firmware files and libraries.
  • We chose the highly integrated, low-power, single-core Wi-Fi SoC ESP32-S2. It provides high performance, safety, and economy.
  • We used the ESP-IDF (the Espressif's IoT Development Framework) for creating firmware.
  • We used the FS12-1600-C2 power transformer due to the AC LED backlights in the customer's unit. The transformer steps down the voltage to 12V.
  • Motor drivers ZXBM5210 were chosen to automate the spa operation.
  • We built a cross-platform desktop application using C++, QML, Android SDK, iOS SDK, and the Qt framework.

Result

The team has built a prototype that meets the customer’s requirements. At the moment, we are expecting a new iteration to send it to UL certification. We are still working on the application development, as the customer requested to have remote access to the device via the Internet.

We expect our devices to make the customer's products technologically advanced. Users will be able to control their hot tubs using a mobile app. 

The ease of use of the application, combined with the high functionality of the device, should increase the demand for spa baths and raise the company's sales.