# RS-485 bus

The pool controller uses a “RS-485” bus to communicate with devices such as the pump and chlorinator. This is an industry standard two-wire bus with differential signaling. Devices are daisy-chained with 120 Ω termination resistors on both ends to limit reflections.

By snooping the traffic on this bus, we can learn about the status of the controller. We can also observe commands that the controller sends to the devices and the subsequent responses that it receives.

## Inside the controller

The easiest place to access the bus is from the inside of the pool controller.

THIS PROJECT IS OFFERED AS IS. IF YOU USE IT YOU ASSUME ALL RISKS. NO WARRENTIES. PROCEED AT YOUR OWN RISK! Always make sure to at the very least turn off the power while working on your pool equipment. Work carefully, THERE IS ALWAYS A RISK OF BREAKING YOUR POOL EQUIPMENT.

That being said, the RS-485 header can be found on the back of the control board. There are most likely wires already connected that go to devices such as the pump and chlorinator.

To minimize electromagnetic interference, use two twisted pairs from something like a CAT-5e cable to connect the A/B pair and the +15V/GND power pair to the interface as shown in the table below. To minimize the risk of shorting the power, you probably don’t want to connect the power signal just yet.

Controller RS-485 Cat5
Com Port Name Name Idle state Wire Pair
Green -DATA A negative pair 1
Yellow +DATA B positive pair 1
Red +15 V n/a pair 2
Black GND n/a pair 2

## RS-485 connection

With our cable connected, we can examine the signals. The shortest pulse length is about 104 µsec. From this, the data rate follows as 1/0.000104 = 9600 baud. The exact flavor of the data bus is shown below.

Name Value
baud rate 9600
data bits 8
parity none
stop bits 1

Such a low data rate implies that we don’t have to be very concerned about daisy-chaining the devices. In other words, it is OK to just wiretap the signal on the controller.

When we connect the differential signal to a RS-485 transceiver such as the MAX485, we get regular TTL levels.

## TTL to CMOS signals

The microcontrollers that we consider use CMOS voltages (3.3 V). For the prototypes, we used an existing breakout board, but replaced the MAX485 with a MAX3485 chip. While we’re at it, we’ll also remove the 10 kΩ CMOS pullup resistors (R1R4), but leave the RS-485 bias and bus termination resistors.

Knowing about the interface and baud rate, we can move on to building a system that interprets the proprietary message protocol. Continue reading to learn about the hardware design.