Cov txheej txheem:
- Kauj ruam 1: Kev teeb tsa
- Kauj ruam 2: Configuring Relays
- Kauj Ruam 3: Hysteresis Controller
- Kauj ruam 4: PID Controller
- Kauj Ruam 5: Xov Tsheb
- Kauj Ruam 6: Liab
Video: Thermostat Raws Arduino: 6 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Lub sijhawm no peb tab tom tsim Lub ntsuas cua sov raws li Arduino, ntsuas qhov ntsuas kub thiab tso tawm. Koj tuaj yeem pom ntawm github
Kauj ruam 1: Kev teeb tsa
Kev teeb tsa tag nrho raug khaws cia hauv Config.h. Koj tuaj yeem hloov tus lej PIN tswj kev xa xov, ntsuas kub, qhov pib lossis sijhawm.
Kauj ruam 2: Configuring Relays
Cia peb xav tias peb xav kom muaj 3 qhov txuas:
- ID: 0, PIN: 1, Qhov ntsuas kub: 20
- ID: 1, PIN: 10, Kev ntsuas kub: 30
- ID: 2, PIN: 11, Kev ntsuas kub: 40
Ua ntej koj yuav tsum paub tseeb tias tus lej PIN uas koj xaiv tsis tau siv lawm. Txhua tus pins tuaj yeem nrhiav tau hauv Config.h, lawv tau txhais los ntawm kev hloov pauv pib nrog DIG_PIN.
Koj yuav tsum hloov kho Config.h thiab teeb tsa tus lej PIN, qhov pib thiab tus nqi ntawm kev xa tawm. Pom tseeb qee cov khoom muaj nyob lawm, yog li koj yuav tsum tau kho lawv xwb.
const zoo li qub uint8_t DIG_PIN_RELAY_0 = 1; const zoo li qub uint8_t DIG_PIN_RELAY_1 = 10; const zoo li qub uint8_t DIG_PIN_RELAY_2 = 11;
const zoo li qub uint8_t RELAYS_AMOUNT = 3;
const zoo li qub int16_t RELAY_TEMP_SET_POINT_0 = 20;
const zoo li qub int16_t RELAY_TEMP_SET_POINT_1 = 30; const zoo li qub int16_t RELAY_TEMP_SET_POINT_2 = 40;
Tam sim no peb yuav tsum teeb tsa kev xa tawm thiab tus tswj hwm, qhov no tshwm sim hauv RelayDriver.cpp
initRelayHysteresisController (0, DIG_PIN_RELAY_0, RELAY_TEMP_SET_POINT_0); initRelayHysteresisController (1, DIG_PIN_RELAY_1, RELAY_TEMP_SET_POINT_1); initRelayHysteresisController (2, DIG_PIN_RELAY_2, RELAY_TEMP_SET_POINT_2);
xxx
Kauj Ruam 3: Hysteresis Controller
Nws yog qhov xaiv hauv qhov piv txwv saum toj no, nws muaj ob peb qhov kev teeb tsa ntxiv:
const zoo li qub uint32_t RELAY_DELAY_AFTER_SWITCH_MS = 300000; // 5 minutesconst static uint32_t RHC_RELAY_MIN_SWITCH_MS = 3600000;
RELAY_DELAY_AFTER_SWITCH_MS muab sijhawm tos rau kev hloov pauv tom ntej Xav txog qhov teeb tsa los ntawm peb tus piv txwv yuav pib ua haujlwm hauv 40 degrees ib puag ncig. Qhov no yuav ua rau muaj peev xwm ua tau ntawm peb qhov kev xa tawm tib lub sijhawm. Qhov no tuaj yeem ua rau siv hluav taws xob siab - nyob ntawm seb koj tab tom tswj hwm, lub cav hluav taws xob piv txwv li siv lub zog ntau dua thaum pib. Hauv peb qhov xwm txheej hloov pauv tau muaj cov dej hauv qab no: thawj kis mus, tos 5 feeb, thib ob mus, tos 5 feeb, thib peb mus.
RHC_RELAY_MIN_SWITCH_MS txhais hysteresis, nws yog qhov tsawg kawg nkaus rau qhov tshwj xeeb xa mus hloov nws lub xeev. Thaum nws qhib, nws yuav nyob rau qhov tsawg kawg rau lub sijhawm no, tsis quav ntsej qhov hloov pauv kub. Qhov no nyob ntsiag to muaj txiaj ntsig nws koj tab tom tswj cov tshuab hluav taws xob, txij li txhua qhov hloov pauv muaj qhov tsis zoo rau lub sijhawm nyob.
Kauj ruam 4: PID Controller
Nov yog cov ncauj lus siab. Siv qhov kev tswj hwm no yog txoj haujlwm yooj yim, nrhiav qhov chaw teeb tsa kom raug yog ib zaj dab neeg sib txawv.
Txhawm rau siv PID maub los koj yuav tsum hloov initRelayHysteresisController (…..) rau initRelayPiDController (….) Thiab koj yuav tsum nrhiav qhov chaw raug rau nws. Raws li ib txwm koj yuav pom lawv hauv Config.h
Kuv tau siv qhov kev sim yooj yim hauv Java, yog li nws tuaj yeem pom qhov tshwm sim. Nws tuaj yeem pom nyob hauv daim nplaub tshev: pidsimulator. Below koj tuaj yeem pom simulation rau ob tus tswj PID a P. PID tsis ruaj khov vim kuv tsis tau siv ib qho txheej txheem ntse los nrhiav qhov raug.
Ntawm ob daim phiaj xav tau kub tau teev tseg rau 30 (xiav). Qhov ntsuas kub tam sim no qhia kab ntawv nyeem. Relay muaj ob lub xeev ON thiab OFF. Thaum nws tau ua kom sov poob los ntawm 1.5, thaum nws xiam oob qhab nws nce los ntawm 0.5.
Kauj Ruam 5: Xov Tsheb
Cov software sib txawv sib txawv yuav tsum sib tham nrog ib leeg, vam tias tsis yog ob txoj hauv kev;)
Piv txwv li:
- cov lej txheeb cais yuav tsum paub thaum tshwj xeeb txuas mus thiab tawm,
- nias lub pob yuav tsum hloov pauv cov ntsiab lus pom thiab nws tseem yuav tsum ncua kev pabcuam uas yuav haus ntau CPU mus, piv txwv li ntsuas kub los ntawm lub ntsuas cua,
- tom qab qee lub sijhawm ntsuas kub yuav tsum tau rov ua dua tshiab,
- thiab ntxiv rau….
Txhua tus qauv txuas nrog Xov Xwm Bus thiab tuaj yeem sau npe rau cov xwm txheej tshwj xeeb, thiab tuaj yeem tsim cov xwm txheej (thawj daim duab).
Ntawm daim duab thib ob peb tuaj yeem pom cov xwm txheej ntws los ntawm nias lub pob.
Qee lub Cheebtsam muaj qee yam haujlwm uas yuav tsum tau ua ua ntu zus. Peb tuaj yeem hu lawv txoj hauv kev sib xws los ntawm lub ntsiab lus, vim peb muaj Xov Xwm Bus nws tsuas yog tsim nyog los nthuav tawm qhov xwm txheej raug (daim duab thib peb)
Kauj Ruam 6: Liab
- https://github.com/maciejmiklas/Thermostat
- https://github.com/milesburton/Arduino-Temperature…
- https://github.com/maciejmiklas/ArdLog.git
Pom zoo:
Arduino Raws li ISP -- Hlawv Hex Cov Ntaub Ntawv hauv AVR -- Fuse hauv AVR -- Arduino Raws li Programmer: 10 Kauj Ruam
Arduino Raws li ISP || Hlawv Hex Cov Ntaub Ntawv hauv AVR || Fuse hauv AVR || Arduino As Programmer: ……………………… Please SUBSCRIBE To my YouTube channel for more videos …….. Kab lus no yog txhua yam hais txog arduino li isp. Yog tias koj xav xa cov ntawv hex lossis yog tias koj xav teeb tsa koj lub fuse hauv AVR ces koj tsis tas yuav yuav tus programmer, koj tuaj yeem ua
Arduino Raws Li Tsis Tiv Taus Tus Kheej Infrared - IR Raws Tus Ntsuas Kub Siv Arduino: 4 Kauj Ruam
Arduino Raws Li Tsis Tiv Taus Tus Kheej Infrared | IR Raws Tus Ntsuas Kub Siv Arduino: Nyob zoo cov neeg hauv phau ntawv qhia no peb yuav ua tus tsis siv tus pas ntsuas kub siv arduino.Since qee zaum qhov ntsuas kub ntawm cov kua/khoom yog siab dhau lossis txoj hauv kev qis thiab tom qab ntawd nws nyuaj rau kev sib cuag nrog nws thiab nyeem nws qhov kub thiab txias hauv qhov xwm txheej ntawd
Huab Cua Raws Li Lub Tshuab Hluav Taws Xob (ESP8266 Raws Li Midi Generator): 4 Cov Kauj Ruam (nrog Duab)
Huab Cua Raws Li Lub Tshuab Hluav Taws Xob (ESP8266 Raws Li Midi Generator): Nyob zoo, hnub no kuv yuav piav qhia yuav ua li cas thiaj ua rau koj tus kheej me ntsis Huab cua raws li lub tshuab hluav taws xob. thiab lub teeb pom kev zoo.Tsis txhob cia siab tias nws yuav ua txhua zaj nkauj lossis chord progr
YUAV UA LI CAS YUAV RAWS LI QHOV ROOJ TSHUAB ROBOT ARM (PART3: ROBOT ARM) - RAWS LI MICRO: BITN: 8 Kauj Ruam
YUAV UA LI CAS YUAV RAWS LI QHOV ROOJ TSHUAB ROBOT ARM (PART3: ROBOT ARM) - RAWS LI MICRO: BITN: Cov txheej txheem teeb tsa tom ntej yog ua raws qhov ua tiav ntawm kev zam kev khuam siab. Cov txheej txheem teeb tsa hauv ntu dhau los yog tib yam li txheej txheem teeb tsa hauv kab-taug qab hom. Tom qab ntawd cia saib ntawm daim ntawv kawg ntawm A
DIY Ntse Ua Raws Kuv Drone Nrog Lub Koob Yees Duab (Arduino Raws): 22 Cov Kauj Ruam (nrog Duab)
DIY Ntse Ua Raws Kuv Drone Nrog Lub Koob Yees Duab (Arduino Raws): Drones yog cov khoom ua si nrov heev thiab cov cuab yeej niaj hnub no. Koj tuaj yeem pom cov kws tshaj lij thiab txawm tias pib ua haujlwm drones thiab cov khoom siv ya hauv khw. Kuv muaj plaub lub drones (quadcopters thiab hexcopters), vim tias kuv nyiam txhua yam uas ya, tab sis lub davhlau 200th tsis yog