Building bbPool

The needs

As for poolDuino, I want to measure :

  • water pH, ORP and temperature
  • air temperature

and report that on my emoncms web site.

The hardware

Connecting temperature sensors to the BBB…

and reading the values…

Information for those two temp sensors can be found here for DS18B20 and here for AtlasScientific ones.

Connecting pH and ORP sensor

AtlasScientific pH and ORP stamps are using simple asynchronous serial communication protocol. For communicating with them, we will use 2 of the 4 UARTS available on the Beaglebone, UART1 & 4.


Enabling UARTS

First, you need to enable UARTs 1 & 4. That’s easy :

Yeah… I know, but that’s easier like that : don’t need to type sudo before each command. But keep in mind you are root and you can destroy your Ubuntu. So think before you type !

Here, we can see UARTs are not enabled. So let’s enable them.

Reading from UART

I am a perl fan… so I’ll show a perl example, no python as I don’t know python and there is a handfull of examples using python…

I used Device::SerialPort library which is quite handy.

Code is here on GitHub. This code sets pH stamp in continuous reading and reads output every second.


I now have a Beaglebone connected to 2 temperature sensors, an ORP and a pH stamp, and I can read all those sensors value 🙂

I am working on a web GUI to display the information, send the info to my emoncms website and be able to configure the gizmo. So stay tune !


Let’s build a pool monitoring system : poolDuino

Because my parents have a quite expensive pool monitoring system that is not even able to grah collected data, I decided to have a look at what I can do.

What do I need to measure ?

  • pH
  • ORP (redox)
  • temperature

Well… temperature is easy. There are plenty of easy to use sensors available. It becomes a bit tricky for pH and ORP. Actually, you can’t just connect an ORP or pH sensor directly to an Arduino as you would with a temperature sensor. pH and ORP probes are generating very small voltage and current. Their output needs to be amplified quite a lot.

As I am not an electronics specialist, I desperately looked for some “pre-build” pH and ORP sensor that would be quite easy to use. There are quite a few very nice and smart projects around :

  • LeoPhi : only pH though, no ORP
  • phDuino : still only pH
  • Arduiarium : got pH, ORP, EC,  1wire, I2C… a bit of an overkill for what I needed
  • and probably many more…

I finally found Atlas Scientific pH and ORP stamps : not that expensive (before I had to pay VAT on parcel collection plus a fee… for VAT collection !), very nicely build, small, easy to use… Exactly what I needed.

orp&ph 640x480

I then build a first prototype using an Arduino Ethernet. Not that I will be using ethernet capability but it has an SD card slot so that I could record collected data on a 2Gb SD. I would just have to connect the Arduino to a power source and plunge the 3 probes in the pool.

PoolDuino 640x480

I left the probe for around a day and a half running and took the SD card back, loaded the data into a Google Fusion table which gives the following results :

[iframe width=”510″ height=”100″ scrolling=”no” frameborder=”no” src=”″]

[iframe width=”510″ height=”100″ scrolling=”no” frameborder=”no” src=”″]

[iframe width=”510″ height=”100″ scrolling=”no” frameborder=”no” src=”″]

Works great ! The pH drop is due to adding (a bit too much) pH minus solution as pH was a bit high.