Cov txheej txheem:
- Kauj ruam 1: Mount Load Cell
- Kauj Ruam 2: Hlau Load Cell thiab HX711
- Kauj Ruam 3: Ntxiv HX711 Library rau Koj Arduino IDE
- Kauj ruam 4: Txheeb thiab ntsuas
Video: Arduino Tension Scale Nrog 40 Kg Lub Hnab Load Cell thiab HX711 Amplifier: 4 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:24
Cov Lus Qhia no piav qhia yuav ua li cas ntsuas qhov nrawm siv npaj muaj nyob ntawm cov txee khoom.
Cov ntaub ntawv xav tau:
1. Arduino - qhov kev tsim qauv no siv tus qauv Arduino Uno, lwm yam Arduino version lossis clones yuav tsum ua haujlwm ib yam nkaus
2. HX711 ntawm pawg thawj coj saib tsis taus - Cov microchip no tau tsim tshwj xeeb rau ua kom nrov nrov los ntawm cov xovtooj ntawm tes thiab qhia lawv rau lwm tus mircocontroller. Lub hlwb thauj khoom ntsaws rau hauv lub rooj tsavxwm no, thiab pawg thawj coj no qhia rau Arduino seb lub load cell ntsuas li cas.
3. Tension load cell (40 kg) nrog cov khoom sib dhos. Muaj 2 txoj hauv kev kom tau txais ib qho ntawm cov no. Koj tuaj yeem yuav ib qho uas twb tau ua (yooj yim), lossis koj tuaj yeem sib nrug qhov pheej yig lub nra ntawm lub nra thiab tshem tawm cov xov tooj ntawm tes (nyuaj dua tab sis koj yuav twb muaj ib qho dag ib ncig). Koj tuaj yeem yuav ib qho uas twb tau ua nrog HX711 ntawm no:
Yog tias koj yuav cov khoom thov tawm kev tshuaj xyuas! Nws yog qhov muaj txiaj ntsig zoo rau cov neeg yuav khoom yav tom ntej.
4. Mounting kho vajtse. Nyob ntawm koj daim ntawv thov qhov no tuaj yeem yog hlua, ntsia hlau, zip txuas, txhua yam los txuas cov kab zauv rau lub zog koj xav ntsuas.
5. Cov xov hlau hauv ntau xim rau txuas txhua ntu
6. Lub hwj chim rau Arduino
Kauj ruam 1: Mount Load Cell
Ua ntej peb yuav nce lub load cell. Koj lub mount yuav txawv, tab sis ntawm no yog cov lus qhia koj yuav tsum tau ua raws:
1. Cov hlau thauj khoom ntawm tes yog phaj nrog cov ntsuas ntsuas uas tau muab tso rau nruab nrab. Lub xovtooj ntawm tes ntsuas lub zog los ntawm kev paub ntau npaum li cas lub xovtooj ntawm tes khoov.
2. Cov nkhaus txuas los ntawm lub qhov nyob rau qhov kawg ntawm lub load cell beam. Cov kab zauv yog zoo li tus rub quab yuam tau thov ntawm qhov nruab nrab ntawm lub load cell beam. Vim tias lawv cov duab thiab qhov chaw nyob txuas, lub xov tooj ntawm tes nqaj khoov thaum cov kab zauv rub tawm.
3. Nqa cov kab zauv rau yam koj xav ntsuas. Nws yog qhov zoo tshaj rau qhov no nrog qee yam uas tuaj yeem txav tau dawb (zoo li saw, nqes, hlua ruaj khov, lossis zip sib txuas). Koj xav tau lub nra ntawm tes thiab lub rooj sib dhos tuaj yeem tuaj yeem nruab nws tus kheej hauv qhov kev taw qhia ntawm kev thauj khoom yog li qhov ntsuas yog qhov tseeb.
Kauj Ruam 2: Hlau Load Cell thiab HX711
Saib daim duab kab xev seb yuav txuas lub xovtooj ntawm tes, HX711, thiab Arduino li cas.
Ntawm lub nra ntim khoom thauj cov cell zoo li ib qho qhia, ntau qhov ntsuas ntsuas tau twb txuas ua ke rau tus choj Wheatstone. Txhua yam koj yuav tsum tau ua yog txuas cov xov hlau mus rau HX711 pawg thawj coj hauv kev qhia kom raug.
Kauj Ruam 3: Ntxiv HX711 Library rau Koj Arduino IDE
Lub tsev qiv ntawv HX711 muaj nyob ntawm no:
Saib qhov txuas no ntawm Arduino lub vev xaib rau cov lus qhia yuav ua li cas ntxiv cov tsev qiv ntawv rau koj Arduino IDE:
Kauj ruam 4: Txheeb thiab ntsuas
Sparkfun muaj cov phiaj xwm Arduino zoo los ua qhov ntsuas. Qhov hloov tshiab tshaj plaws muaj nyob ntawm GitHub thiab luam tawm hauv qab no:
Thawj qib software yog txhawm rau txiav txim siab qhov ntsuas rau qhov ntsuas. Txhawm rau ua qhov no, khiav cov cai no
/*
Piv txwv siv SparkFun HX711 breakout board nrog ntsuas los ntawm: Nathan Seidle SparkFun Electronics Hnub tim: Kaum Ib Hlis 19th, 2014 Daim ntawv tso cai: Tus lej no yog pej xeem sau tab sis koj yuav npias rau kuv yog tias koj siv qhov no thiab peb ntsib ib hnub twg (Daim ntawv tso cai Beerware). Nov yog daim duab calibration. Siv nws los txiav txim siab calibration_factor uas tus piv txwv tseem ceeb siv. Nws kuj tseem tso tawm zero_factor muaj txiaj ntsig zoo rau cov phiaj xwm uas muaj qhov hnyav tas mus li ntawm qhov ntsuas nruab nrab ntawm lub zog mus. Teeb koj cov nplai thiab pib kos duab yam tsis muaj qhov hnyav ntawm qhov ntsuas Thaum nyeem tau pom tso qhov hnyav ntawm qhov ntsuas Nyem +/- lossis a/z txhawm rau kho qhov ntsuas ntsuas qhov ua tau zoo kom txog rau thaum cov ntawv nyeem nyeem sib phim qhov paub qhov hnyav Siv qhov ntsuas ntsuas no ntawm tus piv txwv piv txwv Qhov piv txwv no kwv yees phaus (lbs). Yog tias koj xav tau hnyav, hloov Serial.print ("lbs"); line li kg Qhov ntsuas ntsuas yuav txawv sib txawv tab sis nws yuav cuam tshuam ncaj qha rau lbs (1 lbs = 0.453592 kg). Koj qhov kev ntsuas ntsuas yuav zoo heev lossis tsis zoo. Txhua yam nws nyob ntawm kev teeb tsa ntawm koj cov txheej txheem ntsuas thiab kev coj ua lub ntsuas hluav taws xob los ntawm xoom xeev Qhov piv txwv no siv bogde lub tsev qiv ntawv zoo: "https://github.com/bogde/HX711" bogde lub tsev qiv ntawv raug tso tawm hauv GNU GENERAL PUBLIC LICENSE Arduino tus pin 2 -> HX711 CLK 3 -> DOUT 5V -> VCC GND -> GND Feem ntau txhua tus pin ntawm Arduino Uno yuav sib xws nrog DOUT/CLK. HX711 pawg thawj coj tuaj yeem siv hluav taws xob los ntawm 2.7V txog 5V yog li Arduino 5V lub zog yuav tsum zoo. */ #include "HX711.h" #define LOADCELL_DOUT_PIN 3 #define LOADCELL_SCK_PIN 2 HX711 nplai; ntab calibration_factor = -7050; //-7050 ua haujlwm rau kuv 440lb max nplai teeb tsa teeb tsa () {Serial.begin (9600); Serial.println ("HX711 ntsuas qhov ntsuas"); Serial.println ("Tshem tag nrho qhov hnyav los ntawm qhov ntsuas"); Serial.println ("Tom qab nyeem ntawv pib, tso qhov hnyav paub qhov hnyav"); Serial.println ("Xovxwm + lossis a txhawm rau txhawm rau ntsuas qhov ntsuas"); Serial.println ("Xovxwm - lossis z kom txo qhov ntsuas qhov ntsuas"); scale.begin (LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN); teev.set_scale (); nplai.are (); // Pib dua qhov ntsuas rau 0 ntev zero_factor = scale.read_average (); // Tau txais lub hauv paus nyeem Serial.print ("Zero factor:"); // Qhov no tuaj yeem siv los tshem qhov xav tau los ntsuas qhov ntsuas. Pab tau nyob hauv cov phiaj xwm ruaj khov. Serial.println (zero_factor); } void loop () {scale.set_scale (calibration_factor); // Kho qhov ntsuas qhov ntsuas no Serial.print ("Nyeem:"); Serial.print (teev.get_units (), 1); Serial.print ("lbs"); // Hloov qhov no mus rau kg thiab rov kho qhov ntsuas qhov tseeb yog tias koj ua raws SI units zoo li tus neeg zoo Serial.print ("calibration_factor:"); Serial.print (calibration_factor); Serial.println (); yog (Serial.available ()) {char temp = Serial.read (); yog (temp == ' +' || temp == 'a') calibration_factor += 10; lwm yog (temp == ' -' || temp == 'z') calibration_factor -= 10; }}
Tom qab ntsuas qhov ntsuas, koj tuaj yeem ua haujlwm cov qauv no, tom qab ntawd hack nws rau koj tus kheej lub hom phiaj:
/*
Piv txwv siv SparkFun HX711 breakout board nrog ntsuas los ntawm: Nathan Seidle SparkFun Electronics Hnub: Kaum Ib Hlis 19th, 2014 Daim ntawv tso cai: Tus lej no yog pej xeem sau tab sis koj yuav npias rau kuv yog tias koj siv qhov no thiab peb ntsib ib hnub twg (Daim ntawv tso cai Beerware). Qhov piv txwv no qhia txog kev ntsuas qhov yooj yim. Saib cov duab ntsuas kom tau txais qhov ntsuas qhov ua tau zoo rau koj cov teeb tsa tshwj xeeb ntawm tes. Qhov piv txwv no siv bogde lub tsev qiv ntawv zoo: "https://github.com/bogde/HX711" bogde lub tsev qiv ntawv raug tso tawm raws li GNU GENERAL PUBLIC LICENSE HX711 ua ib yam zoo: nyeem cov xov tooj. Lub rooj sib tsoo tawg yog sib xws nrog txhua cov nplej-pob zeb choj raws lub xov tooj ntawm tes uas yuav tsum tso cai rau tus neeg siv ntsuas txhua yam los ntawm ob peb grams mus rau kaum tawm tons. Arduino tus pin 2 -> HX711 CLK 3 -> DAT 5V -> VCC GND -> GND Lub HX711 pawg thawj coj tuaj yeem siv hluav taws xob los ntawm 2.7V txog 5V yog li Arduino 5V lub zog yuav tsum zoo. */#include "HX711.h" #define calibration_factor -7050.0 // Tus nqi no tau txais siv SparkFun_HX711_Calibration sketch #define LOADCELL_DOUT_PIN 3 #define LOADCELL_SCK_PIN 2 HX711 nplai; teeb tsa tsis muaj dab tsi () {Serial.begin (9600); Serial.println ("HX711 scale demo"); scale.begin (LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN); scale.set_scale (calibration_factor); // Tus nqi no tau los ntawm kev siv SparkFun_HX711_Calibration sketch scale.tare (); // Piv txwv tias tsis muaj qhov hnyav ntawm qhov ntsuas thaum pib, rov pib dua qhov ntsuas rau 0 Serial.println ("Nyeem:"); } void loop () {Serial.print ("Nyeem:"); Serial.print (teev.get_units (), 1); //scale.get_units () rov qab ntab Serial.print ("lbs"); // Koj tuaj yeem hloov qhov no rau kg tab sis koj yuav tsum tau rov kho qhov ntsuas qhov ntsuas qhov tseeb_printor Serial.println (); }
Pom zoo:
Lub Hnab Tsis Siv Lub Hnab (nrog Tus Kheej): 9 Kauj Ruam (nrog Duab)
Lub Hnab Tsis Siv Lub Hnab (nrog Tus Kheej): Txawm hais tias peb yuav nyob deb ntawm cov neeg hlau sawv tawm tsam, muaj ib lub tshuab uas cuam tshuam nrog tib neeg lawm, txawm li cas los xij hauv txoj kev zoo tshaj plaws ua tau. Txawm hais tias koj xav hu nws lub thawv tsis muaj txiaj ntsig lossis lub tshuab tso kuv-nyob ib leeg, qhov plucky, sassy neeg hlau yog
Arduino Chav Nplai Nrog 50 Kg Load Cells thiab HX711 Amplifier: 5 Kauj Ruam (nrog Duab)
Arduino Chav Nplai Nrog 50 Kg Load Cells thiab HX711 Amplifier: Cov lus qhia no piav qhia yuav ua li cas ntsuas qhov hnyav uas siv tau yooj yim tawm ntawm cov khoom seem.Muaj ntaub ntawv xav tau: Arduino - (kev tsim qauv no siv tus qauv Arduino Uno, lwm yam Arduino version lossis clones yuav tsum ua haujlwm) kuj) HX711 ntawm kev tawm tsam boa
Arduino Nplai Nrog 5kg Load Cell thiab HX711 Amplifier: 4 Kauj Ruam (nrog Duab)
Arduino Nplai Nrog 5kg Load Cell thiab HX711 Amplifier: Cov lus qhia no piav qhia yuav ua li cas ntsuas qhov hnyav me me uas siv tau yooj yim ntawm cov khoom seem.Materials xav tau: 1. Arduino - qhov kev tsim qauv no siv tus qauv Arduino Uno, lwm yam Arduino cov ntawv lossis cov pob zeb yuav tsum ua haujlwm ib yam nkaus. HX711 ntawm kev tawm tsam
Cov Hnab Hnab Hnab Tsho Hnab Tsho Chaw Nyob: 11 Kauj Ruam
Cov Hnab Ntim Hnab Hauv Cov Chaw Taws Teeb: Tam sim no ib hnub cov thev naus laus zis tau txav mus rau qhov kev paub ntau ntxiv uas muab rau tus neeg siv txoj hauv kev tshiab los cuam tshuam nrog yam khoom hauv ib puag ncig virtual lossis kev muaj tiag. Nrog thev naus laus zis hnav tau nce zuj zus thiab ntau ntxiv nrog cov xov tooj ntse ntxiv rau
Los ntawm Lub Hnab Phaser mus rau Lub Hnab Hnab Laser: 6 Cov Kauj Ruam
Los ntawm Lub Hnab Phaser mus rau Lub Hnab Hnab Laser: Hauv qhov haujlwm no, peb yuav hloov pauv me ntsis khoom ua si Star Trek Phaser Kuv pom ntawm Barnes & Noble rau lub laser pointer. Kuv muaj ob ntawm cov phasers no, thiab ib qho tsis muaj roj teeb rau lub teeb ci me ntsis, yog li kuv txiav txim siab hloov nws mus rau lub laser rov ua dua tshiab