Redox (ORP) or Ph home automation control from a pool to Jeedom (€80)

 

After abandoning the chlorine for the benefit of a Salt electrolyser, I wanted to check the Redox and Ph from my pool. I would also like to take this opportunity to test whether the pump is running smoothly. Everything is sent to Jeedom.

Materials

  • Sonoff SV (8€) : Equipment brain, Wi-Fi link manager to Jeedom
  • pH/ORP 1130 adapter (€30): The link between the probe and home automation
  • Redox probe (35€)
  • Card ADS1015 (€1.5): Link I2C between analog inputs (e.g. probes) and Sonoff
  • OLED Display module 128X64 I2C (2€)
  • Optocoupler 220vAC / 5vDC (€1.5)
  • An adapter 220vAC/5vDC (3€)

As this tutorial is alive, I added:

  • A flow detector (dry contact)
  • A temperature sensor DS18B20 (8/10€)
  • A BMP280: I2C link that gives room temperature, pressure and humidity (not essential but so easy to add) (€1)

Operating principle

The Redox probe measures the Redox potential of the pool. The redox potential allows me to judge the water status of our pool (more or less oxidative depending on the concentration of disinfectant).

Note: Exactly the same logic is to follow if you want to measure a Ph value

This probe is connected by a BNC jack to the1130 Adapter.

The1130 Adapter unravels analog information in the form of voltage between -2000 mV and +2000 mV. This value corresponds to the Redox potential detected.

I chose to use a card ADS1015 to send via the I2C port the potential thus detected (SCL/SDA terminals) to the Sonoff SV

L‘OLED display allows you to display information in the pool area and check that the Sonoff’s Wi-Fi connection is good.

I recently added theOptocoupler 220vAC / 5vDC to find out whether the pool pump is working or not, indeed, when the water is not circulating, the Redox measurement is wrong.

Note: : Two solutions can be implemented to recover the output value of the optocoupler, either directly on a GPIO on the Sonoff either on an Analog entry of the ADS1015.

This flow detector which is nothing more than a dry contact gives 0=no flow and 1=water flows

This DS18B20 type probe will use a GPIO input to give the temperature of the water circulating in the network

This mini-circuit at a minimum price gives room temperature, pressure and humidity. It is not essential but so simple to add that it is a pity to deprive oneself of it.

Connection diagram of the assembly

 

Explanations, equipment by equipment

The Sonoff SV

I made the choice of Sonoff SV because it is powered by 5v, like most circuits of the project. It has a port I2C and also has entries GPIO easily accessible, I use GPIO4.

The Sonoff SV is flashed with a recent version of ESP Easy Mega, I did not do a tutorial specific to the SV (think of pressing the button when connecting the USB jack to be in programming mode), look my other tutorials on other Sonoffs, if someone has a problem, I will do a tutorial.

Note that it is necessary to let the rider or weld the two terminals surrounded in orange between them so that the 5v input mode is activated 

Setting up ESP Easy

Wifi
 
The controller to ensure the link with the Jeedom plugin
 Contoller Publish: device=%sysname%&taskid=%id%&cmd=%Valname%&value=%value%
Hardware side, we do the simplest
 
Devices
 
 Detection of pool power supply

The detection of the feed shall be carried out by theoptocoupler, there are two ways to retrieve this information:

  • Either directly on GPIO4
  • either via the ADS1015
Method 1: With GPIO4 entry

Thus, the device JusGPIO4:JusGPIO4 gives 0 when the pump is not working, and 1 when the pump is working, here is the configuration of this device:

 

Method 2: With entry A1 of ADS1015

The input A1 (Analog input – ADS1115) is the input that allows me to retrieve the value of the voltage coming out of the optocoupler.

It will be the Switch input JusPompe which will allow me to recover 1 when the pump is working and 0 when the pump is not working (basically, I transform the analog value A1 by a digital information 0/1 exploitable)

To retrieve the value of A1, I use the entry A1:

 A1 will return me a value close to the mV supply voltage when the pump is not working and a voltage close to 0 when the pome is working.

I therefore use the following rule to vary ‘JusPompe’

 

 Detection of the REDOX potential of the pool

Detection of Redox is coming from the probe via1130 Adapter on the Analog entry A0 from ADS1015.

Note that I have adapted the calibration of the probe in my own way !! with the formula above.

I explained myself, I measured the value that the probe indicated to me when the pool was well disinfected, I inferred that this is the value to be obtained. As soon as the Redox value increases (it increases when it is less good), I decrease the value. It is very empirical, it is up to you to do your own method. If anyone can find out how to find the value in mV given by the documentations, I am a taker, I did not find (the ideal value of the Redox is 650 mV).

Examples:

  • -2 is good,
  • -15, it lacks disinfectant
  • -30 is dramatic.

 

 Using the OLED display

It is very simple to use, I chose to display the value A0 in bulk on the display (in blue).

As well as the details of my Wifi connection (in yellow), here is what it gives:

It is really very simple to set up, here is the screen of the device:

 

Conclusion

A very empirical achievement that took me a long time.

I had left with a Sonoff Low to control consumption, but since the 220vAC part is not isolated from the internal bus part, I took a few squirts. The mass of the probe, for example, is found at neutral. I finally opted for the Sonoff SV which works in 5v, no more risk.

I had tried the current detectors to find out if the pump was working or not, it was unsatisfactory, too many disturbances around, hall effect detectors are not working well in the middle of other electronics. After testing relay-based solutions (a bit cumbersome to integrate), I found theoptocoupler, just great solution!!.

Use the comments below to make me clear what might block you, I quickly recapitulated with as many screenshots and as little text as possible to make it as visual as possible but it probably lacks some explanations. I will be able to do additional tutorials if necessary.

Leave a Reply