Sunteți pe pagina 1din 6

17/12/2014 PHmeter(SKU:SEN0161)RobotWiki

PHmeter(SKU:SEN0161)
FromRobotWiki

Contents
1Introduction
2Applications
3Specification
4pHElectrodeSize
5pHElectrodeCharacteristics
6UsethepHMeter
6.1ConnectingDiagram
6.2SteptoUsethepHMeter
6.3SampleCode
7Precautions
8Documents

Introduction
Needtomeasurewaterqualityandother AnalogpHMeterKit
parametersbuthaven'tgotanylowcostpH
meter?FinditdifficulttousewithArduino?
HerecomesananalogpHmeter,speciallydesignedforArduinocontrollersandhasbuiltinsimple,
convenientandpracticalconnectionandfeatures.IthasanLEDwhichworksasthePowerIndicator,aBNC
connectorandPH2.0sensorinterface.Touseit,justconnectthepHsensorwithBNCconnector,andplug
thePH2.0interfaceintotheanaloginputportofanyArduinocontroller.Ifpreprogrammed,youwillgetthe
pHvalueeasily.Comesincompactplasticboxwithfoamsforbettermobilestorage.
Attention:InordertoensuretheaccuracyofthepHprobe,youneedtousethestandardsolutionto
calibrateitregularly.Generally,theperiodisabouthalfayear.Ifyoumeaurethedirtyaqueous
solution,youneedtoincreasethefrequencyofcalibration.

Applications
Waterqualitytesting
Aquaculture

Specification
ModulePower:5.00V
ModuleSize:43mm32mm
MeasuringRange:014PH
MeasuringTemperature:060

http://dfrobot.com/wiki/index.php/PH_meter(SKU:_SEN0161) 1/6
17/12/2014 PHmeter(SKU:SEN0161)RobotWiki

Accuracy:0.1pH(25)
ResponseTime:1min
pHSensorwithBNCConnector
PH2.0Interface(3footpatch)
GainAdjustmentPotentiometer
PowerIndicatorLED
CableLengthfromsensortoBNCconnector:660mm

pHElectrodeSize

pHElectrodeCharacteristics
TheoutputofpHelectrodeisMillivolts,andthepHvalueoftherelationshipisshownasfollows(25):

UsethepHMeter
ConnectingDiagram

http://dfrobot.com/wiki/index.php/PH_meter(SKU:_SEN0161) 2/6
17/12/2014 PHmeter(SKU:SEN0161)RobotWiki

SteptoUsethepHMeter

Cautions:

Pleaseuseanexternalswitchingpowersupply,andthevoltageascloseaspossibletothe+5.00V.
Moreaccuratethevoltage,morehighertheaccuracy!
http://dfrobot.com/wiki/index.php/PH_meter(SKU:_SEN0161) 3/6
17/12/2014 PHmeter(SKU:SEN0161)RobotWiki

Beforetheelectrodeincontinuoususeeverytime,youneedtocalibrateitbythestandardsolution,in
ordertoobtainmoreaccurateresults.Thebestenvironmenttemperatureisabout25,andthepH
valueisknownandreliable,closetothemeasuredvalue.Ifyoumeasuretheacidicsample,thepH
valueofthestandardsolutionshouldbe4.00.Ifyoumeasurethealkalinesample,thepHvalueofthe
standardsolutionshouldbe9.18.Subsectioncalibration,justinordertogetabetteraccuracy.
BeforethepHelectrodemeasureddifferentsolutions,weneedtousewatertowashit.Werecommend
usingdeionizedwater.

(1)Connectequipmentsaccordingtothegraphic,thatis,thepHelectrodeisconnectedtotheBNCconnector
onthepHmeterboardandthenusetheconnectionlines,thepHmeterboardisconnectedtotheananlong
port0oftheArduinocontroller.WhentheArduinocontrollergetspower,youwillseetheblueLEDon
boardison.
(2)UploadthesamplecodetotheArduinocontroller.
(3)PutthepHelectrodeintothestandardsolutionwhosepHvalueis7.00ordirectlyshortedtheinputof
theBNCconnector.OpentheserialmonitoroftheArduinoIDE,youcanseethepHvalueprintedonit,and
theerrordoesnotexceed0.3.RecordthepHvalueprinted,thencomparedwith7.00,andthedifference
shouldbechangedintothe"Offset"inthesamplecode.Forexample,thepHvalueprintedis6.88,sothe
differenceis0.12.Youshouldchangethe"#defineOffset0.00"into"#defineOffset0.12"inyourprogram.
(4)PutthepHelectrodeintothepHstandardsolutionwhosevalueis4.00.Thenwaitaboutoneminute,adjust
thegainpotentialdevice,letthevaluestabiliseataround4.00.Atthistime,theacidiccalibrationhasbeen
completedandyoucanmeasurethepHvalueofanacidicsolution.
Note:IfyouwanttomeasurethepHvalueofothersolution,youmustwashthepHelectrodefirst!
(5)AccordingtothelinearcharacteristicsofpHelectrodeitself,aftertheabovecalibration,youcandirectly
measurethepHvalueofthealkalinesolution,butifyouwanttogetbetteraccuracy,youcanrecalibrateit.
AlkalinecalibrationusethestandardsolutionwhosepHvalueis9.18.Alsoadjustthegainpotentialdevice,
letthevaluestabiliseataround9.18.Afterthiscalibration,youcanmeasurethepHvalueofthealkaline
solution.

