วันพฤหัสบดีที่ 9 กรกฎาคม พ.ศ. 2558

วันที่38 ที่Fibo

-ออกแบบ PCB ที่จะเอามาใช้กับ PH และ EC sensor
   -เขียนโดยโปรแกรม fritzing
   -เว็ปโหลดโปรแกรม https://www.google.co.th/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CB0QFjAA&url=http%3A%2F%2Ffritzing.org%2Fdownload%2F&ei=mXaeVdyjGcbjuQS2642YDA&usg=AFQjCNH-xHO1yx4ZoOrgLMp7pEgylnFqHA&sig2=3Wb25yEqUvJ9u5hTDQI3mw
มีแบบให้ใช้ฟรีและเสียเงิน



สอนการใช้ fritzing PCB

สอนการวางวงจร PCB 

-pm-l24 จะทำเป็นตัววัดรอบแทน Encoder motor 
-ได้กลับมาใช้ตัวนี้เพราะถ้าใหช้motorเล็กจะทำให้รับโหลดได้ไม่มากพอและโค้ดน่าจะใช้โค้ดใหม่จากตัวเดิมที่เขียนไว้ก่อนหน้า หรทออาจจะปรับแต่งนิดหน่อย

โค้ดที่เขียนทดลองการทำงาน

int c=0;    //สั่งcให้=0
void setup() {

pinMode(3,INPUT_PULLUP);    //ขา2ให้รับค่าหรือINPUT
attachInterrupt(1,PM,RISING );  //สั่งงานใช้งานINTERRUP
Serial.begin(9600);


}

void loop() {
   
  Serial.println(c);          //โชว์ค่าcที่บวกได้
  delay(200);
  
}

void PM(){                    //เป็นฟังชันเรียกใช้งานINTERRUP

c++;
while(digitalRead(3)==HIGH);
}

Panasonic - PM-L24 - SENSOR, ULTRA-SMALL L TYPE, LO/DO, 5MM FIXED
Features:
  • Available in F, L, K, R, T, U or Y Configurations
  • Sensing Range: 5 mm
  • Power Supply: 5 to 24 VDC
  • The PM-24 Series Has an Ultra-Small Design
  • The PM-44 Series Is a Small Cable Type Connection
  • The PM-54 Series Has a Quick-Fitting Hook-Up Connector
  • The PM-64 Series Has a Built-In Connector
  • NPN or PNP Outputs Available
  • Incorporates 2 Outputs: Light-On/Dark-On
  • Response Time — 0.1 ms or Less

  • Body Style:Rectangular
    Brand/Series:PM
    Current, Switching:50 mA
    Function:Vane
    Output:NPN
    Primary Type:Photoelectric
    Range, Measurement:5 mm
    Sensing Mode:Opposed
    Technology:Photoelectric
    Termination:Cable
    Type:Infrared
    Voltage, Supply:24 VDC
    Voltage, Switching:30 VDC

    ไม่มีความคิดเห็น:

    แสดงความคิดเห็น