Post for August 30th, 2014

The EZO Conductivity Circuit

I had reviewed an older version of Atlas-Scientific’s EC Stamp in this blog post. Since then Atlas-Scientific sent me the latest version – the EC EZO.

The EZO – slick packaging, coated for waterproofing

Information and more documentation can be found at this web site.  The product sheet notes this is the 6th version.  Also, the customer scenario has become more focused from the web site:

“Whether you are manufacturing robots, process equipment, sensor arrays, or handheld equipment, Atlas Scientific™ brings you the power and flexibility of a laboratory grade conductivity meter, designed exclusively for robotics.”

Given these statements, this circuit should be far more accurate than what is most likely “good enough.”  Where “good enough” is helping to grow healthy plants through hydroponics.

Communications between the Arduino and the EZO happen either over UART or I2C.  Since UART is the default and simplest method, I will use UART.


The EZO has an RGB LED on the upper left side.  It is useful for determining the status of the board.  The different states  are discussed on page 6 of the data sheet.

Wiring Up

Time to set up the prototype on a breadboard.  Here’s the wiring diagram Atlas-Scientific provides in the data sheet:


Since the EZO supports I2C, I went ahead and followed the instructions to switch the EZO into I2C mode.

The Firmware

I will be using the Arduino sketch found here.  I like it’s simplicity.  Feed in a command from the data sheet and the firmware sends the command to the EZO stamp.  Any responses are printed on the serial monitor.

Sending an I to the EZO through the serial monitor returned


Terrific – a NEW YIPPEE moment…the breakout board is working!

The first thing I needed to do was to set the probe to K=0.1 (I discuss K in this post) by typing in K,.1 in the serial monitor.  According to Atlas-Scientific, if the K value of the probe is 0.1, it can accurately measure salt content between 0.0005mS to 50mS – or .5µS to 50,000µS.  

Now I’m all set to calibrate.

But….I am lazily ignoring temperature in calibrations and in readings for this round of learning.  While it is an important step, I assume (perhaps falsely) that while temperature will definitely affect the quality of the E.C. readings, for these tests I am not as interested in accuracy as I am in the general workings of reading E.C. values.


Before reading values for E.C., the firmware on the Arduino is calibrated using a known quantity – in this case a solution with a known amount of salt.  And as with pH, the quality of the probe as well as the amount of salt in a solution will determine how far off calibration the firmware is.

After reading the advice in the data sheet (starting on p. 9), I am going to do a two point calibration: “A two point calibration can be used to monitor the conductivity of water over a wide range.”

On the first page of the data sheet, Atas-Scientific advises: “Calibration required only once per year.”

There are three readings I must take.  Two require solutions that have a known amount of salt.  The probe came with two solutions – has a known amount of salt – 10,500µS and 40,000µS:

AS Calibration Solution

Using the command from p. 21 of the data sheet,  The first command I send to the serial monitor is:


Return String


















Probe in 10,500µS solution.  Stirred probe and let sit for 1 minute before reading.




rinsed probe off in filtered water then put in 40,000µS solution.











EC Probe Calibrating

Now I need to figure out what the string returned when the probe was in the 10,500µS (7162,3867,3.93,1.003) solution and in the 40,000µS solution (39390,21272,25.09,1.019). According to p. 16 of the data sheet, the string returned is in the format:


The probe read an EC of 7,162 for the 10,500µS solution which translates to 3,867 TDS (Total Dissolved Solids). I ignore the other two readings since I do not use them. It would take me awhile to research what these two numbers mean and I’d rather spend time focusing on E.C. values.

E.C. Level in Nutrient Bath

The next step in this adventure is to fill a nutrient bath and adjust the E.C. level until it is within the range for growing healthy lettuce – the plant I am interested in growing such that every day I have enough lettuce for a fresh salad.  I’d like to say everyone in my family shares my enthusiasm for this accomplishment…but…um…sadly…. yet on to the most tasty lettuce I can grow hydroponically with fancy shmanzy (yah – not a word) electronics thrown in to support my tendencies for laziness.

Dr. Resh is a trusted expert in hydroponics.  From his post on hydroponically growing lettuce:

The EC of most lettuce formulations will be between 1.5 and 2.0 mS.

Other sites note a slightly different level.  I will start off with maintaining an EC level between 1.5 and 2.0mS.


I will be using the Aqua Vega nutrient mix I bought a while back.  I have it on hand based upon a recommendation I received months ago on the /r/hydro subreddit.  The markup on liquid nutrients is phenomenal.  Given what I know from mixing nutrients for my tomatoes, it has to be in the range of 1,000x!  So in the future I will figure out a chemistry and mix that.  Still, it is awfully easy to just use pre-measured/pre-made.  I equate it to eating a frozen dinner to cooking the same meal…

