{"id":96,"date":"2018-12-28T19:37:46","date_gmt":"2018-12-28T10:07:46","guid":{"rendered":"https:\/\/sighmon.com\/says\/?p=96"},"modified":"2021-07-03T10:49:27","modified_gmt":"2021-07-03T01:19:27","slug":"atlas-k-1-0-conductivity-sensor","status":"publish","type":"post","link":"https:\/\/sighmon.com\/says\/atlas-k-1-0-conductivity-sensor\/","title":{"rendered":"Atlas K 1.0 water conductivity sensor"},"content":{"rendered":"\n<p>Connecting an <a href=\"https:\/\/www.atlas-scientific.com\/product_pages\/kits\/ec_k1_0_kit.html\">Atlas Scientific Conductivity K 1.0 sensor<\/a> to an Arduino.<\/p>\n\n\n\n<p>First of all, let me just say that I <strong>adore<\/strong> the packaging of the EZO conductivity and power isolation circuit boards. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/atlas-scientific-ezo-ec-voltage-isolater-circuit-board-1024x768.jpg\" alt=\"\" class=\"wp-image-99\" srcset=\"https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/atlas-scientific-ezo-ec-voltage-isolater-circuit-board-1024x768.jpg 1024w, https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/atlas-scientific-ezo-ec-voltage-isolater-circuit-board-300x225.jpg 300w, https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/atlas-scientific-ezo-ec-voltage-isolater-circuit-board-768x576.jpg 768w, https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/atlas-scientific-ezo-ec-voltage-isolater-circuit-board-1568x1176.jpg 1568w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>They arrived in two adorable little cryogenic chambers.<\/figcaption><\/figure>\n\n\n\n<p>They were a lot smaller than I expected, which is a nice surprise, as it&#8217;ll mean a smaller end product once I&#8217;ve packaged them all into a box.<\/p>\n\n\n\n<p>The <a rel=\"noreferrer noopener\" href=\"https:\/\/www.atlas-scientific.com\/_files\/_datasheets\/_circuit\/EC_EZO_Datasheet.pdf\" target=\"_blank\">EZO Conductivity Circuit Datasheet<\/a> is more like a getting started guide, so I followed that first.<\/p>\n\n\n\n<p>Finding a spare breadboard, I wired the EZO board to the voltage isolator (which is optional so that any other devices don&#8217;t interfere with the conductivity sensor), and then to an Arduino Mega. I thought it better to test it with a plain Arduino before migrating over to The Things Uno, as I haven&#8217;t looked into whether the standard serial pins are still usable or not.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The <a href=\"https:\/\/www.atlas-scientific.com\/_files\/code\/Arduino-mega-EC-Sample-Code.pdf\">Arduino Mega wiring diagram<\/a>.<\/li><li>The <a href=\"https:\/\/www.atlas-scientific.com\/_files\/code\/Arduino-mega-EC-Sample-Code.pdf\">Arduino Mega sample code<\/a>.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"508\" src=\"https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/arduino-mega-atlas-scientific-conductivity-k1.0-water-quality-sensor-wiring-diagram-1024x508.png\" alt=\"\" class=\"wp-image-97\" srcset=\"https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/arduino-mega-atlas-scientific-conductivity-k1.0-water-quality-sensor-wiring-diagram-1024x508.png 1024w, https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/arduino-mega-atlas-scientific-conductivity-k1.0-water-quality-sensor-wiring-diagram-300x149.png 300w, https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/arduino-mega-atlas-scientific-conductivity-k1.0-water-quality-sensor-wiring-diagram-768x381.png 768w, https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/arduino-mega-atlas-scientific-conductivity-k1.0-water-quality-sensor-wiring-diagram-1568x778.png 1568w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Wiring diagram without the power isolator.<\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"505\" height=\"1024\" src=\"https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/atlas-scientific-conductivity-k1.0-sensor-wiring-diagram-with-voltage-isolator-505x1024.png\" alt=\"\" class=\"wp-image-98\" srcset=\"https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/atlas-scientific-conductivity-k1.0-sensor-wiring-diagram-with-voltage-isolator-505x1024.png 505w, https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/atlas-scientific-conductivity-k1.0-sensor-wiring-diagram-with-voltage-isolator-148x300.png 148w, https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/atlas-scientific-conductivity-k1.0-sensor-wiring-diagram-with-voltage-isolator.png 681w\" sizes=\"auto, (max-width: 505px) 100vw, 505px\" \/><figcaption>Wiring diagram with the power isolator.<\/figcaption><\/figure><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/atlas-scientific-conducivity-sensor-wired-up-to-an-arduino-mega-1024x768.jpg\" alt=\"\" class=\"wp-image-100\" srcset=\"https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/atlas-scientific-conducivity-sensor-wired-up-to-an-arduino-mega-1024x768.jpg 1024w, https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/atlas-scientific-conducivity-sensor-wired-up-to-an-arduino-mega-300x225.jpg 300w, https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/atlas-scientific-conducivity-sensor-wired-up-to-an-arduino-mega-768x576.jpg 768w, https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/atlas-scientific-conducivity-sensor-wired-up-to-an-arduino-mega-1568x1176.jpg 1568w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Atlas Scientific Conductivity K 1.0 connected to an EZO board, via a power isolation board, to an Arduino Mega.<\/figcaption><\/figure>\n\n\n\n<p>With everything connected I uploaded the sample code to the Arduino, opened the serial monitor and out came my first data!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EC:0.00\nTDS:\nSAL:\nGRAV:<\/code><\/pre>\n\n\n\n<p>Noticing that the TDS (total dissolved solids), SAL (salinity) and GRAV (specific gravity) values were all blank, I followed the guide a little longer to see that they&#8217;re all off by default. Setting these to return values is as simple as sending the following commands via the Arduino IDE serial monitor:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Turn on TDS (capital letter O, capital letters TDS, number 1, separated by commas)\nO,TDS,1\n\n\/\/ Turn on SAL\nO,S,1\n\n\/\/ Turn on GRAV\nO,SG,1<\/code><\/pre>\n\n\n\n<p>Once you send a command you should see the return value: *OK<\/p>\n\n\n\n<p>Then the output will look more like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EC:0.00\nTDS:0\nSAL:0.00\nGRAV:1.000<\/code><\/pre>\n\n\n\n<p>Next step is to calibrate the sensor for dry air. To do this, send the command using the Arduino IDE serial monitor:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Cal,dry<\/code><\/pre>\n\n\n\n<p>The other calibration steps you can do are to check against the supplied samples. My samples are 12,880 uS\/cm and 80,000 uS\/cm which can be set to low and high calibration settings using the commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Put the sensor in the 12,880 sample, and then send the command:\nCal,low,12880\n\nEC:13580\nTDS:7336\nSAL:7.83\nGRAV:1.007\n\n*OK\nEC:13580\nTDS:7337\nSAL:7.83\nGRAV:1.007\n\n\/\/ Put the sensor in the 80,000 sample, and then send the command:\nCal,high,80000\n\nEC:82530\nTDS:44569\nSAL:42.00\nGRAV:1.041\n\n*OK\nEC:79990\nTDS:43195\nSAL:42.00\nGRAV:1.040<\/code><\/pre>\n\n\n\n<p>To save the calibration from your device, send:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Send the export calibration command\nExport\n\n\/\/ My response\nEC:53D44200803F\n\n\/\/ If ever you need to import it again, simply type\nImport<\/code><\/pre>\n\n\n\n<p>Now we&#8217;re ready for our first water quality sample! I poured a glass of Port Willunga tap water in the 80&#8217;s cottage I was staying at, and it gave these values:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EC:601.2\nTDS:325\nSAL:0.29\nGRAV:1.000\n\nEC:602.0\nTDS:325\nSAL:0.29\nGRAV:1.000\n\nEC:602.6\nTDS:325\nSAL:0.29\nGRAV:1.000\n\nEC:602.8\nTDS:326\nSAL:0.29\nGRAV:1.000\n\nEC:603.4\nTDS:326\nSAL:0.29\nGRAV:1.000\n\nEC:603.8\nTDS:326\nSAL:0.29\nGRAV:1.000\n\nEC:604.0\nTDS:326\nSAL:0.29\nGRAV:1.000\n\nEC:604.4\nTDS:326\nSAL:0.29\nGRAV:1.000\n\nEC:604.3\nTDS:326\nSAL:0.29\nGRAV:1.000<\/code><\/pre>\n\n\n\n<p>So it works! But what do those values mean and how do they compare to reported averages?<\/p>\n\n\n\n<p>From page 56 of this 2013\/14 <a href=\"https:\/\/www.sawater.com.au\/__data\/assets\/pdf_file\/0020\/9317\/DrinkingWaterQualityReport201314.pdf\">SA Water drinking quality report<\/a>, here are some water quality Total Dissolved Solids figures from areas nearby in mg\/L (which is the same as ppm reported by the sensor):<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Town<\/strong><\/td><td><strong>Min TDS<\/strong><\/td><td><strong>Max TDS<\/strong><\/td><td><strong>Ave TDS<\/strong><\/td><\/tr><tr><td>Myponga<\/td><td>320 mg\/L<\/td><td>410 mg\/L<\/td><td>353 mg\/L<\/td><\/tr><tr><td>Mount Compass<\/td><td>120 mg\/L<\/td><td>260 mg\/L<\/td><td>172 mg\/L<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Port Willunga&#8217;s average that I read of <strong>326 mg\/L<\/strong> (only a few readings on one day) sits towards the Myponga end of those two readings, which seems to validate the data I just read.<\/p>\n\n\n\n<p>Just out of interest, on page 54 of that report, the &#8220;Aesthetic guideline&#8221; for water TDS is less than or equal to<strong> 600 mg\/L<\/strong>. So I think that&#8217;s a safe upper limit to compare against for drinking water.<\/p>\n\n\n\n<p><em>Update<\/em>: I found that the SA Water &#8220;<a href=\"https:\/\/www.sawater.com.au\/community-and-environment\/water-quality\/in-your-area-whats-in-your-water\">what&#8217;s in your water<\/a>&#8221; search returned this 2018 data from South Metro: Average <strong>290 mg\/L<\/strong>. So that&#8217;s in the same ballpark too which is nice.<\/p>\n\n\n\n<p>Next step is to get it working with I2C on <a href=\"https:\/\/www.thethingsnetwork.org\/docs\/devices\/uno\/\">The Things Uno<\/a>, so that I can push the data to their network.<\/p>\n\n\n\n<p>I might also build a quick iOS Bluetooth app and plug it into my <a href=\"https:\/\/redbear.cc\/product\/ble-nano-2.html\">Red Bear BLE Nano<\/a> so that I can send data to my phone too.<\/p>\n\n\n\n<p><em>Update<\/em>: Today I tested some salt water from the beach at Port Willunga 2nd Jan 2019:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-- SENSOR READING\nEC:51291\nTDS:27697\nSAL:33.69\nGRAV:1.026\n\n-- SENSOR READING\nEC:51341\nTDS:27724\nSAL:33.73\nGRAV:1.026\n\n-- SENSOR READING\nEC:51381\nTDS:27750\nSAL:33.76\nGRAV:1.026\n\n-- SENSOR READING\nEC:51431\nTDS:27775\nSAL:33.79\nGRAV:1.026\n\n-- SENSOR READING\nEC:51481\nTDS:27799\nSAL:33.83\nGRAV:1.026\n\n-- SENSOR READING\nEC:51501\nTDS:27814\nSAL:33.85\nGRAV:1.026\n\n-- SENSOR READING\nEC:51521\nTDS:27826\nSAL:33.86\nGRAV:1.026\n\n-- SENSOR READING\nEC:51561\nTDS:27843\nSAL:33.89\nGRAV:1.026\n\n-- SENSOR READING\nEC:51581\nTDS:27857\nSAL:33.91\nGRAV:1.026\n\n-- SENSOR READING\nEC:51631\nTDS:27881\nSAL:33.94\nGRAV:1.026<\/code><\/pre>\n\n\n\n<p>And an average reading from the Adelaide CBD:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Tap water at an apartment block 2nd Jan 2019\nEC:600.4\nTDS:324\nSAL:0.29\nGRAV:1.000\n\n\/\/ Tap water at a second apartment block 4th Jan 2019\nEC:556.3\nTDS:300\nSAL:0.27\nGRAV:1.000\n\n\/\/ Tap water at first apartment block 3rd July 2021\nEC:327.5\nTDS:177.0\nSAL:0.2\nGRAV:1.000\n\n\/\/ Pura tap (2 year old filter)\nEC:567.7\nTDS:307\nSAL:0.28\nGRAV:1.000\n\n\/\/ Pura tap (6 month old filter)\nEC:530.5\nTDS:286\nSAL:0.26\nGRAV:1.000<\/code><\/pre>\n\n\n\n<p>An average reading from Saint Kilda East in Melbourne:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Tap water from St Kilda East 6th Jan 2019\nEC:61.37\nTDS:33\nSAL:0.00\nGRAV:1.000\n\n\/\/ Rain water from St Kilda East 6th Jan 2019\nEC:38.91\nTDS:21\nSAL:0.00\nGRAV:1.000<\/code><\/pre>\n\n\n\n<p>An average reading from a Melbourne CBD apartment (top of the CBD):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Tap water from Melbourne CBD apartment 10th Jan 2019\nEC:117.9\nTDS:64\nSAL:0.00\nGRAV:1.000<\/code><\/pre>\n\n\n\n<p>Southbank Melbourne:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Tap water from a Southbank apartment 2nd Feb 2020\nEC:80.1\nTDS:43\nSAL:0.00\nGRAV:1.000<\/code><\/pre>\n\n\n\n<p>Spring water:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Neverfail spring water (box)\nEC:211.6\nTDS:114\nSAL:0.10\nGRAV:1.000\n\n\/\/ Mount Franklin spring water (600mL bottle)\nEC:162.9\nTDS:88\nSAL:0.00\nGRAV:1.000\n\n\/\/ Cool Ridge spring water (600mL bottle)\nEC:79.76\nTDS:43\nSAL:0.00\nGRAV:1.000<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Connecting an Atlas Scientific Conductivity K 1.0 sensor to an Arduino. First of all, let me just say that I adore the packaging of the EZO conductivity and power isolation circuit boards. They were a lot smaller than I expected, which is a nice surprise, as it&#8217;ll mean a smaller end product once I&#8217;ve packaged &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/sighmon.com\/says\/atlas-k-1-0-conductivity-sensor\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Atlas K 1.0 water conductivity sensor&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":100,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,9],"tags":[11,21,22,23,24,20,13,12],"class_list":["post-96","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-sensors","tag-arduino","tag-atlas-scientific","tag-conductivity","tag-k1-0","tag-mega","tag-port-willunga","tag-quality","tag-water","entry"],"_links":{"self":[{"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/posts\/96","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/comments?post=96"}],"version-history":[{"count":16,"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/posts\/96\/revisions"}],"predecessor-version":[{"id":288,"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/posts\/96\/revisions\/288"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/media\/100"}],"wp:attachment":[{"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/media?parent=96"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/categories?post=96"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/tags?post=96"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}