PH Electrode Probe For Arduino

Liquid PH 0-14 Value Detection Regulator Sensor Module Monitoring Control Meter Tester + BNC PH Electrode Probe For Arduino


155 ₪

الناشر: متجر القطع الالكترونية

القسم: مستشعرات - سينسور

تاريخ النشر: 2022-07-14


كود ودائرة التوصيل مع arduino

دوائر التوصيل مع المكتبات والاكواد اللازمة




Interfacing & Testing PH Sensor with arduino





pH Sensor Calibration:



To calibrate this sensor you will need a wire to short the external part and the center of the probe connector. This causes a 2.5 volts tension on the Po analog output pin. I started off by connecting the external part of the BNC connector with the center of the BNC probe connector.





Now connect the V+ pin with the Arduino’s 5v. Connect the ground pin of the interface circuit with the ground pin of the Arduino, and finally connect the analog output pin Po with the A0 pin of the Arduino. Connect Arduino with the laptop to calibrate the pH sensor using the following Arduino code.



pH Sensor Calibration Arduino Code:

code
نسخ
اقتباس
عرض
تنزيل
	
								
int pH_Value; float Voltage; void setup() { Serial.begin(9600); pinMode(pH_Value, INPUT); } void loop() { pH_Value = analogRead(A0); Voltage = pH_Value * (5.0 / 1023.0); Serial.println(Voltage); delay(500); }


This is a very basic program that we are going to use for calibrating the pH sensor interface circuit. The purpose of this program is to the read the analog output pin Po and display the voltage on the serial monitor. Make sure the Arduino board is selected and also check if the right communication port is selected. Click on the Upload button and wait for a while. After the program has been uploaded. Now the next step is to open the serial monitor.





If you will see a value other than 2.50 then use the trimmer to adjust this value.You know the pH value is from 0 to 14. A pH of 7 means 2.5 Volts. So we are going to set it to 2.5 volts using the trimmer. Now, you can see the value is set to 2.5Volts. The pH Sensor is now calibrated. Disconnect the Arduino board and also remove the wire. Now, it’s time to connect the pH sensor with the interface board.





The small container already has the distilled water, this is how it look after connecting the pH sensor with the Interface board, the wiring remains the same. Now, let’s check its pH value.



Arduino pH meter testing after calibration:

As you can see the Arduino is connected with the laptop, now we will need to upload the following code to find the pH value of the distilled water.



يجب وضع الجهاز قليلا في السائل حتى يتم تفعيل المادة فيه .... وتتم المعايرة بشكل بسيط حسب الكود



code
نسخ
اقتباس
عرض
تنزيل
	
								
//-------------------------------------------------PH int ph_sensorValue = 0; float phValue = 0; float ph = 0; //------------------------------------------------- #define ph_pin A0 void setup() { Serial.begin(9600); pinMode(ph_pin, INPUT); } void loop() { ph_sensorValue= analogRead(ph_pin); Serial.print(ph_sensorValue); Serial.print(" | "); phValue=ph_sensorValue*(3.3/4095.0); ph=14-(3.3*phValue); String s_ph = String(ph); char c_ph[6]; s_ph.toCharArray(c_ph, 6); Serial.print("ph = "); Serial.println(ph); delay(1000); }


After you upload the program, then you can open the Serial monitor to check the pH value of some known liquid. I used the distilled water. Although I did the calibration, but still the value was little off which I then adjusted. The above code is already adjusted. I have explained this in the video tutorial given at the end of this article.





Very pure distilled water that has had little contact with air will have a pH value between 6.9 and 7. After adjusting the value, I was able to get the exact pH value for the distilled water. The pH value is between 6.9 and 7. The pH value can be further adjusted by changing the calibration value.





سلة المشتريات افراغ السلة