Cal Spa Connector
In The Internet of Spas, I briefly explained how commodity IoT hardware could be used to connect a (dumb) spa to the Internet, using the empty RJ-45 port found on most Balboa spa controllers.
At that time, I only had the opportunity to connect the port to a logic analyzer to see the kind of messages the controller was sending. In a way, I could understand the current status of the spa but not control it remotely. In this post, I will document the complete interface and how you can control the various features similar to the Top Side display interface.
It all starts with the RJ-45 connector and what the various pins are connected to:

Pins 1 and 4 are power, nothing special about them. The controller outputs 5V, so no toying around trying to connect a 3,3V device directly to it, unless you want to fry it. If you do not need the power provided by the spa itself, make sure you are still connected to the ground pin or reading the display won't work.
All input pins expect a short high pulse to simulate a button push. For example, using an Arduino, you could toggle the spa lights on and off using:
Most buttons use a state machine similar to the Top Side display. To use Pump 1 highest speed, you would issue two pulses, similar to pressing the button twice. It also means that to cycle the pump on and off, you would have to issue 3 pulses.
The same applies to the temperature. In that case the state machine is quite complex, because pressing it twice might increment or decrement the temperature. You will also need to read the message sent to the display to discover if the current triggers increases or decreases the target temperature.
Last but not least, the display pins. As explained in the previous article, the controller sends a clock on Pin 6 and 3 7-bit bytes on Pin 5. From what I could measure, the controller sends a message every 16,5ms, or about 60 times per second. Those 3 bytes are what you can see on the display (7-segment coded digits) and some status bits. Format is as follow:
Usually you would measure the current temperature of the spa by simply reading those 3 bytes. However, this signal is also used to change the display when you press certain buttons as well as errors or general reminder messages.
For example, if you want to change the temperature, you would trigger Pin 8, wait for the display to go empty (
At that time, I only had the opportunity to connect the port to a logic analyzer to see the kind of messages the controller was sending. In a way, I could understand the current status of the spa but not control it remotely. In this post, I will document the complete interface and how you can control the various features similar to the Top Side display interface.
It all starts with the RJ-45 connector and what the various pins are connected to:

Pin 1 | Power | Vcc |
---|---|---|
Pin 2 | Input | Light |
Pin 3 | Input | Pump 1 |
Pin 4 | Power | GND |
Pin 5 | Output | Data (Display) |
Pin 6 | Output | Clock |
Pin 7 | Input | Pump 2 |
Pin 8 | Input | Temperature |
Pins 1 and 4 are power, nothing special about them. The controller outputs 5V, so no toying around trying to connect a 3,3V device directly to it, unless you want to fry it. If you do not need the power provided by the spa itself, make sure you are still connected to the ground pin or reading the display won't work.
All input pins expect a short high pulse to simulate a button push. For example, using an Arduino, you could toggle the spa lights on and off using:
pinMode(Pin2, OUTPUT); digitalWrite(Pin2, HIGH); delay(100); digitalWrite(Pin2, LOW);
Most buttons use a state machine similar to the Top Side display. To use Pump 1 highest speed, you would issue two pulses, similar to pressing the button twice. It also means that to cycle the pump on and off, you would have to issue 3 pulses.
The same applies to the temperature. In that case the state machine is quite complex, because pressing it twice might increment or decrement the temperature. You will also need to read the message sent to the display to discover if the current triggers increases or decreases the target temperature.
Last but not least, the display pins. As explained in the previous article, the controller sends a clock on Pin 6 and 3 7-bit bytes on Pin 5. From what I could measure, the controller sends a message every 16,5ms, or about 60 times per second. Those 3 bytes are what you can see on the display (7-segment coded digits) and some status bits. Format is as follow:
Byte 1 MSB | First digit (usually empty or 1) |
---|---|
Byte 1 LSB | Heater running |
Byte 2 | Second digit (middle) |
Byte 3 | Third digit (right) |
Usually you would measure the current temperature of the spa by simply reading those 3 bytes. However, this signal is also used to change the display when you press certain buttons as well as errors or general reminder messages.
For example, if you want to change the temperature, you would trigger Pin 8, wait for the display to go empty (
0x00 0x00
) and read the next available temperature. Then trigger Pin 8 again, see if the display goes up or down. If it's in the right direction, you toggle Pin 8 until you reach your target temperature. Quite an interesting state machine!
Trackbacks
Olivier's Blog on : Saving electricity with IoT
Show preview
This little box could help you save on your electric bill. Similar to many smart thermostats like Nest and Honeywell Lyric, this smart device helps you control how you use electricity for heat. In this case, it is not how you heat your house but rather
Comments
Display comments as Linear | Threaded
Will on :
I also have a Balboa 500z spa controller and am looking to do something similar. Would you be able to post up the components you used in your interface circuit between the spa and your arduino?
Kind Regards,
Will
Gintaras Digaitis on :
trying to figure out where to connect SDA and SCL pins... are they shorted with pin5 and 6 or they not needed at all? wanted to load code on esp32 but it seems not supporting sleep and power.h libraries... so i need to find uno + 8266 chips and maybe use blynk service for easy interconection... as im newbie and dont really understand whats in a code hope it works well... if not than going to buy BWA balboa module probably later on... but still hope to make hand made spaduino box on my own following your code... will you tell me please where to connect SDA and SCL pins please?
Jim Lyons on :
Matt on :