I just passed a YIPPEE! moment…I’m able to calibrate and read pH values from a Ladybug Blue Lite using my iPad. While the code is definitely prototype, the nRF51822 firmware talks quite well with the iOS app written in Swift. By the way, did I mention how delightful it is to code in Swift? I could wax on about the wonders of Playgrounds and the sheer brilliance that went into the entire iOS development environment. But that is not what this post is all about.
I have not spent time on EC calibration. It is time I did.
The Goal of this post is to walk through the thought process and design of how EC calibration will be done for Ladybug Blue Lite EC probes.
Thanks To Those That Went Before
- A huge thanks to Apple for the delightful Swift language. I get these mini explosions of excitement every time I dig deeper into Swift…like the power Swift has given enums….who woulda thought? Well – certainly them!
- As always, a huge and warm thanks to Chris Gammell and the team at Contextual Electronics. I would not be able to do this stuff without Chris and the Contextual Electronics courses.
How EC is Measured
EC is a measurement of conductivity. EC measurements are given in Siemens/meter (or in my case µS/cm). But an EC reading measures Siemens (µS). A measurement of Siemens is a measurement of conductance. The dependency relationship between Conductance (represented by G), voltage, and current is G=I/V=1/R (since -as we all know- according to Ohm’w law: V=IR). As I have noted in previous posts, the EC circuit measures resistance. G is then calculated from 1/R.
To go from µS to µS/cm, the geometry of the two electrodes making up the EC probe need to be known. A common ideal geometry for an EC probe is this one:
As noted here: The conductance depends on the total concentration of ions in the solution as well as on the length and area of the solution through which the current passes. Thus, even if the concentration of the ions remains the same, the conductance will change if the length or area of the current path changes.
What this means is the length/area of the electrodes need to be taken into account.
EC = G*(distance between the electrodes)/(the cross-sectional area of an electrode – i.e.: each electrode is identical). (The Distance) / (The cross-sectional area) is referred to as “K” or “the cell constant.”
Calibration is calculating the actual K value from an ideal K value. The ideal K value for the probe I am using = 1. Using a calibrated EC solution of 1413µS, my probe should measure 1413µS. But it measured 1188µS. Since (EC measurement read) * actual K = 1413µS/cm, 1182*(actual K) = 1413 or actual K = 1.19.
What is used for the actual K value of an EC probe is the K slope.
From this post
Two Points Are Better Than One
In my earlier calculation, I used one point calibration. While a one point calibration can be used, the K slope value will be more accurate if two EC calibration solutions are used. This is similar to the pH calibration method in which I use a pH4 and pH7 calibration solution to calculate the probe’s variance from an ideal probe.
The Ladybug will support up to two EC calibration readings to calculate the EC probe’s K value.
OKIDOKIE…that’s it for now. THANK YOU for reading this far. Please find many things to smile about. Just smile.