E.C. Level

I’m interested in growing lettuce so I will target the range of E.C. levels for lettuce.  Dr. Resh is a trusted expert in hydroponics.  From his post on hydroponically growing lettuce:

The EC of most lettuce formulations will be between 1.5 and 2.0 mS.

While other sites will note slightly different levels, I will start off with maintaining an EC level between 1.5 and 2.0mS.

Reservoir Setup

I will be using the same reservoir I used to test pH readings, a 3 gallon Rubbermaid bucket I got at a local department store:


I built a prototype hydroponics system that pumps the nutrient path through a hose and out through feeder hoses into 2” net pots.  The hose then cycles the nutrient bath back into the reservoir:

Proto Hardware Setup

The brown box in the middle contains an EZO circuit.  There is also a peristaltic pump attached that I used to automate pH levels.  I will eventually explore automating E.C. additions into the nutrient bath using this pump:

EZO Circuit in prototype

E.C. Readings

I will be adding nutrients until the nutrient bath is within the range of 1.5mS to 1.0mS.  For comparison, I will also take measurements with my TDS tester I got awhile back.  Since E.C. values are converted to TDS, it is unfortunate that the tester I have does not return results in E.C.  I’m assuming that both the EZO and TDS tester convert EC to PPM by multiplying the EC (mS) by 500.

When I multiple .04960mS * 500ppm, the result is a TDS value of 24.8ppm – less than the expected 26 recorded by the probe (see first reading).  I assume the algorithm Atlas-Scientific uses is more sophisticated than just adding 500ppm.  After all – Atlas-Scientific charges a premium for their expertise.  Since TDS will not be a measurement I will be making in the future I will not investigate this discrepency further.

The TDS level for a healthy lettuce range given the E.C. range is 1.5mS to 2mS = 1.5*500 to 2*500 = 750ppm to 1000ppm.  I will now mix up the nutrients and start adding in increments that I think will get me closest to these values without adding too much.  A member of my family just waled past where I was mixing the nutrients and made the comment “smells like pee, are you mixing chemicals again?” …um… The label on the nutes state the dosage to be 20mL/10L or 8mL/gallon.  I’m using a 3 gallon reservoir so the first addition will be around 24mL.  I’ve added 20mL in and turned on the pump to circulate the bath.  I also added a small air stone and air pump I picked up at petco awhile back.  I’ll wait about 15 minutes before measuring the E.C. so that the bath has enough time to mix up the nutrients.  I’ll take 5 readings in sequence to get a feel for the variability of results.  Most likely the smart folks at Atlas-Scientific have applied a smoothing algorithm of some type so my expectation is the E.C. values of the readings will be close together.

State of nute bath

E.C. (EZO) µS

TDS (EZO)ppm

TDS (tester)ppm

no nutes added




+20mL (5 readings)








After adding 20mL of nutes and waiting over 15 minutes, the E.C. measured about 607 from the EZO, the TDS measured around 327.  The TDS tester did not read as smooth measurement, ranging from 329 to 349.  The standard deviation of the EZO TDS readings is .4.  The standard deviation of the TDS tester is much higher at 6.76.  The folks at Atlas-Scientific did indeed enhance their firmware with a proprietary E.C. measuring technique that accommodates the not only the noise in the circuit but also the variability across reading from a probe of less quality.

Now that I feel I have a “good enough” comparison between the two meters, I am going to focus only on E.C. readings.

I need to get the E.C. to between 1,500µS and 2,000µS.  It is currently around 607 (+/- .4).  If I target the half way value of 1,750µS, The E.C. needs to be raised by 1,143µS. This is 1.88 times the value of the current reading.  Since 20mL raised the E.C. from 50 to 607 : 557µS or about twice as much nutrients.  This time I’ll add 40mL of nutes and rerun the tests.

After adding an additional 40mL of nutes, the E.C. reading from the EZO was around 1895.  Given my past experience with adding nutrients or adjusting pH (even worse since the pH scale is logarithmic!), I am fine with this being a healthy amount of nutrients to start growing lettuce with.  While not by much, the E.C. readings were a little bit more variable than the first time.  I do not see the slight variability as being significant.

So that’s it for now!

What’s Next

I want to run similar tests with SparkysWidgets minieC (latest version).  And…sigh…I’ll keep redoing the Wien Bridge Oscillator bread board until the darn thing works!


Thank you for reading this far.  Please find many things to smile about.