欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 6638|回復: 1
收起左側

ph檢測計arduino程序設計及其原理圖

[復制鏈接]
ID:316660 發表于 2018-4-25 22:08 | 顯示全部樓層 |閱讀模式
分享個ph檢測計設計及其原理圖
電路原理圖如下:
0.jpg

arduino單片機源程序如下:
  1. /*
  2. # This sample codes is for testing the pH meter V1.0.
  3. # Editor : YouYou
  4. # Ver    : 0.1
  5. # Product: pH meter
  6. # SKU    : SEN0161
  7. */

  8. #define SensorPin 0          //pH meter Analog output to Arduino Analog Input 0
  9. unsigned long int avgValue;  //Store the average value of the sensor feedback
  10. float b;
  11. int buf[10],temp;

  12. void setup()
  13. {
  14.   pinMode(13,OUTPUT);  
  15.   Serial.begin(9600);  
  16.   Serial.println("Ready");    //Test the serial monitor
  17. }
  18. void loop()
  19. {
  20.   for(int i=0;i<10;i++)       //Get 10 sample value from the sensor for smooth the value
  21.   {
  22.     buf[i]=analogRead(SensorPin);
  23.     delay(10);
  24.   }
  25.   for(int i=0;i<9;i++)        //sort the analog from small to large
  26.   {
  27.     for(int j=i+1;j<10;j++)
  28.     {
  29.       if(buf[i]>buf[j])
  30.       {
  31.         temp=buf[i];
  32.         buf[i]=buf[j];
  33.         buf[j]=temp;
  34.       }
  35.     }
  36.   }
  37.   avgValue=0;
  38.   for(int i=2;i<8;i++)                      //take the average value of 6 center sample
  39.     avgValue+=buf[i];
  40.   float phValue=(float)avgValue*5.0/1024/6; //convert the analog into millivolt
  41.   phValue=3.5*phValue;                      //convert the millivolt into pH value
  42.   Serial.print("    pH:");  
  43.   Serial.print(phValue,2);
  44.   Serial.println(" ");
  45.   digitalWrite(13, HIGH);      
  46.   delay(800);
  47.   digitalWrite(13, LOW);

  48. }



復制代碼

所有資料51hei提供下載:





PH composite electrode manual.pdf

213.35 KB, 下載次數: 20, 下載積分: 黑幣 -5

ph meter V1.0 layout.pdf

87.16 KB, 下載次數: 18, 下載積分: 黑幣 -5

phMeterSample.zip

898 Bytes, 下載次數: 17, 下載積分: 黑幣 -5

原理圖.pdf

104.57 KB, 下載次數: 19, 下載積分: 黑幣 -5

回復

使用道具 舉報

ID:316660 發表于 2018-4-25 22:09 | 顯示全部樓層
希望大家多多指教
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表