jeanl
Posts: 27
Joined: Wed Feb 22, 2017 10:48 pm

Re: Hot tub / spa / jacuzzi controller

Mon Sep 23, 2019 3:52 pm

mudley wrote:
Sun Sep 22, 2019 6:20 pm
Hi Jean,

I have a new hottub and want to add it to my home automation system.
I've got a similar spa (also Balboa, https://www.tubs.fr/balboa-gs510dz-cont ... -2306.html).

The control system has 2 free rj45 ports (probably for extra touch panels).

So I want to do the same as you did, but still investigating about the what and how.
I do have enough it knowledge, but a huge lack of electrotechnical background.

Do you know how I can find out if my control system also needs to have the 500 ohm resistors (or more, or less ohm resistors).

I want to hook it up to a RPi, but for that to work, I have to add an 5v relay to it right?
Kind regards!

Mudley
hi Mudley,.
First thing to do is to find out on the rj45 port(s) what does what. Some of the lines are used for buttons, and some are used for the display, but you'll have to find out which is which. Also there should be a +VCC and a ground line on these ports which you might be able to trace on the controller side. One way to do that is to measure the resistance between the rj45 lines and a known + or grnd point on the control board (with the board disconnected from power of course), I typically use the big capacitors that are used to filter the power supply, they're easy to identify and their polarity is well marked. Typically the - side of the capacitor is connected to the ground (which should be connected to one of the lines in the rj45 connector) and the + is typically connected to the +VCC which should also be connected to another line.
Once you have these two, you can start investigate some more.
One question though: your control panel seems to have lots of buttons. In the simplest setup, each button is connected to one of the lines, but it seems to me you have more buttons than you have lines, so this may not be the case. In your setup it's possible that there are two buttons associated to a given RJ45 line, one that pulls the line up to +VCC then other that pulls it to GRND, and the line is floating otherwise (some controllers do that).
J.

TLCary
Posts: 19
Joined: Wed Jul 25, 2012 2:45 pm

Re: Hot tub / spa / jacuzzi controller

Wed Apr 01, 2020 2:46 pm

I have an old Cal-Spa with a Balboa board with two top side RJ12 ports. J, thank you for sharing your work and knowledge. Do you think the protocol for the display is from the TM1637? What you describe sounds a lot like it. There are Arduino libraries to drive that that I could reverse engineer to decode the signal if it were. I have a notion that the display on my Hayward pool pump is the same, and would like to interface it in the same way.
And, is your code available for review anywhere? I'd use PIGPIO, but still... to see what you have done would be really helpful.

jeanl
Posts: 27
Joined: Wed Feb 22, 2017 10:48 pm

Re: Hot tub / spa / jacuzzi controller

Wed Apr 01, 2020 4:21 pm

TLCary wrote:
Wed Apr 01, 2020 2:46 pm
I have an old Cal-Spa with a Balboa board with two top side RJ12 ports. J, thank you for sharing your work and knowledge. Do you think the protocol for the display is from the TM1637? What you describe sounds a lot like it. There are Arduino libraries to drive that that I could reverse engineer to decode the signal if it were. I have a notion that the display on my Hayward pool pump is the same, and would like to interface it in the same way.
And, is your code available for review anywhere? I'd use PIGPIO, but still... to see what you have done would be really helpful.
I'll put my code on github, but I'm not too proud of it! It's pretty hacky. I'm not sure whether they use a 1637, it's quite possible and in that case you might be able to do something a lot cleaner than what I have. On my board, the code works on a RPI3, but not on a pi zero (it's too slow to keep up) BTW...

TLCary
Posts: 19
Joined: Wed Jul 25, 2012 2:45 pm

Re: Hot tub / spa / jacuzzi controller

Wed Apr 01, 2020 5:20 pm

Thanks! Let me know how to find it. I promise not to critique the code, :-) and I’ll share what I come up with.

TLCary
Posts: 19
Joined: Wed Jul 25, 2012 2:45 pm

Re: Hot tub / spa / jacuzzi controller

Fri Apr 03, 2020 1:49 am

