- 荷重元 0—500g
- HX-711 Arduino 壓力感測器
- 繼電器5V
- DC 24V ,120W powersupplier
- 線性滑軌
- 57步進電機
- 步進驅動器—TB 6560
- 滾珠螺桿 1604----直徑 16mm,螺距 4mm
- 步進控制器
- 歐標鋁型材 2020
- 歐標鋁型材 2040
- 10元店梳子
- Arduino nano
- 限位開關 (老鼠尾)
- 快速接頭
作動原裡:
- 步進電機驅動滾珠螺桿, 荷重元感應阻力
- HX711 放大電壓信號.
- PC裡 DAQ軟體,抓Arduino傳來信號,以Excel顯示
----程式碼----
/* * E+ Red, E- Black,A- white,A+ Blue,數字顛到 A-,A+交換 * ----------------------------------------------------------- * 調整 Scale line33 數字改變 * add Accel stepper motor * 小數點修改方式,一位:(scale.get_units(100), 1) 二位: (scale.get_units(100), 2) * 修改 baurade 38400>9600 * Serial.print減少,適應Excel * ----------------------------------------------------------------------------------- * AccelStepper Lib無法用 堵轉 失步 * TB6560 * 改 http://arduinojackychi.blogspot.tw/2016/03/tb6560.html * 步進電機不走 * ------------------------------------------------------------------------------------ * 修改 Pin scale.begin(5, 6);//scale.begin(A1, A0) * ------------------------------------------------------------------------------- * 調回scale.begin(A1, A0).控制器給一信號,D8接繼電器,啟動步進控制器 * ok,下一步 連結 EXcell 170817 12:00 * ----------------------------------------------------------------------------------------- * 連結 EXcell */ #include "HX711.h" #includeHX711 scale; //int Distance = 0; int a = 0 ; void setup() { Serial.begin(9600); scale.begin(A1, A0); scale.set_scale(1562.f); // this value is obtained by calibrating the scale with known weights scale.tare(); // reset the scale to 0 pinMode(8, OUTPUT);//開關//direction: cw+, Ground :cw-,EN+懸空 digitalWrite(8, HIGH); delay (100) ; digitalWrite(8, LOW); Serial.println("LABEL,Poisition,Tensile"); } void loop() { /* if (Distance == 12800) { //原3200,0.5cm We are! Reverse direction (invert DIR signal) if (digitalRead(8) == LOW) { digitalWrite(8, HIGH); } else {digitalWrite(8, LOW); } // Reset our distance back to zero since we're // starting a new move Distance = 0; // Now pause for half a second delay(500); } */ a= a+ 1 ; Serial.print("DATA"); Serial.print(","); Serial.print("a"); Serial.print(","); Serial.println(scale.get_units(), 1); delay(200); //scale.power_up(); // scale.power_up(); }
請問此儀器成品是否可以外銷歐洲
回覆刪除我歐爭客戶有興趣