ph sensor arduino with lcd display supplier
Need to measure water quality and other parameters but haven"t got any low-cost pH meter? Find it difficult to use with Arduino? DFRobot analog pH meter, specially designed
a bunch of features. Instant connection to your probe your Arduino to get pH measurements at ± 0.1pH (25 ℃). For most hobbyists, this great accuracy range and its low cost make this a great tool for biorobotics and
other projects! It has an LED that works as the Power Indicator, a BNC connector, and a PH2.0 sensor interface. To use it, just connect the pH sensor with the BND connector, and plug the PH2.0 interface into the analog
input port of any Arduino controller. If pre-programmed, you will get the pH value easily. Comes in a compact plastic box with foams for better mobile storage.
Build your own PH meter gadget or a water monitoring station for your water tanks. This and our other water sensor devices could make for the ultimate water
“pH stands for the power of hydrogen, which is a measurement of the hydrogen ion concentration in the body. The total pH scale ranges from 1 to 14, with 7 considered
Gravity: Analog pH Sensor / Meter Pro Kit For Arduino is a professional Arduino pH Sensor Meter Kit with an industrial electrode. The industrial ph sensor for Arduino has a built-in simple, convenient, practical connection and long life (up to 1 year), which makes it very suitable for long-term online monitoring.
The bottle cap of the probe contains protective liquid (3.3mol/L KCL). Even if the bottle cap is screwed tightly, some protective liquid may still leak around the bottle cap, forming white crystals. But as long as there is still protective liquid in the bottle cap, it will not affect the life and accuracy of the probe. So please use it with confidence. It is recommended that the white crystals be poured back into the protective liquid in the bottle cap.
pH scale is used to measure the acidity and basicity of a liquid. It can have readings ranging from 1-14 where 1 shows the most acidic liquid and 14 shows the most basic liquid. 7 pH is for neutral substances that are neither acidic nor basic. Now, pH plays a very important role in our lives and it is used in various applications. For example, it can be used in a swimming pool to check the quality of water. Similarly, pH measurement is used in a wide variety of applications like agriculture, wastewater treatment, industries, environmental monitoring, etc.
In this project, we are going to make an Arduino pH Meter and learn how to measure the pH of a liquid solution using a gravity pH sensor and Arduino. A 16x2 LCD is used to show the pH value on the screen. We will also learn how to calibrate the pH sensor to determine the accuracy of the sensor. So let’s get started!
The unit that we use to measure the acidity of a substance is called pH. The term “H” is defined as the negative log of the hydrogen ion concentration. The range of pH can have values from 0 to 14. A pH value of 7 is neutral, as pure water has a pH value of exactly 7. Values lower than 7 are acidic and values greater than 7 are basic or alkaline.
Analog pH sensor is designed to measure the pH value of a solution and show the acidity or alkalinity of the substance. It is commonly used in various applications such as agriculture, wastewater treatment, industries, environmental monitoring, etc. The module has an on-board voltage regulator chip which supports the wide voltage supply of 3.3-5.5V DC, which is compatible with 5V and 3.3V of any control board like Arduino. The output signal is being filtered by hardware low jitter.
The construction of a pH sensor is shown above. The pH Sensor looks like a rod usually made of a glass material having a tip called “Glass membrane”. This membrane is filled with a buffer solution of known pH (typically pH = 7). This electrode design ensures an environment with the constant binding of H+ ions on the inside of the glass membrane. When the probe is dipped into the solution to be tested, hydrogen ions in the test solution start exchanging with other positively charged ions on the glass membrane, which creates an electrochemical potential across the membrane which is fed to the electronic amplifier module which measures the potential between both electrodes and converts it to pH units. The difference between these potentials determines the pH value based on the Nernst equation.
The Nernst equation gives a relation between the cell potential of an electrochemical cell, temperature, reaction quotient and the standard cell potential. In non-standard conditions, the Nernst equation is used to calculate cell potentials in an electrochemical cell. The Nernst equation can also be used to calculate the total electromotive force (EMF) for a full electrochemical cell. This equation is used to calculate the PH value of a solution as well. The glass electrode response is governed by the Nernst Equation can be given as:
After successful hardware connections, now it’s time for programming the Arduino. The complete code for this pH meter with Arduino is given at the bottom part of this tutorial. The stepwise explanation of the project is given below.
The first thing to do in the program is to include all the required libraries. Here in my case, I have included “LiquidCrystal_I2C.h” library for using the I2C interface of an LCD display and “Wire.h” for using I2C functionality on Arduino.
Next, the calibration value is defined, which can be modified as required to get an accurate pH value of solutions. (This is explained later in the article)
Finally, calculate the average of a 6 centre sample Analog values. Then this average value is converted into actual pH value and printed on an LCD display.
Calibration of the PH electrode is very important in this project. For this, we need to have a solution whose value is known to us. This can be taken as the reference solution for the calibration of the sensor.
Suppose, we have a solution whose PH value is 7 (distilled water). Now when the electrode is dipped in the reference solution and the PH value displayed on LCD is 6.5. Then to calibrate it, just add 7-6.5=0.5 in the calibration variable “calibration_value” in the code. i.e. make the value 21.34 + 0.5=21.84. After making these changes, again upload the code to Arduino and recheck the pH by dipping electrode in the reference solution. Now LCD should show the correct pH value i.e. 7(Little variations are considerable).Similarly, adjust this variable to calibrate the sensor. Then check for all other solutions to get the exact output.
• Arduino Uno houses ATmega328 microcontroller from ATMEL. This microcontroller contains flash memory (32 KB), RAM (2 KB), 8 bit wide CPU and 1 KB EEPROM.
{"id":2523731329082,"title":"3 in 1 Digital PH Tester Sunlight Soil Moisture Meter Detector Plant Garden","handle":"3-in-1-digital-ph-tester-sunlight-soil-moisture-meter-detector-plant-garden","description":"\u003cdiv\u003e\u003cstrong\u003eProduct Description:\u003c\/strong\u003e\u003c\/div\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cspan\u003eMethod of Use: No Battery needed; simply insert the meter in the soil area you want to check and instantly get an accurate and precise reading! When measuring soil pH and humidity, left 1cm of probe to avoid destroying electrode.\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eMulti-function:1.Let you know when to water. You will never over\/under water your plants again with this tester. 2.Help you to control Ph level in soil, acidic or alkaline is suitable for your plants. 3.Help you to determine if plant getting adequate light.\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eIndoor \u0026amp; Outdoor Use: This item is a perfect tool to test the soil conditions ( Moisture\/Light\/PH) of fruits, flowers, vegetables, shrubs, etc. with high accuracy and easy operation. You can take good care of your plants.\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eWarm Tips: 1, Do not touch the stone or hard rock soil, if the soil is too hard and dry, easy to damage the probes. 2, Design for testing soil ONLY. 3,After using, need to clean and wipe the probes.4,measurement of moisture and pH must be viewed while the unit is in the soil,And the tester must be kept in the soil for 10 minutes or more.\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003e18 Month : Our time is longer than others as our quality is , unconditionally or resend with any quality problems, life time friendly customer service, ONLY offered by Marge Plus store.\u003c\/span\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e\u003cspan\u003e\u003cstrong\u003eFunctions: Measure soil MOISTURE, PH and LIGHT levels\u003c\/strong\u003e \u003c\/span\u003e\u003cbr\u003e\u003cbr\u003e\u003cspan\u003e\u003cstrong\u003eEasy To Use( No Battery needed, Plug and read):\u003c\/strong\u003e \u003c\/span\u003e\u003cbr\u003e\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cspan\u003eStep 1: Switch moisture\/pH\/light position \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eStep 2: Stick the probe into the soil about 2-4 inches \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eStep 3: Adjust the position of the probe until the pointer on the dial swing slightly \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eStep 4: After 10 minutes, Note moisture\/pH\/light level in the dial \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eStep 5: Remove probe from soil and wipe clean after each use\u003c\/span\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cspan\u003e\u003cstrong\u003eSpecifications:\u003c\/strong\u003e \u003c\/span\u003e\u003cbr\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cspan\u003epH Range: 3.5-8 Ph (3.5-6.5 ACID, 7 NOR, 7-8 ALKALI) \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eMoisture Range: 1-10 (1-3 DRY, 4-7 NOR, 8-10 WET) \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eRelative Light: 0-2000 lux (0-200 LOW, 200-500LOW+, 500-1000 NOR 1000-2000 HGH) \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eSize: 6 x 28 x 5cm [2.36 x 11 x 2\"] \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eProbe length: 18cm [7.1\"] \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eCopper probe diameter: 4.8mm \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eAlu probe diameter: 5.1mm \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eDistance between probes: 1.2cm \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eColor: Green\u003c\/span\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cspan\u003e\u003cstrong\u003eWarm Tips: \u003c\/strong\u003e \u003c\/span\u003e\u003cbr\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cspan\u003eTo avoid damaging the probe, do not use in soil meter with stones and insert forcibly \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003ePlease wipe and clean the probe after each time using. \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eDon"t leave the meter in the soil for a long time. \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eDesigned for testing soil, don"t use it to test pure water or other liquids. \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eThe indicator will not move If the soil is too dry, please water the plant first and test again later. \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eDesign for testing soil ONLY. \u003c\/span\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cbr\u003e\u003cspan\u003e\u003cstrong\u003eWe"re so proud of you because you are proud of your plants! \u003c\/strong\u003e \u003c\/span\u003e\u003cbr\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cspan\u003ePlesse feel free to contact us if you have any question or you find what you get is defect.\u003c\/span\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e \u003c\/p\u003e\n\u003cp\u003e\u003cspan\u003e\u003cstrong\u003ePackage Included: \u003c\/strong\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003e1 x 3 in 1 Soil Tester\u003c\/li\u003e\n\u003c\/ul\u003e","published_at":"2019-09-29T17:09:07+08:00","created_at":"2019-09-29T17:14:28+08:00","vendor":"diymore","type":"PH Value Detect Sensor","tags":[],"price":1499,"price_min":1499,"price_max":1499,"available":true,"price_varies":false,"compare_at_price":799,"compare_at_price_min":799,"compare_at_price_max":799,"compare_at_price_varies":false,"variants":[{"id":23749886836794,"title":"Default Title","option1":"Default Title","option2":null,"option3":null,"sku":"012795","requires_shipping":true,"taxable":false,"featured_image":null,"available":true,"name":"3 in 1 Digital PH Tester Sunlight Soil Moisture Meter Detector Plant Garden","public_title":null,"options":["Default Title"],"price":1499,"weight":0,"compare_at_price":799,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_9_486.jpg?v=1588665114","\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_4_126.jpg?v=1588665114","\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_8_500.jpg?v=1588665114","\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_1_257.jpg?v=1588665114","\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_2_229.jpg?v=1588665114","\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_3_774.jpg?v=1588665114","\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_5_984.jpg?v=1588665114","\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_6_298.jpg?v=1588665114"],"featured_image":"\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_9_486.jpg?v=1588665114","options":["Title"],"media":[{"alt":"3 In 1 Digital Ph Tester Sunlight Soil Moisture Meter Detector Plant Garden Value Detect Sensor","id":6679515889735,"position":1,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_9_486.jpg?v=1588665114"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_9_486.jpg?v=1588665114","width":1000},{"alt":"3 In 1 Digital Ph Tester Sunlight Soil Moisture Meter Detector Plant Garden Value Detect Sensor","id":6679516741703,"position":2,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_4_126.jpg?v=1588665114"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_4_126.jpg?v=1588665114","width":1000},{"alt":"3 In 1 Digital Ph Tester Sunlight Soil Moisture Meter Detector Plant Garden Value Detect Sensor","id":6679516840007,"position":3,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_8_500.jpg?v=1588665114"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_8_500.jpg?v=1588665114","width":1000},{"alt":"3 In 1 Digital Ph Tester Sunlight Soil Moisture Meter Detector Plant Garden Value Detect Sensor","id":6679517397063,"position":4,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_1_257.jpg?v=1588665114"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_1_257.jpg?v=1588665114","width":1000},{"alt":"3 In 1 Digital Ph Tester Sunlight Soil Moisture Meter Detector Plant Garden Value Detect Sensor","id":6679517790279,"position":5,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_2_229.jpg?v=1588665114"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_2_229.jpg?v=1588665114","width":1000},{"alt":"3 In 1 Digital Ph Tester Sunlight Soil Moisture Meter Detector Plant Garden Value Detect Sensor","id":6679517921351,"position":6,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_3_774.jpg?v=1588665114"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_3_774.jpg?v=1588665114","width":1000},{"alt":"3 In 1 Digital Ph Tester Sunlight Soil Moisture Meter Detector Plant Garden Value Detect Sensor","id":6679518249031,"position":7,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_5_984.jpg?v=1588665114"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_5_984.jpg?v=1588665114","width":1000},{"alt":"3 In 1 Digital Ph Tester Sunlight Soil Moisture Meter Detector Plant Garden Value Detect Sensor","id":6679518543943,"position":8,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_6_298.jpg?v=1588665114"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0122\/7558\/0986\/products\/012795_6_298.jpg?v=1588665114","width":1000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cdiv\u003e\u003cstrong\u003eProduct Description:\u003c\/strong\u003e\u003c\/div\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cspan\u003eMethod of Use: No Battery needed; simply insert the meter in the soil area you want to check and instantly get an accurate and precise reading! When measuring soil pH and humidity, left 1cm of probe to avoid destroying electrode.\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eMulti-function:1.Let you know when to water. You will never over\/under water your plants again with this tester. 2.Help you to control Ph level in soil, acidic or alkaline is suitable for your plants. 3.Help you to determine if plant getting adequate light.\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eIndoor \u0026amp; Outdoor Use: This item is a perfect tool to test the soil conditions ( Moisture\/Light\/PH) of fruits, flowers, vegetables, shrubs, etc. with high accuracy and easy operation. You can take good care of your plants.\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eWarm Tips: 1, Do not touch the stone or hard rock soil, if the soil is too hard and dry, easy to damage the probes. 2, Design for testing soil ONLY. 3,After using, need to clean and wipe the probes.4,measurement of moisture and pH must be viewed while the unit is in the soil,And the tester must be kept in the soil for 10 minutes or more.\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003e18 Month : Our time is longer than others as our quality is , unconditionally or resend with any quality problems, life time friendly customer service, ONLY offered by Marge Plus store.\u003c\/span\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e\u003cspan\u003e\u003cstrong\u003eFunctions: Measure soil MOISTURE, PH and LIGHT levels\u003c\/strong\u003e \u003c\/span\u003e\u003cbr\u003e\u003cbr\u003e\u003cspan\u003e\u003cstrong\u003eEasy To Use( No Battery needed, Plug and read):\u003c\/strong\u003e \u003c\/span\u003e\u003cbr\u003e\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cspan\u003eStep 1: Switch moisture\/pH\/light position \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eStep 2: Stick the probe into the soil about 2-4 inches \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eStep 3: Adjust the position of the probe until the pointer on the dial swing slightly \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eStep 4: After 10 minutes, Note moisture\/pH\/light level in the dial \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eStep 5: Remove probe from soil and wipe clean after each use\u003c\/span\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cspan\u003e\u003cstrong\u003eSpecifications:\u003c\/strong\u003e \u003c\/span\u003e\u003cbr\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cspan\u003epH Range: 3.5-8 Ph (3.5-6.5 ACID, 7 NOR, 7-8 ALKALI) \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eMoisture Range: 1-10 (1-3 DRY, 4-7 NOR, 8-10 WET) \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eRelative Light: 0-2000 lux (0-200 LOW, 200-500LOW+, 500-1000 NOR 1000-2000 HGH) \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eSize: 6 x 28 x 5cm [2.36 x 11 x 2\"] \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eProbe length: 18cm [7.1\"] \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eCopper probe diameter: 4.8mm \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eAlu probe diameter: 5.1mm \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eDistance between probes: 1.2cm \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eColor: Green\u003c\/span\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cspan\u003e\u003cstrong\u003eWarm Tips: \u003c\/strong\u003e \u003c\/span\u003e\u003cbr\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cspan\u003eTo avoid damaging the probe, do not use in soil meter with stones and insert forcibly \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003ePlease wipe and clean the probe after each time using. \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eDon"t leave the meter in the soil for a long time. \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eDesigned for testing soil, don"t use it to test pure water or other liquids. \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eThe indicator will not move If the soil is too dry, please water the plant first and test again later. \u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eDesign for testing soil ONLY. \u003c\/span\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cbr\u003e\u003cspan\u003e\u003cstrong\u003eWe"re so proud of you because you are proud of your plants! \u003c\/strong\u003e \u003c\/span\u003e\u003cbr\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cspan\u003ePlesse feel free to contact us if you have any question or you find what you get is defect.\u003c\/span\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e \u003c\/p\u003e\n\u003cp\u003e\u003cspan\u003e\u003cstrong\u003ePackage Included: \u003c\/strong\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003e1 x 3 in 1 Soil Tester\u003c\/li\u003e\n\u003c\/ul\u003e"}
This tutorial will teach us how to use a pH sensor and LCD display with Arduino UNO to measure the pH of a liquid solution, and also make the value shows on the screen.
The pH scale is used to measure the acidity and basicity of a liquid. It can have readings ranging from 1-to 14 where 1 shows the most acidic liquid and 14 shows the most basic liquid. 7 pH is for neutral substances that are neither acidic nor basic. For drinking water, the U.S. Environmental Protection Agency recommends that municipal drinking water suppliers keep their water supply at a pH of 6.5 to 8.5.
Is the water coming from your tap really healthy to drink? After this tutorial, you can know the pH value of whatever you are drinking, and whether your tap water is safe!
This analog pH sensor is designed to measure the pH value of a solution and show the acidity or alkalinity of the substance. It is commonly used in various applications such as agriculture, wastewater treatment, industries, environmental monitoring, etc. The module has an on-board voltage regulator chip that supports the wide voltage supply of 3.3-5.5V DC, which is compatible with 5V and 3.3V of any control board like Arduino. The output signal is being filtered by hardware low jitter.
The pH Electrode looks like a rod usually made of a glass material having a tip called “Glass membrane”. This membrane is filled with a buffer solution of known pH (typically pH = 7). This electrode design ensures an environment with the constant binding of H+ ions on the inside of the glass membrane. When the probe is dipped into the solution to be tested, hydrogen ions in the test solution start exchanging with other positively charged ions on the glass membrane, which creates an electrochemical potential across the membrane which is fed to the Signal Conversion Module. The signal conversion module read the voltage, and then in the code, it will be converted to pH value.
Here, we recommend you connect your LCD display and potentiometer to Arduino UNO first then connect the Signal Conversion Module, after calibration (which will be covered in the following content) you could connect the pH Electrode.
It is really crucial to calibrate the sensor before we actually use it to measure the test solution. First you should make sure the pH value is in the correct range, for this step, you will need a wire to short the external part and the center of the probe connector on the Signal Conversion Module. This causes a 2.5 volts tension on the Po analog output pin. Because a pH of 7 means 2.5 Volts, so if the output value in this step is not 2.50, then you can set it to 2.50 using the trimmer.
The pH Sensor is almost calibrated! Next, you should run the code below to test the solution in the small container of the pH Electrode, since that solution is the distilled water, you should have the output pH value around 7.0, so if you feel the value is still not accurate enough, you could adjust it in the calibration_value. Now the the pH Sensor is calibrated perfectly under your standard!
pH meters are scientific instruments used for measuring the activity and concentration of hydrogen-ions in water-based solutions, with the aim of indicating its acidity or alkalinity expressed as pH values. They find application in water & wastewater treatment, pharmaceuticals, chemicals & petrochemicals, food & beverages, mining, and agricultural processes to mention a few. For today’s tutorial, we will attempt to build an accurate, DIY version of this very useful tool.
pH meters comprises of majorly a probe and a processing unit which interprets the data from the probe and displays in a human readable format. pHmeter essentially measures the difference in electrical potential between a pH electrode and a reference electrode. As a result of this, pH meters are sometimes referred to as a “potentiometric pH meters”.
While there are several DIY pHmeter examples on the internet, today’s project will be based on the examples provided by Atlas Scientific. We will use the Atlas Scientific pH probe and their Gravity analog pH meter breakout board. The Gravity analog pH meter breakout board is a fairly accurate low-cost pH metering solution specifically designed for Students / education, Proof of concept developments and pH metering applications requiring moderate accuracy levels. It comes with a BNC port through which it can be connected to the Atlas Scientific pH probe.
Asides the pH breakout and the probe, we will use an Arduino Uno and a 20×4 LCD display. The Arduino will serve as the brain for the project obtaining the pH level from the probe while the LCD will serve the purpose of providing visual feedback to the users as the value obtained by the Arduino will be displayed on the LCD.
To reduce the workload associated with searching for the exact components used for this tutorial, I have included links through which each of the components can be bought.
The schematics for today’s project is quite straightforward. We will connect the LCD using the 4-pin mode, while we willconnect the signal pin from the PH sensor to an analog pin on the Arduino since it’s output is analog.
With the connections ready, to make the project neat and presentable an enclosure was created. The enclosure is based on the popular abs plastic enclosures and it was modified with drills and other tools so it accommodates the screen and fits perfectly for other projects. A picture of the completed enclosure is displayed in the image below.
Use this pilot hole as the start point for the 3.2mm (1/8″) drywall cutting bit. Since this a small job, we will use the bit on the hand drill rather than a drywall cutting machine. Work on the inside of the rectangle instead of the lines as it may be a bit difficult to cut in a straight manner with this bit on the drill.
Put the piece in the vice and cut the openings. The circular opening is made using drill bits. The rectangular ones are made by following a similar process used to make the opening for the LCD.
The code for today’s project is quite straightforward. Our tasks as mentioned during the introduction is to collect the pH level using the pH meter and display on the attached LCD.
We will use the Arduino IDE for the development of the code and will use 2 major libraries; the Liquid Crystal Display library and the Atlas gravity sensor library. The liquid crystal display library is used to reduce the amount of work/code that is required to get the Arduino to interact with the LCD, while the Atlas Gravity Sensor Library makes it easy to interface with the PH meter and obtain data. The Liquid Crystal Library usually comes with the Arduino IDE but just in case it didn’t, you can always install it via the Arduino Library manager. The Atlas Gravity Sensor library, on the other hand, needs to be installed manually, as such, you will need to download it from the attached link, unzip it and copy it’s content into the Arduino Library folder. The library folder is usually in the same folder as your Arduino Sketches.
Next, we declare some of the variables that will be used during the code, declare the analog pin of the Arduino to which the PH sensor analog output pin is connected, and create instances of both the Atlas Gravity Sensor Library and the Liquid Crystal Library.
LiquidCrystal pH_lcd(2, 3, 4, 5, 6, 7); //make a variable pH_lcd and assign arduino digital pins to lcd pins (2 -> RS, 3 -> E, 4 to 7 -> D4 to D7)
With those done, we proceed to to the void setup() function. We start the function by initializing serial communication which will is used for debug purposes, and the LCD display on which a splash/initialization screen is displayed.
Next, the PH level is obtained from the PHmeter using the ph.read_ph() function. The values obtained is then displayed on the serial monitor and on the LCD.
Other parts of the code are the serialEvent() function which is used to obtain user input from the Serial Monitor, and the parse_cmd() function which takes in the data from the serial port and uses it to set the calibration level of the PHmeter.
LiquidCrystal pH_lcd(2, 3, 4, 5, 6, 7); //make a variable pH_lcd and assign arduino digital pins to lcd pins (2 -> RS, 3 -> E, 4 to 7 -> D4 to D7)
To ensure the accuracy of the results from the pH meter, there is a need to accurately calibrate the device. pH meters are calibrated across 3 levels; 4, 7, and 10 using standard buffer solutions that already exists at that PH level. These standard solutions are sometimes provided by the sellers of the PH sensor but when not provided, you can always get them from your local chemical stores.
To calibrate the meter, upload the sketch we developed above to your Arduino. Take some time to ensure the components are properly connected before doing this. When sketch upload is complete, open the serial monitor, based on our code the serial monitor will prompt you to enter the calibration values, with samples showing how to enter them correctly. When at this stage, follow the steps below to calibrate the meter with the three buffer solutions.
With these done, the pH meter is now calibrated and should be able to give the correct pH level for any solution the probe is tested with. The calibration values are saved on the Arduino’s EEPROM so they are not lost when the meter is disconnected from power. This makes calibration not necessary before every use but you should re-caliberate the system again after some time, so you can always enter the cal,clearcommand on the serial monitor to clear the previous stored calibration values and repeat the steps explained above.
With the code uploaded and calibration done, you can now go ahead and dip the probe into any solution you desire and you should see the pH value displayed on the LCD like shown in the image below.
The accuracy of the pHmeter varies with temperature, as such, it is important to note that the sensor used in this project has an accuracy of +/- 0.2% and that the pH meter will operate at this accuracy level when the temperature range is between 7 – 46°C. Outside of this range, the meter will have to be modified to compensate.
Going forward, while the scope of this project is limited to pH value, you can choose to add several other sensors to make the project more useful. A good example of sensors that could be added for more value include temperature and humidity sensors.
We all know PH is an essential thing for drinking water. If you don’t take care of this crucial ingredient, you might ruin your entire meal in a matter of seconds. This article will teach you how to build an Arduino Ph sensor as a beginner project for someone who doesn’t know what they’re doing.
We can regard an Arduino as a ‘microcontroller.’ This means that it is a tiny computer that you can use for electronic projects (and for much more). It can act as the main component in a huge amount of projects. By combining multiple projects, you can make something even greater.
Before you get started, make sure you set up the Arduino kit by following the instructions that came with it. This takes approximately 1 hour and 30 minutes to do. However, if you’re in a hurry, it’s possible to do this in 20 minutes by following this tutorial.
Every solution has a pH that a simple electrode can measure. For example, lemon juice has a pH of 2-3, and vinegar has a pH range from 4-6. Clean water may have a pH between 6.5 and 8, depending on the area you live.
A probe is an electronic device that allows you to measure the amount of voltage or current flowing through a circuit. For example, we will be using a Ph probe when measuring PH. This sensor lets us know if the water contains acids or bases.
The PH probe has two wires: one red and one black. The blue wire connects to 5V, and the black wire connects to the Ground(GND). The Red wire is what you use to measure the PH. It’s a very sensitive probe that can measure the pH value. You connect it to the Arduino, and in a concise period, it will tell you if the solution has an acidic or basic value.
There are many different models of Ph Sensor for Arduino. Unfortunately, many of them appear similar. But, if you want to do a good job and make sure your sensor will last for a long time, you should go with one from Rayming PCB & Assembly and get this one.
You can connect the sensor to the Arduino board using two wires. Once the connection is complete, you can start testing the sensor. You should do this by using a small piece of bread. The amount of sugar in bread is close to human skin, so it is easy to see how the sensor will react.
One can adjust the Ph probe to any other values as well. You need to tell it which value you want, and it will give it back to you (the value). You can do this by using a simple piece of bread.
Testing the sensor after connecting it to the Arduino is essential before using other solutions. You should always let the sensor rest for around 24 hours to stabilize and work properly. You will have to do this again when you connect it to a new circuit later.
The Ph probe requires between 3.5V and 5V to read the solution’s pH value properly. Therefore, to monitor the pH level of your Arduino project, you will need to use a voltage regulator or a voltage divider.
This project will use two transistors and two resistors to get the proper readings from different circuits or sensors. For example, if you want to measure the temperature on your Arduino board, you can get that information with a thermistor. However, the readings for both temperatures and pH depend on the circuit’s current level and, therefore, on the value used in your soil ph sensor Arduino.
Before you start building your sensor, make sure to read these instructions carefully. Your project will not be waterproof. Ensure that you place the device on a flat, safe surface.
Other than that, almost everything is as simple as a ‘Plug and Play’ installation. If anything fails to work correctly, try restarting the Arduino IDE. If it still doesn’t work, check all the connections again to ensure there aren’t any loose wires touching other components or parts of the circuit.
You can choose to make the Arduino board a stand-alone device so that you don’t need an enclosure. But, we think it’s better to use an enclosure because it gives you a safer way to store your sensor or Arduino board in the future. But, of course, you could also use the box that comes with your Arduino kit.
Place your finished product on top of another piece of acrylic sheet or plexiglass that is slightly larger than your enclosure. Then, cut it to the same size as a saw. Once you finish both pieces, drill two holes for the mobile phone camera and one for the micro SD card slot.
Don’t worry if you mess up while making these holes. You can always take your enclosure apart and fix all these problems. Do this by using a drill bit that is slightly smaller than your cord and then cut all of these holes with a rotary tool, or you can use a saw if you want to make smoother cuts.
1) First, we will install the 220-ohm resistor from the LCD module side so that you can use an external power source. You also want to connect this to your Arduino board’s positive (red) side.
4) You will also have to add an extra ground wire between the transistors and the breadboard since they don’t share a common ground with the Arduino board. Finally, connect the transistor and resistor to GND on the Arduino board.
The Ph probe should be installed like the picture above to connect the wires to your Arduino board. The GND wire should be connected to one of the Arduino’s pins and should go in between both transistors to be grounded.
Finally, you can install the LCD module using two wires. You need to connect one pin to the Arduino board and the other to the transistor that shares a ground with the Arduino. You can use a breadboard for this if you want, but it is much easier just by connecting both circuits directly.
Just connect the parts that are highlighted in green using jumper wires. You can bend the wires to make them fit in between the housing and your Arduino board without causing any harm to them or their circuit.
Once you have your Arduino pH circuit assembled, you can now place your sensor in a safe environment to see how well it works. However, you don’t want to put it in the water yet because you haven’t installed the software to let your sensor know its pH level.
You will have to install and run the Arduino IDE on your computer. You will also have it on your mobile phone for setting up, uploading, and testing sensors in the future.
Once you have finished installing everything, open up your Arduino IDE on your computer, select ‘File/Open and select the code you downloaded from our page.
Now connect your Arduino UNO to your computer with a USB cord and then click on ‘File/Upload’ this will send the code to your sensor so that you can start testing it out.
Click ‘Tools/serial monitor’ This will open up a terminal in which you can test your sensor! Type “M50” in the terminal to heat the water at 50 degrees Celsius.
If you type “M10” in your terminal, you will notice that the temperature is now 10 degrees Celsius hotter, and the LCD screen will now say “Temp 2.0”.
You can calibrate this sensor so that it will be able to tell the exact pH level that is in your environment. For this part, you will need two common solutions in a range of 1-14 pH. In this case, we used a solution at five and another at 10.
Our solution at five pH was pink, and our solution at ten pH was purple. So we mixed these two solutions, and our sensor read “7”. Which means you calibrated the sensor at 7.
This code will turn on (red LED on) the LED connected to your LED strip (VCC) and display “Temp” on the LCD screen. You can change these values in the sketch to suit your needs!
Then connect your pH source (a five pH) to your Arduino board. Then download a sketch from here. This will let your Arduino board be able to read your pH sensor!
Notice that when you download and upload the program, the LED light will turn blue and red when it recognizes that the sensor and Arduino need a connection.
It is essential to test the pH sensor in different environments to ensure that it will perform well. In this part, I will show you how we tested out the pH sensor in a few different environments. This would allow you to know that the sensor is doing what it is supposed to do.
We tested the pH sensor in an open environment. First, we used a clear jar and filled it up with distilled water so that there was no conductivity of the water, and we stirred for about 30 seconds. Next, we put a piece of pH paper on top of the solution and connected an Arduino board using a USB cable.
Then, we took the sensor apart and connected it to our lab equipment. We tested the voltage output from the sensor, compared it to a known value, and found that there was about 0.1 volts difference between both of them. We then compared the results to the pH table online and found that the readings were correct!
We used distilled water again to have no water conductivity in the jar. Next, we used a hard water solution and poured it into the jar. We then put some pH paper on top of the water and connected the other end to our Arduino board. Then we took our pH sensor apart, stripped off its casing, and put it into the hard water solution. From there, we tested both outputs from the Arduino and lab equipment.
To our surprise, both of them were about 0.02-volt difference which is acceptable for our sensor since it is an analog voltage output device. Unfortunately, we tested one previous version of the pH sensor in hard water, and it didn’t give us a reliable result, so we needed to replace it with this one since it is more precise.
We used the same setup again, but we used a saltwater solution, about 0.4 volts difference from our analog output device. Both outputs were still within an acceptable range, and we tested both of them using a previous version of the pH sensor in saltwater, and it also gave us similar results.
If your sketch is too large for the flash memory, you might get this error message, which means your sketch is too big to fit in the flash memory. To fix this problem, comment out unnecessary codes and compile and upload again. If it still doesn’t work, you can use another Arduino IDE instead of using the default one that comes with Arduino boards.
When you compile your code and upload it on your Arduino board, you might get the “Unsatisfied Link Error” message box. This means that there is a library that you need to add to the Arduino IDE before trying to compile and upload again. But, of course, you can always go to this page and download this library into your Arduino IDE to use it in your project.
This error happens when you try to upload a sketch, but nothing happens on your board. This might be because there is something wrong with the code you are trying to upload. First, try removing all the comments from your file and then re-compile it again. If that doesn’t work, you could use this other Arduino board instead.
When you upload sketches onto your Arduino board, you might get a message box telling you that “Serial port is already in use.” This might be because your IDE tried to upload on a serial port and failed because it was not connected. To fix this, try to restart your Arduino IDE by closing it and re-open the IDE.
Sometimes, when you compile your code, a Java error comes up and tells you that the Launch4j cannot run. This is because your Arduino board is not detected by your computer since there might be a problem with the serial connection between your computer and the Arduino board. Connect your Arduino board with a new USB cable to fix this problem.
This error happens when you try to connect an Arduino board to your computer, but your Arduino board doesn’t appear in the list of recognized devices. To fix this, remove the IDE, and after you reboot your computer and then re-plug it into the USB port, this should help.
Sometimes, the code you put into your Arduino IDE doesn’t work when you compile it. This might be because you need to put in the PIN before starting. To fix this problem, comment out the “Serial. begin()” line by putting a “#” at the beginning of that line and then upload the program onto your board again.
Your board may be out of sync with the Arduino IDE. If you can’t upload any sketch onto your board, try resetting and restarting it by disconnecting the power and reconnecting it to a new USB cable. This should sync it up to Arduino IDE to upload sketches onto your board.
This might be because your Arduino board is not compatible with this type of hardware. If you have an Arduino Uno that you cannot use, you might consider finding a different one.
Finally, we have finished our first pH sensor Arduino project. We started by looking at the basic parts that we will need for this project: an Arduino Uno and a pH sensor. After reading about how these sensors work, we decided to use the DS18B20, easy to find and cheap. Fortunately, most of the parts we used were available on Amazon, so there was no need to look everywhere to get what we needed.
After building our pH sensor, we tested both possible scenarios using hard and saltwater. We found that both outputs were still within an acceptable range from the common range of pH values. Both values were around seven and below eight, which means our sensor gave us a correct output.
Arduino pH Sensor Module is used to measure water quality and is fully compatible with your Arduino board. Connect to any Analog Input pin of your Arduino and read sensor data easily.
Arduino pH Sensor- In this Tutorial, you will learn how to use the pH sensor with Arduino and how to find the pH value of different liquids “Water, Milk and Cold rink”, and display the pH value on the serial monitor. As this is a getting started tutorial, so in this tutorial, we will only cover the extreme basics like for example
“pH stands for power of hydrogen, which is a measurement of the hydrogen ion concentration in the body. The total pH scale ranges from 1 to 14, with 7 considered to be neutral. A pH less than 7 is said to be acidic and solutions with a pH greater than 7 are basic or alkaline.”
If you’re using litmus paper, and you are not interested in any automatic system, or any notification system then none of this matters. You can check manually the pH values of different liquids. The basic idea is that the paper turns a slightly different color in solutions between pH 1 and 14 and, by comparing your paper to a color chart, you can simply read off the acidity or alkalinity without worrying how many hydrogen ions there are.
in other words, it’s a bit like a battery that can produce a greater voltage. A pH meter takes advantage of this and works like a voltmeter: it measures the voltage (electrical potential) produced by the solution whose acidity we’re interested in, compares it with the voltage of a known solution, and uses the difference in voltage (the “potential difference”) between them to deduce the difference in pH….
This is the analog pH sensor kit from the DFrobot, DFrobot is a leading robotics and open source hardware provider. They create innovative, user-friendly hardware & software products that become the building blocks in all kinds of electronic projects. I personally recommend you should definitely visit www.dfrobot.com .
This pH sensor kit can be used in water quality monitoring equipment, it can be used in the water tanks, Fish aquarium, this pH Sensor kit can be used with GSM, nodemcu esp8266 wifi module for remote notifications.
This pH sensor kit is best for measuring water quality and other parameters. It has an LED that works as the Power Indicator, a pH sensor, a BNC connector, a variable resistor which is used for the calibration which I will explain during the testing, and a PH2.0 sensor interface circuit.
This is a very simple and basic program to find the pH value of different liquids, I will be using some known liquids, whose pH values are already known. For demonstration purposes, I will be using Water, Milk, and a cold drink. In upcoming tutorials, I will modify this program and display the pH Values on the LCD. I will also make an IoT version of the same project.
We use a for loop to get 10 sample values from the pH sensor and store these values in an array. Then we use these two for loops to sort the values from small to larger in the ascending order…
This for loop is used to take the average value of 6 center samples and the value is stored in avgValue. Then we convert this value into millivolts and into the pH value. Then finally we display the ph value on the serial monitor.
For the Practical Demonstration watch video given at the end or pH of pure water is 7. In general, water with a pH lower than 7 is considered acidic, and with a pHgreater than 7 is considered basic. The normal range for pH in surface water systems is 6.5 to 8.5, and the pH range for groundwater systems is between 6 to 8.5. So the water under test is safe as you can see in the video and can be used for drinking without any problem….
Fresh cows milk has a pH of between 6.7 and 6.5. Values higher than 6.7 denote mastitic milk and values below pH 6.5 denote the presence of bacterial deterioration. For more information click on the link below.
The calibration is really easy, all you need is select a liquid with the known pH values like for example the cow milk and check it’s value, if the value is greater or lower than the exact pH value which you can, of course, find in the chart, then all you need is to rotate this variable resistor which you can find near to the BNC connector clearly labeled in the picture above, and adjust the value.
In this project, we will make our own DIY Soil Ph Meter using Soil Ph Sensor & Arduino for the measurement of Soil Ph. Soils can be naturally acidic or alkaline & can be measured by testing their pH value. Soil pH is a measure of the acidity or alkalinity of the soil.
Soil is considered a natural medium for plant growth & development. Much research is going on to determine the internal factors of farmers’ crop production failure. One of the factors is the balance of nature in unstable or unfertile soil that inhibits plant growth and plant root development. The Ph is the acidity or basicity of material measured on a scale between 0 to 14. The Ph value lesser than 7 is considered acidic and greater than 7 is considered basic. If the pH scale is 7 then the material is neutral. The most ideal soil conditions for the growth & development of plants are neutral soil. However, some types of plants are still tolerant of soils with slightly acidic Ph with a maximum pH of 5.
Apart from Soil Ph, the Soil Nitrogen, Phosphorous, Potassium, EC & Salinity content is also useful for plant growth. For the measurement of NPK Content, we can use NPK Sensor. For Soil EC & Salinity measurement, we can use Soil EC Sensor But Soil Ph is completey different factor compared to Soil NPK. We have already discussed about Water Ph Sensor in one of our previous post, but Water Ph Sensor cannot be used to measure the Soil Ph due to construction and limitations factor. This is why we need an special Soil Ph Sensor to measure the Ph of a Soil.
While browsing through the internet, I found a great Ph Sensor manufactured by some Chinese R&D Manufacturer. The sensor is manufacture by a company called HONDETEC and you can check it on Alibaba. The sensor works perfectly with Modbus RS485 and the result is highly impressive. So, in this post we will learn about Soil Ph Sensor & Arduino Interfacing and design our own Arduino Soil Ph Meter. We will display the Soil Ph value on a 0.96″ OLED Display.
The bill of materials for making your own Soil Ph Meter is given below. All the components can be easily purchased from Amazon except the Soil Ph measurement sensor. You can get it from Amazon as well but may not be available every time.
Soil pH is a measure of the acidity or alkalinity of the soil. A pH value is actually a measure of hydrogen ion concentration. Because hydrogen ion concentration varies over a wide range, a logarithmic scale (pH) is used
Most soils have pH values between 3.5 and 10. In higher rainfall areas the natural pH of soils typically ranges from 5 to 7, while in drier areas the range is 6.5 to 9. Soils can be classified according to their pH value:
Natural soil pH depends on the rock from which the soil was formed and the weathering processes that acted on it, i.e. climate, vegetation, topography & time. These processes tend to cause a lowering of pH (increase in acidity) over time.
Rain is also considered as one of the significant factors for the increase in acidity of the soil. Some fertilizers can change soil pH and increase or reduce the number of nutrients available to plants.
Soil pH affects the amount of nutrients and chemicals that are soluble in soil water. Some nutrients are more available under acid conditions while others are more available under alkaline conditions. However, most mineral nutrients are readily available to plants when soil pH is near neutral.
The development of strongly acidic soils can result in poor plant growth as a result of Aluminum & Manganese toxicity or calcium & magnesium deficiency. Alkaline soils may have problems with deficiencies of nutrients such as zinc, copper, boron & manganese.
This is a waterproof and dustproof Soil Ph Sensor that can measure the Soil Ph value from 3 to 9 with high accuracy up to ±0.3PH. The sensor has an IP68 protective case & is sealed with High-density epoxy resin which can prevent moisture from entering the body interior part. The sensor is suitable for Suitable for agricultural cultivation, industrial production, environmental monitoring, animal husbandry, and sewage treatment.
The communication protocol that it uses is the Modbus. Thee device works as a Slave with the device address as shown below. You can send this instruction or Inquiry frame & Read soil PH at device address 0x01.
From the received response, you can calculate the Ph Value. The 4th bit (starting from the 0th bit) is the value of Ph. For example, we got 0047H (hexadecimal) = 71 Decimal => pH = 7.1pH
The R0 & DI pin of from the Modbus is connected to D2 & D3 of Arduino using Software Serial. Similarly, we have to enable DE & RE high which is done by connecting them to the D7 & D8 pin of Arduino. The NPK Sensor has 4 wires. The brown one is VCC which needs a 5V-30V Power Supply & can be connected to 5V of Arduino. The GND pin which is black in color needs to be connected to the GND of Arduino. The Blue wire which is the B pin is connected to the B pin of MAX485 & the Yellow Wire which is the A pin is connected to the A pin of MAX485.
The 0.96″ SSD1306 OLED Display is an I2C Module. The OLED Display VCC & GND are connected to 3.3V & GND of Arduino. Similarly, its SDA & SCL pins are connected to the A4 & A5 of Arduino. You can follow the circuit diagram & assemble the circuit on a breadboard or make a custom design PCB.
The source code for interfacing Soil Ph Sensor with Arduino & retrieving Soil Ph value from the Sensor via Modbus command is given below. You can send the command and retrieve the value in HEX Code. The HEX code needs to be converted into Decimal to get the Measured Soil Ph content data.
Once the code is uploaded, the OLED will initialize along with the sensor. The sensor will take some time to get stabilized and the reading may be incorrect for a few seconds initially.
So this is how you interface soil ph measurement sensor with Arduino & get the Ph Reading. Similarly, put the sensor in different samples of soil. You will see a variation in the Ph Value depending upon the type of soil. The value increased or decreases like an Analog Soil Ph Sensor and can also be used as IoT Soil Ph Sensor.
In chemistry, pH is a scale used to specify how acidic or basic a water-based solution is. Acidic solutions have a lower pH, while basic solutions have a higher pH. Thus Ph sensor has the ability to determine the Ph of any solution, i.e it tells whether the substance is acidic, basic or neutral in nature. By knowing the Ph, we can monitor the water quality in Agricultural Farm and also in Fish Farming. Similarly, Ph Sensor has a wide range of applications like wastewater treatment, pharmaceuticals, chemicals & petrochemicals.
In this basic tutorial, we will learn how to interface Gravity Ph Sensor with Arduino. We will design a simple Ph Meter and display the Ph value on OLED/LCD Display. We will also learn about the construction & working of the Ph Sensor. Finally, we will learn the calibration method which will determine the correctness and accuracy of the sensor. The Ph Sensor can also be interfaced with other higher-level microcontrollers like NodeMCU ESP8266 & STM32 which I will discuss in future.
The term PH is a quantitative measure of the acidity or basicity of aqueous or other liquid solutions. The term, widely used in chemistry, biology, and agronomy, translates the values of the concentration of the hydrogen ion which ordinarily ranges between about 1 and 10−14 gram-equivalents per liter—into numbers between 0 and 14.
In pure water, which is neutral (neither acidic nor alkaline), the concentration of the hydrogen ion is 10−7 gram-equivalents per liter, which corresponds to a pH of 7. A solution with a pH less than 7 is considered acidic; a solution with a pH greater than 7 is considered basic, or alkaline.
A pH meter is a scientific instrument that measures the hydrogen-ion activity in water-based solutions, indicating its acidity or alkalinity expressed as pH. The pH meter measures the difference in electrical potential between a pH electrode and a reference electrode, and so the pH meter is sometimes referred to as a “potentiometric pH meter“. The difference in electrical potential relates to the acidity or pH of the solution.
The Ph Sensor has a rod-like structure usually made of glass, with a bulb containing the sensor at the bottom. The glass electrode for measuring the pH has a glass bulb specifically designed to be selective to hydrogen-ion concentration. On immersion in the solution to be tested, hydrogen ions in the test solution exchange for other positively charged ions on the glass bulb, creating an electrochemical potential across the bulb. The electronic amplifier detects the difference in electrical potential between the two electrodes generated in the measurement and converts the potential difference to pH units. The magnitude of the electrochemical potential across the glass bulb is linearly related to the pH according to the Nernst equation.
The reference electrode is insensitive to the pH of the solution, being composed of a metallic conductor, which connects to the display. This conductor is immersed in an electrolyte solution, typically potassium chloride, which comes into contact with the test solution through a porous ceramic membrane. The display consists of a voltmeter, which displays voltage in units of pH.
DFRobot Gravity: Analog pH meter V2 is specifically designed to measure the pH of the solution and reflect the acidity or alkalinity. As an upgraded version of pH meter V1, the sensor greatly improves the precision and user experience. The onboard voltage regulator chip supports the wide voltage supply of 3.3~5.5V. The output signal filtered by hardware has low jitter. With this Ph Sensor, you can quickly build the pH meter to measure the Ph value of the different aqueous solutions.
The Ph Sensor Kit has Signal Conversion Board (Transmitter) V2 and also pH Probe. Both of them are connected with each other. The features of both of these parts are as follows.
Ph Sensor has 3 pins that need to be connected to Arduino. So, connect the VCC pin to 5V of Arduino and GND to GND. Connect its analog pin to A0 of Arduino as shown in image above.
Once the code is uploaded to Arduino Board, you can open serial monitor and start testing the Ph Sensor. I tested the Ph Sensor with All 4 solutions given above and found the following results
Now Let us display the Ph Value on OLED Display instead of Serial Monitor. To do that we need to add a 0.96″ I2C OLED Display to Arduino Uno. Hence the connection diagram is shown below.
The connection is fairly simple again. Connect the Analog pin of Ph Sensor to Arduino A0 pin and supply 5V to it. Also, connect the SDA SCL pin of OLED Display to Arduino A4 & A5 Pin respectively.
The source code for Interfacing DFRobot Gravity Ph Sensor with Arduino and OLED Display is given below. Simply copy the code and upload it to the Arduino Board.
Once the code is uploaded the OLED display will start showing the value of Ph. Dipping the Ph electrode on different sol