I realized I have two RJ45 jacks (not RJ12). I pulled the board and I'll try to use a 12VAC power supply to bring it to life on the counter. I believe my top-side matches yours. Did you power the RPi3 from the 5V and GND from the cable? I also plan to run Homebridge on the RPi as well so I can ask Siri the temperature of the Hot Tub or tell her to turn on the jets. This should be a fun project.
Attachments
TopSide.jpg
TopSide.jpg (49.2 KiB) Viewed 582 times
cirucitboard.jpg
cirucitboard.jpg (117.91 KiB) Viewed 582 times

jeanl
Posts: 27
Joined: Wed Feb 22, 2017 10:48 pm

Re: Hot tub / spa / jacuzzi controller

Fri Apr 03, 2020 2:08 am

Similar but not identical. I don't have an "option" button, in fact I only have 2 buttons: temp and jets.
I didn't try to power the rpi from the board, I just left the original connection to it, but tapped out of that connection (so I could spy on the signals, and fake switches to simulate button pushes). I powered the RPI from its own power supply (to be on the safe side). But it's probably quite possible to power it from the main board.
It's going to take a bit of patience, but you can probably start by figuring out which lines correspond to the buttons. Be careful though, don't short anything directly. Use a resistor, so even if you mistakenly short + and ground, you'll get only 100mA of current, or less... That way you're unlikely to make any damage, but be careful!

TLCary
Posts: 19
Joined: Wed Jul 25, 2012 2:45 pm

Re: Hot tub / spa / jacuzzi controller

Fri Apr 03, 2020 2:54 am

Really appreciate your suggestions. I would have gone bull-in-a-china-shop and fried it. The other buttons use the other wires in the 8 wire, RJ45 connector. VCC, GND, Clk, DAT, Sw1, Sw2, Sw3, Sw4. No surprises. I'm using the PIGPIO piscope, (logic analyser) and working through it. Still, would appreciate a glance at your code. Thx - (Terry @ Cary.org)

jeanl
Posts: 27
Joined: Wed Feb 22, 2017 10:48 pm

Re: Hot tub / spa / jacuzzi controller

Fri Apr 03, 2020 3:12 am

piscope is the way to go. Good call. Let me put my code in github
The code that reads the temp is here:
https://github.com/jeanlaroche/rpi_stuf ... eadTemp.py

In particular readBinaryData() and decodeBinaryData()
At the time I wrote this, I didn't know pigpio, which would have been a *far* better solution (it's much faster, and you can watch registers etc), so the code is a bit of a hack, but it works for my Hot Tub. For example, I detect my own clock edges, which is completely silly as pigpio can does that right out of the box!

Have fun though, and don't hesitate to post about your progress!
Jean
BTW: It's funny to see the huge main board, when a tiny RPI could do everything the board does (and them some) (well, you'd definitely have to add the relays, but still).

TLCary
Posts: 19
Joined: Wed Jul 25, 2012 2:45 pm

Re: Hot tub / spa / jacuzzi controller

Mon Apr 06, 2020 6:50 pm

For anyone playing along:
Balboa 2100 Topside Interface
RJ45 Connector: Colors if you use a CAT5 T568B Cable
1 Orange Stripe Vcc (5V)
2 Orange Light
3 Green Stripe Jets
4 Blue Ground
5 Blue Stripe Data
6 Green Clock
7 Brown Stripe Option Button
8 Brown Temp Button
The 5V doesn't have quite enough Amperage to power the Pi. It keeps power cycling. Worth a try. PIScope was able to graph the voltage divided Clk&Data signals. I'll try to get Jean's Python to work and then work on moving it to PiGPIO

jeanl
Posts: 27
Joined: Wed Feb 22, 2017 10:48 pm

Re: Hot tub / spa / jacuzzi controller

Mon Apr 06, 2020 6:54 pm