SampleCode

SamplecodefortestingthePHmeterandgetthesensorfeedbackfromtheArduinoSerialMonitor.

/*
#ThissamplecodeisusedtotestthepHmeterV1.0.
#Editor:YouYou
#Ver:1.0
#Product:analogpHmeter
#SKU:SEN0161
*/
#defineSensorPinA0//pHmeterAnalogoutputtoArduinoAnalogInput0
#defineOffset0.00//deviationcompensate
#defineLED13
#definesamplingInterval20
#defineprintInterval800
#defineArrayLenth40//timesofcollection
intpHArray[ArrayLenth];//Storetheaveragevalueofthesensorfeedback
intpHArrayIndex=0;
voidsetup(void)
{
pinMode(LED,OUTPUT);
Serial.begin(9600);
Serial.println("pHmeterexperiment!");//Testtheserialmonitor
}
voidloop(void)

http://dfrobot.com/wiki/index.php/PH_meter(SKU:_SEN0161) 4/6
17/12/2014 PHmeter(SKU:SEN0161)RobotWiki
{
staticunsignedlongsamplingTime=millis();
staticunsignedlongprintTime=millis();
staticfloatpHValue,voltage;
if(millis()samplingTime>samplingInterval)
{
pHArray[pHArrayIndex++]=analogRead(SensorPin);
if(pHArrayIndex==ArrayLenth)pHArrayIndex=0;
voltage=avergearray(pHArray,ArrayLenth)*5.0/1024;
pHValue=3.5*voltage+Offset;
samplingTime=millis();
}
if(millis()printTime>printInterval)//Every800milliseconds,printanumerical,convertthestateoftheLEDindicat
{
Serial.print("Voltage:");
Serial.print(voltage,2);
Serial.print("pHvalue:");
Serial.println(pHValue,2);
digitalWrite(LED,digitalRead(LED)^1);
printTime=millis();
}
}
doubleavergearray(int*arr,intnumber){
inti;
intmax,min;
doubleavg;
longamount=0;
if(number<=0){
Serial.println("Errornumberforthearraytoavraging!/n");
return0;
}
if(number<5){//lessthan5,calculateddirectlystatistics
for(i=0;i<number;i++){
amount+=arr[i];
}
avg=amount/number;
returnavg;
}else{
if(arr[0]<arr[1]){
min=arr[0];max=arr[1];
}
else{
min=arr[1];max=arr[0];
}
for(i=2;i<number;i++){
if(arr[i]<min){
amount+=min;//arr<min
min=arr[i];
}else{
if(arr[i]>max){
amount+=max;//arr>max
max=arr[i];
}else{
amount+=arr[i];//min<=arr<=max
}
}//if
}//for
avg=(double)amount/(number2);
}//if
returnavg;
}

Precautions
http://dfrobot.com/wiki/index.php/PH_meter(SKU:_SEN0161) 5/6
17/12/2014 PHmeter(SKU:SEN0161)RobotWiki

Theelectrodeusedforthefirstorlongsetwithoutreuse,theelectrodebulbandthesandcore,
immersedinthe3NKCLsolutionactivatedeighthours.
Theelectrodeplugshouldbekeptcleananddry.
Electrodereferencesolutionisthe3NKCLsolution.
Measurementshouldbeavoidedstaggeredpollutionbetweensolutions,soasnottoaffecttheaccuracy
ofmeasurement.
ElectrodebluborsandcoreisdefiledwhichwillmakePTSdecline,slowresponse.So,itshouldbe
basedonthecharacteristicsofthepollutant,adaptedtothecleaningsolution,theelectrode
performancerecovery.
Theelectrodeshouldnotbelongtermimmersedinacidchloridesolution.
Electrodewheninuse,theceramicsandcoreandliquidoutletrubberringshouldberemoved,inorder
tomakesaltbridgesolutiontomaintainacertainvelocity.

Documents
Schematic(http://www.dfrobot.com/image/data/SEN0161/pH%20meter%20V1.0%20SCH.pdf)
PCBDesignlayout(http://www.dfrobot.com/image/data/SEN0161/ph%20meter%20V1.0%20layout.pdf)
pHElectrodeManual
(http://www.dfrobot.com/image/data/SEN0161/PH%20composite%20electrode%20manual.pdf)
ArduinoSampleCode(http://www.dfrobot.com/image/data/SEN0161/phMeterSample.zip)
ZipsForAllAbove(http://www.dfrobot.com/image/data/SEN0161/DFRobot%20SEN0161.zip)

Retrievedfrom"http://www.dfrobot.com/wiki/index.php?title=PH_meter(SKU:_SEN0161)&oldid=27091"
Categories: ProductManual SENSeries Sensors

Thispagewaslastmodifiedon11August2014,at07:04.
Thispagehasbeenaccessed15,023times.

http://dfrobot.com/wiki/index.php/PH_meter(SKU:_SEN0161) 6/6

S-ar putea să vă placă și