Cov txheej txheem:
- Kauj Ruam 1: Txoj Cai Ua Haujlwm
- Kauj ruam 2: Tsim
- Kauj ruam 3: Sib dhos
- Kauj Ruam 4: Tsim Koj Kab Kab
- Kauj ruam 5: Program Koj Txoj Cai
- Kauj ruam 6: Ua tiav
Video: PID Raws Li Kab Tom Qab Neeg Hlau Nrog POLOLU QTR 8RC-sensor Array: 6 Cov Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Nyob zoo!
qhov no yog kuv thawj zaug sau ntawm cov lus qhia, thiab hnub no kuv yuav coj koj mus rau txoj kev, thiab piav qhia txog yuav ua li cas thab PID raws kab tom qab neeg hlau siv QTR-8RC sensor array.
Ua ntej mus rau lub tsev tsim neeg hlau, peb yuav tsum nkag siab qhov hu ua PID,
Kauj Ruam 1: Txoj Cai Ua Haujlwm
PID yog dab tsi ??
Lub sij hawm PID sawv rau qhov sib npaug, ib feem, qhov ua piv txwv.so yooj yim, qhov peb tab tom ua nrog cuam tshuam nrog PID nrog kab hauv qab no yog, peb tau hais kom cov neeg hlau ua raws txoj kab thiab txhawm rau txheeb xyuas qhov tig los ntawm kev suav qhov yuam kev los ntawm kev txiav txim siab li cas deb nws tau txav tawm ntawm txoj kev.
cov ntsiab lus tseem ceeb raws li tau hais hauv cov ntaub ntawv polalu
Tus nqi sib npaug yog kwv yees li sib npaug rau koj tus neeg hlau txoj haujlwm nrog kev hwm rau kab. Ntawd yog, yog tias koj tus neeg hlau yog qhov ncaj ncaj ntawm kab, peb cia siab tias tus nqi sib npaug ntawm 0
Tus nqi tseem ceeb sau tseg keeb kwm ntawm koj tus neeg hlau lub zog: nws yog qhov suav tag nrho ntawm txhua qhov txiaj ntsig ntawm cov lus sib piv uas tau sau tseg txij li tus neeg hlau pib ua haujlwm
Cov txiaj ntsig yog qhov hloov pauv ntawm tus nqi sib npaug
Hauv qhov kev qhia no, peb yuav tham txog Kp thiab Kd cov ntsiab lus xwb, txawm li cas los xij, cov txiaj ntsig tuaj yeem ua tiav siv cov lus Ki ib yam nkaus..so qhov tseem ceeb Lub ntsuas hluav taws xob muab qhov tseem ceeb ntawm 0 txog 2500 xws li los ntawm qhov siab tshaj plaws mus rau qhov xav tau tsawg kawg nkaus, tab sis, tib lub sijhawm, tseem muab cov ntaub ntawv qhia txog kev deb npaum li cas tus neeg hlau tau tso tseg ntawm kab.)
Tam sim no peb yuav tsum txiav txim siab lub sijhawm yuam kev, Qhov no yog qhov sib txawv ntawm ob qhov txiaj ntsig setpoint tus nqi thiab tus nqi tam sim no. Piv txwv li: Yog tias koj tab tom siv lub ntsuas qhov ntsuas no thiab siv 8 lub ntsuas, koj yuav tau txais txoj haujlwm nyeem ntawm 3500 yog tias koj nyob ntawm, ib puag ncig 0 yog tias koj nyob deb dhau lawm kab thiab ib puag ncig 7000 yog tias koj nyob deb dhau lawm.). Peb lub hom phiaj yog ua kom yuam kev xoom. Tom qab ntawd tsuas yog tus neeg hlau tuaj yeem ua raws txoj kab.
Tom qab ntawd los suav qhov ib feem,.
1) xam qhov yuam kev.
Yuam kev = Setpoint Tus Nqi - Tus Nqi Tam Sim No = 3500 - txoj haujlwm
Raws li kuv siv 8 sensors. lub sensor muab txoj haujlwm nyeem ntawv ntawm 3500 thaum tus neeg hlau tau ua tiav. Tam sim no peb tau suav peb qhov ua yuam kev, cov npoo uas peb cov neeg hlau hla hla txoj kab, nws yog lub sijhawm rau peb los tshuaj xyuas qhov ua yuam kev thiab kho lub cav kom nrawm
2) txiav txim siab kho qhov nrawm ntawm lub cav.
MotorSpeed = Kp * Yuam Kev + Kd * (Yuam Kev - LastError);
LastError = Yuam kev;
RightMotorSpeed = RightBaseSpeed + MotorSpeed;
LeftMotorSpeed = LeftBaseSpeed - MotorSpeed;
Kev hais lus zoo, qhov tsis raug ntawm 0 txhais tau tias peb tus neeg hlau tawm mus rau sab laug, uas txhais tau tias peb tus neeg hlau yuav tsum tau mus rau sab xis me ntsis, uas nyob rau hauv lem txhais tau tias, txoj cai lub cev xav tau yuav tsum qeeb thiab lub cav sab laug xav tau kom nrawm dua. Qhov no yog PID!
Tus nqi MotorSpeed tau txiav txim siab los ntawm qhov sib npaug nws tus kheej. RightBaseSpeed thiab LeftBaseSpeed yog qhov nrawm (ib qho txiaj ntsig ntawm PWM 0-255) uas tus neeg hlau khiav ntawm thaum qhov yuam kev yog xoom.
Cov cai uas kuv tau txuas nrog suav nrog yuav ua li cas txhawm rau txheeb xyuas qhov tseem ceeb ntawm lub ntsuas cua, yog li koj tuaj yeem qhib lub ntsuas saib thiab tso cov cai thiab saib rau koj tus kheej nrog kab kab li cas lub cav tig thaum txoj haujlwm sib txawv.
Yog tias koj ntsib teeb meem thaum siv koj tus neeg hlau, tsuas yog txheeb xyuas seb puas pom thiab hloov pauv cov cim ntawm kev ua zauv !!!
Thiab tam sim no qhov nyuaj tshaj plaws Nrhiav Kp THIAB Kd, Kuv yuav tsum siv sijhawm ntau dua 1 teev los kho kuv tus neeg hlau kom zoo.
- Pib nrog kp thiab Kd sib npaug 0, thiab pib nrog Kp, thawj zaug sim teeb tsa Kp rau 1 thiab soj ntsuam tus neeg hlau, peb lub hom phiaj yog ua raws kab txawm hais tias nws tsis txaus, yog tias tus neeg hlau hla dhau thiab poob txoj kab txo tus nqi kp.if tus neeg hlau tsis tuaj yeem taug kev tig thiab ua rau qeeb zuj zus Kp tus nqi.
- Thaum tus neeg hlau zoo li ua qee qhov ua raws kab hloov kho Kd tus nqi (Kd tus nqi> Kp tus nqi) pib los ntawm 1 thiab nce tus nqi kom txog thaum koj pom kev ua haujlwm du nrog tsawg dua wobbling.
- Thaum tus neeg hlau pib ua raws kab, ua kom nrawm dua thiab pom tias nws puas tuaj yeem khaws thiab ua raws kab.
Nco ntsoov tias kev nrawm muaj qhov cuam tshuam ncaj qha rau PID kev hloov pauv thiab qee zaum koj yuav tsum tau rov qab los kom haum rau qhov nrawm ntawm koj tus neeg hlau.
Tam sim no peb tuaj yeem nqis los tsim peb cov neeg hlau.
Kauj ruam 2: Tsim
Arduino atmega 2560 nrog USB cable - Qhov no yog lub microcontroller tseem ceeb siv.
Chassis- rau cov neeg hlau chassis Kuv tau siv 2 lub voj voos acrylic daim hlau uas tau siv rau lwm qhov haujlwm uas zoo tshaj rau qhov no. siv cov txiv ntseej thiab cov ntsia hlau Kuv tau tsim 2 lub chassis storied, yog li kuv tuaj yeem txuas lwm cov qauv rau sab saud.or koj tuaj yeem siv cov chassis npaj ua.
www.ebay.com/itm/2WD-DIY-2-Wheel-Drive-Rou…
Micrometal gear motors- tus neeg hlau xav tau lub cav nrawm nrawm txhawm rau txhawm rau tiv nrog PID niaj hnub, rau qhov kuv tau siv lub cav ntsuas ntawm 6V 400rpm thiab cov log uas tsim nyog.
www.ebay.com/itm/12mm-6V-400RPM-Torque-Gea…
www.ebay.com/itm/HOT-N20-Micro-Gear-Motor-…
QTR 8Rc sensor array - qhov no tuaj yeem siv rau kab kev taug qab, raws li tau hais ua ntej kuv xav tias tam sim no koj tau nkag siab meej txog yuav ua li cas khiav lub sensor array nrog PID.the code yooj yim heev thiab siv cov tsev qiv ntawv arduino uas twb muaj lawm koj yuav muaj peev xwm los tsim kom tau tus kab nrawm.
www.ebay.com/itm/Pololu-QTR-8RC-Reflectanc…
TB6612FNG Lub Cev Tsav Tsheb-Kuv xav siv lub tshuab tsav tsheb uas tuaj yeem ua haujlwm tig thiab hloov cov lus qhia hauv lub snap, uas muaj peev xwm ua tau zoo nres lub cav thaum lub PWM teeb liab mus qis.
www.ebay.com/itm/Pololu-Dual-DC-Motor-Driv…
Lipo battery- 11.1V lipo roj teeb tau siv los muab lub zog rau tus neeg hlau. Txawm li cas los xij kuv tau siv lub roj teeb li 11.1 V, qhov peev xwm no ntau dua li qhov xav tau rau arduino thiab lub cav. Yog tias koj tuaj yeem pom lub teeb yuag 7.4V lipo roj teeb lossis 6V Ni-MH roj teeb pob nws yuav zoo.due vim li no kuv thiaj li yuav tsum siv lub pob hloov pauv kom hloov qhov hluav taws xob mus rau 6V.
11.1V-
7.4 V-
Buck converter module-
Ntxiv rau qhov uas koj xav tau jumper xov hlau, txiv ntseej thiab ntsia hlau, ntsia hlau thiab kab xev hluav taws xob thiab tseem txuas cov hlua kom ntseeg tau tias txhua yam nyob hauv qhov chaw.
Kauj ruam 3: Sib dhos
txuas lub cav thiab lub log me me rau hauv phaj uas siv cov txiv ntoo thiab cov ntsia hlau thiab tom qab ntawd nce QTR sensor, tsav lub cev, lub rooj tsav tsheb arduino thiab thaum kawg roj teeb rau ntawm lub chassis.
Nov yog daim duab zoo tshaj plaws uas kuv pom hauv is taws nem, uas qhia koj tias yuav tsum sib txuas li cas.
Kauj Ruam 4: Tsim Koj Kab Kab
Tam sim no koj txoj haujlwm zoo li yuav luag tiav.as rau theem kawg koj yuav tsum muaj thaj chaw me me los ntsuas koj tus neeg hlau.i tau siv kab kab dav ntawm qhov dav 3cm kab dawb ntawm keeb kwm dub. Nco ntsoov tias koj muab txhua yam tso rau qhov zoo.and rau lub sijhawm tsis pub dhau 90 degees lub kaum sab xis hla thiab kev sib tshuam, vim tias nws yog cov teeb meem nyuaj hauv qhov taw qhia ntawm coding.
Kauj ruam 5: Program Koj Txoj Cai
1. Rub tawm thiab teeb tsa Arduino
Desktop IDE Cov
· Windows -
· Mac OS X -
· Linux -
2. Rub tawm thiab muab tshuaj QTR 8 RC sensor cov ntaub ntawv xa mus rau Arduino cov tsev qiv ntawv tais ceev tseg.
·
· Muab cov ntawv tso rau hauv txoj kev - C: / Arduino / libraries
3. Rub tawm thiab openLINEFOLLOWING.ino
4. Tshaj tawm cov cai mus rau pawg thawj coj ntawm arduino ntawm USB cable
Kauj ruam 6: Ua tiav
tam sim no koj muaj kab hauv qab cov neeg hlau tsim los ntawm koj tus kheej.
Vam tias qhov kev qhia no tau pab. Tsis txhob yig tau hu rau kuv ntawm [email protected] yog tias koj muaj teeb meem.
pom koj sai sai nrog lwm qhov haujlwm tshiab.
Txaus siab rau lub tsev !!
Pom zoo:
Arduino - Cov Maze Solving Robot (MicroMouse) Phab Ntsa Tom Qab Neeg Hlau: 6 Cov Kauj Ruam (nrog Duab)
Arduino | Cov Maze Solving Robot (MicroMouse) Phab Ntsa Tom Qab Neeg Hlau: Txais Tos Kuv Isaac thiab qhov no yog kuv thawj tus neeg hlau " Striker v1.0 " .Qhov Robot no tau tsim los daws qhov yooj yim Maze. muaj peev xwm txheeb xyuas lawv.Yog lwm qhov kev hloov pauv hauv qhov tshawb nrhiav yuav xav tau kev hloov pauv hauv
Cov Kab Zoo Tom Qab Neeg Hlau: 22 Cov Kauj Ruam (nrog Duab)
Cov Kab Zoo Ua Ntej Cov Neeg Hlau: Qhov no yog kab ua haujlwm siab raws cov neeg hlau raws Teensy 3.6 thiab QTRX kab sensor uas kuv tau tsim thiab tau ua haujlwm rau qee lub sijhawm. Muaj qee qhov kev txhim kho tseem ceeb hauv kev tsim thiab ua tau zoo los ntawm kuv kab ua ntej hauv qab no neeg hlau. T
5 hauv 1 Arduino Neeg Hlau - Ua raws kuv - Kab Hauv Qab - Sib - Teeb duab - Zam Kev Zam Txim: 6 Kauj Ruam
5 hauv 1 Arduino Neeg Hlau | Ua raws kuv | Kab Hauv Qab | Sib | Teeb duab | Zam Kev Zam Txim: Pawg tswj hwm neeg hlau no muaj ATmega328P microcontroller thiab L293D tsav tsheb. Tau kawg, nws tsis txawv ntawm Arduino Uno board tab sis nws muaj txiaj ntsig ntau dua vim tias nws tsis xav tau lwm daim ntaub thaiv los tsav lub cav! Nws yog dawb los ntawm dhia
Kab Tom Qab Neeg Hlau: 5 Kauj Ruam
Kab Tom Qab Neeg Hlau: Nyob Zoo Txhua Tus, Hauv cov lus qhia no, kuv yuav qhia yuav ua li cas thiaj ua Kab Tom Qab Neeg Hlau siv cov khoom siv los ntawm Amazon. Kuv siv cov khoom siv no los qhia kuv tus menyuam yuav ua li cas thiaj li yuav tau siv tshuaj txhuam hniav. Feem ntau cov khoom siv no ncaj nraim rau tom ntej, koj tau txais txhua yam khoom siv, cov khoom siv, thiab lwm yam nrog cov khoom siv
Yuav Ua Li Cas Kab Tom Qab Neeg Hlau Siv Rpi 3: 8 Cov Kauj Ruam
Yuav Ua Li Cas Ua Kab Tom Qab Neeg Hlau Siv Rpi 3: Hauv qhov kev qhia no, koj yuav kawm tsim kab-hauv qab cov neeg hlau kab laum kom nws tuaj yeem ntxais ib ncig ntawm txoj kev yooj yim