TLCary wrote:
Mon Apr 06, 2020 6:50 pm
For anyone playing along:
Balboa 2100 Topside Interface
RJ45 Connector: Colors if you use a CAT5 T568B Cable
1 Orange Stripe Vcc (5V)
2 Orange Light
3 Green Stripe Jets
4 Blue Ground
5 Blue Stripe Data
6 Green Clock
7 Brown Stripe Option Button
8 Brown Temp Button
The 5V doesn't have quite enough Amperage to power the Pi. It keeps power cycling. Worth a try. PIScope was able to graph the voltage divided Clk&Data signals. I'll try to get Jean's Python to work and then work on moving it to PiGPIO
Don't sweat too hard on making my code work. It might be a lot easier straight in pigpio, but if by chance it works for you, it'll give you a good reference!
In my case I was lucky that the update frequency was relatively low (I don't quite remember the value though) so I was able to read the clock from python, but this may not be the case for you. And in any event it's really not what should be done! :)

TLCary
Posts: 19
Joined: Wed Jul 25, 2012 2:45 pm

Re: Hot tub / spa / jacuzzi controller

Mon Apr 06, 2020 8:20 pm

Python2 or Python3?

jeanl
Posts: 27
Joined: Wed Feb 22, 2017 10:48 pm

Re: Hot tub / spa / jacuzzi controller

Mon Apr 06, 2020 8:26 pm

TLCary wrote:
Mon Apr 06, 2020 8:20 pm
Python2 or Python3?
python2 I believe on this one. I haven't updated it for 3.

TLCary
Posts: 19
Joined: Wed Jul 25, 2012 2:45 pm

Re: Hot tub / spa / jacuzzi controller

Tue Apr 07, 2020 2:59 pm

Any idea what I'm looking at here? I'm not sure what to look for or where to start. :?
Attachments
Osc3.jpg
Osc3.jpg (125 KiB) Viewed 480 times
Osc2.jpg
Osc2.jpg (171.19 KiB) Viewed 480 times
Osc1.jpg
Osc1.jpg (129.92 KiB) Viewed 480 times

TLCary
Posts: 19
Joined: Wed Jul 25, 2012 2:45 pm

Re: Hot tub / spa / jacuzzi controller

Tue Apr 07, 2020 3:00 pm

And finally...
Attachments
Osc5.jpg
Osc5.jpg (180.68 KiB) Viewed 478 times
Osc4.jpg
Osc4.jpg (158.75 KiB) Viewed 478 times

jeanl
Posts: 27
Joined: Wed Feb 22, 2017 10:48 pm

Re: Hot tub / spa / jacuzzi controller

Tue Apr 07, 2020 3:49 pm

you're definitely on the right track! This is the kind of signals I was seeing when looking at my lines. One of the signals appears to be the clock (the one that fires regularly for 7 times then sleeps for a tiny while). The other one is the data. If it's anything like my HT, the data is 1 for each digit segment that's lit up.
It looks like you have 3 digits in your display (like me), so you have 3 bursts of clocks followed by a long pause. Each burst is for each digit display.
See this: https://en.wikipedia.org/wiki/Seven-segment_display

In osc5.jpg it looks like only 1 segment is on in the first digit (segment f), the second digit has the first 3 segments lit (which would display number "7") and the last has a,b,c,d lit up, which would be number "3".
In my display, the first digit can only show 1 or nothing (because the temp is either < 100 in which case the whole thing is off) or > 100 in which case "1" is shown, so they used on of the unused segments to indicate that the heater is on. This maybe why segment "f" is lit up in the first digit in your case.

If you can correlate that with the numbers that are shown you can figure out which segment is lit up by which clock edge.
Jean

TLCary
Posts: 19
Joined: Wed Jul 25, 2012 2:45 pm

Re: Hot tub / spa / jacuzzi controller

Tue Apr 07, 2020 4:01 pm

Jean. That's it! And just like yours the one segment that is on for the first display is actually a "Safety Suction" LED. Like yours they cheated and the first 7 Segment display can only really draw a "1" and used the other segments for LED control. Thanks again... and again... Should start to be straight forward from here on out.

TLCary
Posts: 19
Joined: Wed Jul 25, 2012 2:45 pm

Re: Hot tub / spa / jacuzzi controller

Tue Apr 07, 2020 4:06 pm

