Cov txheej txheem:
- Kauj ruam 1: Mount Load Cell
- Kauj Ruam 2: Hlau Load Cells thiab HX711
- Kauj Ruam 3: Ntxiv HX711 Library rau Koj Arduino IDE
- Kauj ruam 4: Txheeb thiab ntsuas
Video: Arduino Nplai Nrog 5kg Load Cell thiab HX711 Amplifier: 4 Kauj Ruam (nrog Duab)
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 hnyav me me uas siv tau yooj yim ntawm cov khoom seem.
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. 5kg load cell - Load cells yog qhov tshwj xeeb zoo li cov hlau uas muaj qhov ntsuas ntsuas ntsuas kua nplaum rau lawv. Cov ntsuas ntsuas yog cov resistors uas hloov lawv qhov resitance thaum lawv khoov. Thaum cov hlau hlau khoov, qhov ua haujlwm ntawm lub xov tooj ntawm tes hloov pauv (HX711 ntsuas qhov kev hloov pauv me me hauv kev tiv thaiv kom raug). Koj tuaj yeem yuav ob qho HX711 thiab thauj khoom 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. Lub tiaj tiaj tiaj tiaj tiaj tiaj (x2) - ib qho tawv ntoo tawv lossis hlau zoo tagnrho.
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. Aluminium load cell yuav tsum muaj 4 lub qhov taub thiab daim ntawv lo qhia qhov taw qhia ntawm kev quab yuam. Qhov sab tsis muaj daim ntawv lo rau qhov chaw ruaj khov thiab teeb sab nrog daim ntawv lo rau qhov txav mus los. Cov xub ntawm daim ntawv lo sab yuav tsum taw tes rau hauv qhov kev taw qhia lub platform yuav txav mus thaum siv lub nra.
2. Cov phaj mounting thiab cov phaj txav yuav tsum ob leeg ua kom nruj li sai tau
3. Ua kom ntseeg tau tias yuav tsum tau muab qee yam sib txawv ntawm cov phaj sib dhos thiab cov cell load. Standoffs lossis washers ob leeg ua haujlwm zoo. Lub hom phiaj yog tias txhua qhov quab yuam siv rau lub phaj txav ua rau lub xovtooj ntawm tes khoov thiab ntswj. Yog tsis muaj spacers, thauj khoom yuav raug xa ncaj qha los ntawm cov phaj txav mus rau phaj ruaj ruaj yam tsis cuam tshuam rau lub load cell.
Kauj Ruam 2: Hlau Load Cells thiab HX711
Saib daim duab kab xev seb yuav txuas lub xovtooj ntawm tes, HX711, thiab Arduino li cas.
Ntawm aluminium load cell, 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: 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 Lub HX711 ua ib yam zoo: nyeem cov hlwb. 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:
Arduino Tension Scale Nrog 40 Kg Lub Hnab Load Cell thiab HX711 Amplifier: 4 Kauj Ruam
Arduino Tension Scale Nrog 40 Kg Lub Hnab Load Cell thiab HX711 Amplifier: Cov lus qhia no piav qhia yuav ua li cas thiaj ua kom nruj nruj siv npaj muaj nyob ntawm cov khoom seem.Muaj ntaub ntawv 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 pawg thawj coj saib tsis taus
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
Tsiv thiab Tham Nrog Giant Lego Hulk MiniFig (10: 1 Nplai): 14 Kauj Ruam (nrog Duab)
Tsiv thiab Tham Nrog Giant Lego Hulk MiniFig (10: 1 Nplai): Kuv ib txwm ua si nrog legos thaum tseem yog menyuam yaus, tab sis kuv tsis muaj ib qho ntawm 'zoo nkauj' legos, tsuas yog cov qub lego cib. Kuv kuj yog tus kiv cua loj ntawm Marvel Cinematic Universe (MCU) thiab kuv nyiam tshaj yog Hulk. Yog li vim li cas ho tsis muab ob qho ua ke, thiab ua kom loj heev
DIY Ntse Nplai Nrog Tswb Tswb (nrog Wi-nkaus, ESP8266, Arduino IDE thiab Adafruit.io): 10 Kauj Ruam (nrog Duab)
DIY Ntse Nplai Nrog Tswb Tswb (nrog Wi-nkaus, ESP8266, Arduino IDE thiab Adafruit.io): Hauv kuv qhov haujlwm yav dhau los, Kuv tau tsim chav dej ntse nrog Wi-nkaus. Nws tuaj yeem ntsuas tus neeg siv qhov hnyav, tso saib nws hauv zos thiab xa mus rau huab. Koj tuaj yeem tau txais cov ntaub ntawv ntxaws ntxiv txog qhov no ntawm qhov txuas hauv qab no: https: //www.instructables.com/id/Wi-Fi-Smart-Scale-wi
Tutorial to Interface HX711 Nrog Load Cell Straight Bar 50kg: 10 Kauj Ruam (nrog Duab)
Tutorial to Interface HX711 Nrog Load Cell Straight Bar 50kg: HX711 BALACE MODULED Cov nti no yog tsim los rau qhov ntsuas hluav taws xob muaj txiaj ntsig zoo thiab tsim qauv, muaj ob txoj hauv kev sib txuas sib txuas, cov phiaj xwm tau nce ntawm 128 kev sib txuas ua ke. Lub Circuit Court input