My RPi can't successfully pull the button pins high, but the 5V+ from the hot spay circuit board can. I believe I need to control a transistor with a GPIO pin and use it to provide the 5V from the circuit board to the button pins. The things is... All the schematics I see for controlling an external voltage source with a GPIO and a transistor do it by providing the external V+ to the load and using the transistor to determine when it gets a ground to complete the circuit. But that doesn't apply here... I need it to work more like a traditional relay. It feels like I'm not understanding something simple. Thoughts?

jeanl
Posts: 27
Joined: Wed Feb 22, 2017 10:48 pm

Re: Hot tub / spa / jacuzzi controller

Tue Apr 07, 2020 4:37 pm

TLCary wrote:
Tue Apr 07, 2020 4:06 pm
My RPi can't successfully pull the button pins high, but the 5V+ from the hot spay circuit board can. I believe I need to control a transistor with a GPIO pin and use it to provide the 5V from the circuit board to the button pins. The things is... All the schematics I see for controlling an external voltage source with a GPIO and a transistor do it by providing the external V+ to the load and using the transistor to determine when it gets a ground to complete the circuit. But that doesn't apply here... I need it to work more like a traditional relay. It feels like I'm not understanding something simple. Thoughts?
Ah yes, the rpi voltage is only 3.3V so it's possible that the rpi high isn't high enough for the line to go up.
In that case you need 3.3V to 5V logic converter. See this for example: https://electronics.stackexchange.com/q ... 3-3v-to-5v
One way to hack it is to pull the line up toward 5V using a resistor: Not too much so you don't trigger the circuit, but enough so the additional up from the rpi will be enough to trigger. I've done that in the past for relays that were supposed to be driven with 5V and didn't trigger on 3.3V. I added a pullup on the input of the relay: I tried several resistors until I found the right value were the relay still wouldn't trigger if the RPI was at 0, but would trigger if the RPI when to one. Definitely a hack, but it can work.

larryalehman13
Posts: 1
Joined: Sat Apr 04, 2020 8:05 am
Contact: Website

Re: Hot tub / spa / jacuzzi controller

Thu Apr 09, 2020 3:33 am

I found an utilized hot tub on the web, that is a few years of age and I concluded I can make a cool task out of it. The implicit controls were at that point irritating and tedious, so that gave me further motivation to tinker with it. So as to spare vitality, I bring down the pool temperature when not utilized, however in the event that I needed to utilize the hot tub, I needed to turn the temperature up 4 hours ahead of time. For instance of what I mean by saying irritating: In request to spare vitality, I needed to bring down the pool temperature when not utilized, however on the off chance that I needed to utilize the hot tub, I needed to turn the temperature up 4 hours ahead of time. Something else that happened was that by one way or another the flow siphon chose to turn on arbitrarily during the night - that would presumably have gotten leveled out on the off chance that I had perused the manual, yet as a tinker I like to detach the controls and utilize a Raspberry Pi rather - so here's my article "Open source hot tub controller."

Wellbeing Warning:

On the off chance that you likewise plan to tinker with your hot tub you ought to know about the dangers. While high voltage frameworks are fascinating tentatively, they can be risky, and if not treated with care, regard and insight, they can bring about lethal harming. There are a lot of aides online on the most proficient method to work securely with high voltage. On the off chance that you are not sure on what you are doing, stop now and go instruct yourself.

Parts:

Right now utilizing a UniPi 1.1, yet it doesn't need to be one, you could likewise utilize the Raspberry GPIOs with a transfer board, the UniPi proves to be useful to have a 1-Wire association also. The terminals, mounting rails and link trenches I use are a bit much but rather makes the bureau look spotless, one can improve that by wiring it straightforwardly. The UniPi needs a 5V power supply, I utilize a DIN rail mounted one with 3A yield current. The inherent lights are typically controlled with 15V, I've utilized a 12V force supply. As substitution of the old control board, I utilized a metal plate with 6 water safe press fastens.

Clean up the Cabinet
I am not reusing any of the implicit controller hardware, along these lines I am expelling them all.

My hot tub has the accompanying wires:

Dissemination Pump
Planes Pump
Blower
Warmer
Ozonator
Temperature sensor
Stream sensor
Supply
2x Display link

The clips on the PCB are named. It's a smart thought to stamp the links so you would know the motivation behind each link later on.

To make the wiring simpler, I took the entire bureau out. At that point I expelled all the parts, cleaned the ole thing and began with the establishment.

TLCary
Posts: 19
Joined: Wed Jul 25, 2012 2:45 pm

Re: Hot tub / spa / jacuzzi controller

Thu Apr 09, 2020 3:01 pm

In retrospect, building the entire system from the ground up would have been more straight forward than trying to interface with this beast, especially using a really sweet fully built interface/relay board. I just Googled that UniPi board, Nice, but pricey ($ 170 for a relay and interface board?). But the bigger problem is the 10Amp 240V relays on it, and a 5.5KW heater will draw more than that. Eventually I'll use your project and have to build or find a relay board that can handle the amperage. Nicely done... And definitely not "from the ground up" starting with all the work you have done. Thanks.

matevo
Posts: 6
Joined: Thu Apr 04, 2019 5:56 pm

Re: Hot tub / spa / jacuzzi controller

Thu Apr 16, 2020 10:15 pm

Great topic this. I managed to read the data from the display. I only have the problem of power supply. Ideally, I would have this come through the input from my balboa controller. When I connect the 5V and the GND to the raspberry, the Balboa controller starts to restart repeatedly. I then read the voltage with the multimeter, it is 5V. When I try to read the Ampere, the controller also starts to reboot. Does anybody have experience with this?

jeanl
Posts: 27
Joined: Wed Feb 22, 2017 10:48 pm

Re: Hot tub / spa / jacuzzi controller

Thu Apr 16, 2020 10:22 pm

mmm no, that does not ring a bell, but some power supplies are very finicky. Can you check these?
- You power the PI from the right input
- You don't have *anything* else connected between the pi and the main SPA board
- You don't have any type of shortcut, even in your measurement rig?

The way you describe it, it sounds like by even measuring the voltage you create a short that makes the board reboot.

I've seen the PI reboot when I plug some other device on the same power, but that's because the pi has no capacitor on its power supply so any dip in the voltage (cause for example by charging a cap in another device that you just plugged) can cause it to reboot.

But I've never seen what you describe.

TLCary
Posts: 19
Joined: Wed Jul 25, 2012 2:45 pm

Re: Hot tub / spa / jacuzzi controller

Fri Apr 17, 2020 12:53 am

I couldn't get it work. The 5V DC just isn't enough to run the RPi. The connector adjacent to the RJ45 has 12VAC. I cheated. 4 Transistors and a capacitor and got to 12VDC. From there I used a car plug-in USB charger.

I'm still polishing my implementation using PiGPIO. I'll put that up tomorrow.

jeanl
Posts: 27
Joined: Wed Feb 22, 2017 10:48 pm

Re: Hot tub / spa / jacuzzi controller

Fri Apr 17, 2020 1:12 am

TLCary wrote:
Fri Apr 17, 2020 12:53 am
I couldn't get it work. The 5V DC just isn't enough to run the RPi. The connector adjacent to the RJ45 has 12VAC. I cheated. 4 Transistors and a capacitor and got to 12VDC. From there I used a car plug-in USB charger.

I'm still polishing my implementation using PiGPIO. I'll put that up tomorrow.
That's a very good solution. In my hot tub, I cheated even more, got the 110 from the main board, and powered a wall adapter! :)

matevo
Posts: 6
Joined: Thu Apr 04, 2019 5:56 pm

Re: Hot tub / spa / jacuzzi controller

Sun Apr 19, 2020 4:48 pm

The signal from the spa is indeed not powerful enough. I solved this by using a PoE injector and connected the 5v and ground cable to the GPIO connectors.

At the moment I am still experiencing a problem with triggering the temperature button. As soon as I execute a pigio.write action on the temperature knob, it is triggered nicely. However, from that moment I can no longer operate the temperature button on the controller in the spa itself. Do more people have this problem or possibly a solution?

Return to “Automation, sensing and robotics”