Cov txheej txheem:

Shensuo: 6 Kauj Ruam (nrog Duab)
Shensuo: 6 Kauj Ruam (nrog Duab)

Video: Shensuo: 6 Kauj Ruam (nrog Duab)

Video: Shensuo: 6 Kauj Ruam (nrog Duab)
Video: thaij movie nrog phaj ej tawb 5/6/2022 2024, Kaum ib hlis
Anonim
Shensuo
Shensuo

Hnav khaub ncaws Shensuo yog cov khoom siv thev naus laus zis uas ua rau muaj kev cuam tshuam kev hnav khaub ncaws ntawm poj niam niaj hnub no; los ntawm nws qhov ntau ntawm qhov ntsuas kub thiab av noo tau pab los ntawm lub moos nrog rau phau ntawv hla dhau. Siv ob lub cav me me ua rau hauv lub cev uas txuas rau daim tiab los ntawm txoj hlua, uas yog rub kom tig lub pleats, Shensuo muaj peev xwm hloov pauv tau rau txhua qhov kub (raws li qhov kub sab nraud), teem sijhawm ib hnub lossis raws li xav tau. Ntxiv mus, Shensuo tseem muaj cov txhais tau tias hloov xim, siv tib lub tswv yim. Yog li, Shensuo lub ntsej muag zoo hnav zoo rau txhua lub sijhawm, hmo ntuj lossis nruab hnub, sov lossis txias.

Kauj ruam 1: Yuav tsum tau ua

Yuav tsum muaj
Yuav tsum muaj

Cov Khoom Siv Yuav Tsum Tau

1. Arduino Pro Mini - 5v

2. Breadboard - rau prototyping

3. Jumper Cables rau lub khob cij

4. LM2596 - DC rau DC hloov pauv lossis sib npaug

5. Grove rau Poj Niam Cables

6. Grove Kub thiab Vaum Sensor

7. Grove RTC Moos

8. USB rau Serial Adapter - rau kev sib txuas lus nrog Arduino

8. Ib daim ntawv siv hluav taws xob sab nraud los txhawb lub zog Servo motors

Kauj Ruam 2: Tshaj Tawm rau Arduino Pro Mini

Kev xa mus rau Arduino Pro Mini
Kev xa mus rau Arduino Pro Mini
Kev xa mus rau Arduino Pro Mini
Kev xa mus rau Arduino Pro Mini

Yog tias koj Arduino muaj USB txuas koj tuaj yeem hla ntu no.

Arduino Pro Mini tsis zoo li feem ntau Arduino cov laug cam, hauv qhov nws tsis muaj tus qauv USB txuas ntawm lub rooj tsavxwm. Nws tso siab rau qee hom ntawm USB rau kev txuas txuas mus txhawm rau rub cov cai thiab siv cov saib txuas.

Koj tuaj yeem xa mus rau lwm qhov kev qhia los ntawm push_reset yog tias koj tau daig.

SparkFun 5v FTDI adapter yog qhov kev xaiv zoo rau 5v Arduino Pro Mini, thiab peb yuav siv qhov kev hloov pauv ntawm nws hauv qhov kev qhia no.

NCO TSEG: Koj tus FTDI adapter yuav tsum tso qhov hluav taws xob raug rau koj Arduino Pro Mini, Arduino Pro Mini los hauv ob qhov sib txawv; v5v3v 3. Ua kom ntseeg tau tias koj lub FTDI adapter tso tawm qhov hluav taws xob raug yog lwm yam koj pheej hmoo txhuam koj Arduino. SparkFun kuj tseem muab FTDI adapter hauv 3v3 sib txawv.

Txuas Pawg Thawj Coj

1. Cov pins ntawm Arduino Pro Mini uas tau muab tso rau ntawm lub rooj tsavxwm. Nrog khawm rov pib dua hauv qab, thiab txuas txuas rau saum; DTR - TXO - RXO - VCC - GND - GND

2. Nrog SparkFun adapter koj tuaj yeem yooj yim xaub Arduino rau hauv tus pin hauv qab ntawm pawg thawj coj saib. Txoj haujlwm no muaj qhov hloov pauv me ntsis rau qhov uas kuv pom zoo los ntawm SparkFun uas xav kom peb siv jumper cables txuas mus rau Arduino.

3. Txuas lub Adapter, nrog Arduino tseem txuas rau hauv koj lub computer. Arduino thiab lub adapter yuav tsum pom kev.

Xa mus rau pawg thawj coj saib

1. Nrog Adapter thiab Arduino txuas nrog, qhib Arduino IDE

2. Nyem Cov Cuab Yeej, thiab tom qab ntawd yuj hla Chaw Nkag ntawm cov ntawv qhia zaub mov nco

3. Xaiv FTDI adapter los ntawm cov npe, nws yuav tshwm sim ua cov khoom siv lossis chaw nres nkoj COM

4. Ntawm Cov cuab yeej ntawv qhia zaub mov bar, koj yuav tsum tau ua kom ntseeg tau tias Pawg Thawj Coj tau raug xaiv, nyob saum lub rooj tsavxwm thiab xaiv "Arduino Pro lossis Pro Mini"

5. Arduino Pro Mini kuj tseem muaj ntau qhov sib txawv, yog li koj yuav tsum tau hais kom meej cov txheej txheem siv. Qhov no feem ntau yog qhia rau sab nraum qab ntawm lub rooj tsavxwm. Lub npe txheej txheem luam tawm ntawm lub xwmfab dub ntawm lub rooj tsavxwm, hauv kuv qhov no yog ATMEGA328p. Daim ntawv thib ob ntawm cov ntaub ntawv koj yuav xav tau yog qhov hluav taws xob ntawm lub rooj tsavxwm, qhov no yuav tsum tau qhia nyob tom qab. Thaum koj muaj cov ntaub ntawv no koj tuaj yeem xaiv tus txheej txheem thiab qhov hluav taws xob hauv cov ntawv qhia zaub mov.

Yog tias koj tau txais qhov tsis raug no tsis muaj teeb meem yuav tshwm sim nws tsuas yog yuav tsis tso ib qho chaws, yog tias qhov no tshwm sim tsuas yog sim ib qho ntawm cov txheej txheem xaiv kom txog thaum koj tuaj yeem rub tawm.

5. Tam sim no, ntawm cov ntawv qhia zaub mov bar; nyem Cov Ntaub Ntawv thiab tom qab ntawd piv txwv -> Pib -> Blink

6. Tshaj tawm cov duab kos los ntawm txhaj rau sab xis taw xub nyob rau sab laug ntawm Arduino screen.

7. Cov duab kos yuav tsum tso kom raug thiab lub teeb pom kev yuav tsum tau pib ntsais ntsais ntawm koj li Arduino

Kauj Ruam 3: RTC - Teeb Sijhawm

RTC - Teeb tsa moos
RTC - Teeb tsa moos
RTC - Teeb tsa moos
RTC - Teeb tsa moos
RTC - Teeb tsa moos
RTC - Teeb tsa moos
RTC - Teeb tsa moos
RTC - Teeb tsa moos

Arduino's thiab lwm lub microcontrollers tsis tuaj yeem taug qab lub sijhawm tam sim no ntawm hnub. Txhawm rau pab peb txoj haujlwm kom tswj hwm lub sijhawm tam sim no peb yuav siv Seeed Grove - RTC.

Hauv qhov kev qhia no peb yuav siv Makuna's RTC. Lub tsev qiv ntawv muaj los ntawm tus thawj tswj tsev qiv ntawv Arduino, thiab qhov no yuav yog txoj hauv kev peb rub cov ntaub ntawv xav tau. Koj tseem tuaj yeem nkag mus rau lub tsev qiv ntawv los ntawm GitHub.

Txoj Kev Txhim Kho

1. Qhib daim ntawv thov Arduino

2. Nkag mus rau Sketch -> Xws li Lub Tsev Qiv Ntawv -> Tswj Tsev Qiv Ntawv

3. Hauv qhov chaw tshawb nrhiav, ntaus "RTC Makuna" thiab nws yuav tsum yog qhov tshwm sim nkaus xwb

4. Nruab lub tsev qiv ntawv thiab tos txhua yam kom tiav.

Txheej Txheem Txheej Txheem

Hauv txoj haujlwm no peb siv Arduino ib txwm tsis muaj Grove headers, peb tau rub ob peb tsob ntoo los txuas tus xov tooj txuas rau txuas thiab ua qauv nrog peb pawg thawj coj saib.

Yog tias koj muaj lub rooj tsav xwm nrog cov ntoo sib txuas xws li Seeeduino lossis Grove Shield, zoo li qhov no rau Arduino Mega, koj tsuas tuaj yeem siv cov hlua hauv lub npov los txuas rau lub rooj tsavxwm. Xa mus rau qhov kev qhia no rau kev pab ntxiv.

Yog tias koj zoo li kuv thiab tsuas yog muaj Arduino li niaj zaus, nyeem ntxiv.

NCO TSEG: A4 thiab A5 yog i2c pins rau Arduino Pro Mini, lawv yuav nyob ntawm tus lej sib txawv ntawm cov laug cam sib txawv yog li nco ntsoov xyuas tias koj muaj

1. Arduino Pro Mini muaj ob lub i2c pins ntawm A4 thiab A5, A5 yog SCL kev sib txuas thiab A4 yog SDA txuas - Saib cov duab no

2. Nqa koj lub Grove mus rau 4pin splitter, ntsaws qhov tsob ntoo kawg rau hauv RTC moos.

3. Txuas kab liab rau 5v lossis tus pin vcc ntawm koj Arduino

4. Txuas cov hlua dub rau ib qho ntawm thaj chaw ntawm Arduino, sau tias yog GND.

5. Txuas cov kab daj rau A5, thiab kab dawb rau A4.

Xeem Pawg Thawj Coj

Tam sim no koj tau npaj txhij xa qee cov cai, xa mus rau qhov swb yav dhau los ntawm kev xa mus rau Arduino Pro Mini yog tias koj nyam ntawm theem no.

Nrog lub tsev qiv ntawv los ntawm Makuna teeb tsa, ntau tus piv txwv kuj tau teeb tsa uas tuaj yeem siv rau kev ntsuas lub cuab yeej.

1. Ntawm kab ntawv qhia zaub mov, nyem cov ntaub ntawv thiab tom qab ntawd ua piv txwv

2. Mus rau hauv qab ntawm daim ntawv yuav yog RTC Makuna, yuj dua qhov kev xaiv no thiab xaiv DS1307_Simple los ntawm cov npe.

3. Tshaj tawm daim duab kos rau Arduino los ntawm kev nias kab rov tav nyob rau sab laug sab saum toj ntawm lub vijtsam. Yog tias koj ntsib teeb meem uploading, xa mus rau kauj ruam dhau los.

4. Tam sim no koj xav saib cov ntawv tso tawm ntawm lub rooj tsavxwm, qhib lub vijtsam txuas los ntawm nias lub iav loj ntawm sab xis saum toj ntawm lub vijtsam Arduino, lossis los ntawm txhaj Cov Cuab Yeej thiab tom qab ntawd Saib Ua Ntej. Yog tias tsis muaj qhov tso tawm, lossis cov cim coj txawv txawv tau luam tawm rau lub vijtsam; nws yog qhov zoo heev uas qhov kev xaiv baud raug xaiv tsis raug, nyob rau hauv qab txoj cai ntawm lub vijtsam saib lub ntsej muag, nyem qhov twg lo lus baud tshwm. Arduino Pro Mini muaj qhov tsis txaus ntseeg ntawm 57600, xaiv qhov no los ntawm cov npe thiab cov ntawv yuav tsum tshwm ntawm qhov screen. Lub sijhawm raug yuav tsum tshwm.

FAQ

Cov zis los ntawm lub moos yog qee qhov kev hloov pauv ntawm 165. Qhov no feem ntau yog vim pawg thawj coj tau txais qhov tsis txaus. Kuv pom tias 5v raws cov laug cam yuav ua rau muaj kev ua haujlwm zoo dua li lawv 3v3 cov neeg sib koom, yog tias koj muaj 3v3 pawg thawj coj saib kuv yuav pom zoo txawm tias nrhiav 5v sib txawv ntawm Pro Mini lossis nce qhov hluav taws xob.

Lwm Yam Kev Pab

1. Adafruit Cov Lus Qhia rau Txuas Lub Rooj Tswjhwm Saib rau Arduino

Kauj Ruam 4: Teeb Sensor Kub

Kub Sensor Teeb
Kub Sensor Teeb

Kev teeb tsa lub ntsuas kub yog qhov zoo ib yam li ntawm RTC moos. Hauv qhov kev qhia no peb yuav siv Kev Pom Pom Kub Kub thiab Vaum qhov ntsuas. Pom tau muaj kev qhia ntawm no, tab sis nws tso siab rau koj muaj lub hauv paus ntsiab lus rau Arduino, uas peb tsis tau siv hauv qhov kev qhia no.

Txoj Kev Txhim Kho 1. Qhib daim ntawv thov Arduino

2. Nkag mus rau Sketch -> Xws li Lub Tsev Qiv Ntawv -> Tswj Tsev Qiv Ntawv

3. Hauv lub thawv tshawb nrhiav, ntaus "TH02" thiab nws yuav tsum yog qhov tshwm sim nkaus xwb

4. Nruab lub tsev qiv ntawv thiab tos txhua yam kom tiav.

Txheej Txheem Txheej Txheem

Nws tau kwv yees tias koj muaj Grove splitter cable zoo li qhov no.

NCO TSEG: A4 thiab A5 yog i2c pins rau Arduino Pro Mini, lawv yuav nyob ntawm tus lej sib txawv ntawm cov laug cam sib txawv yog li nco ntsoov xyuas tias koj muaj

1. Arduino Pro Mini muaj ob lub i2c pins ntawm A4 thiab A5, A5 yog SCL kev sib txuas thiab A4 yog SDA txuas - Saib cov duab no

2. Nqa koj lub Grove mus rau 4pin splitter, ntsaws qhov ntsaum kawg rau hauv qhov ntsuas kub

3. Txuas kab liab rau 5v lossis tus pin vcc ntawm koj Arduino

4. Txuas cov hlua dub rau ib qho ntawm thaj chaw ntawm Arduino, sau tias yog GND.

5. Txuas cov kab daj rau A5, thiab kab dawb rau A4.

Xeem Pawg Thawj Coj

1. Ntawm kab ntawv qhia zaub mov, nyem cov ntaub ntawv thiab tom qab ntawd piv txwv 2. Mus rau hauv qab ntawm cov npe yuav yog "Grove Temper Humidity TH02", yuj dua qhov kev xaiv no thiab xaiv qhov demo

3. Tshaj tawm daim duab kos rau Arduino los ntawm kev nias kab rov tav nyob rau sab laug sab saum toj ntawm lub vijtsam. Yog tias koj ntsib teeb meem uploading, xa mus rau kauj ruam dhau los.

4. Tam sim no koj xav saib cov ntawv tso tawm ntawm lub rooj tsavxwm, qhib lub vijtsam txuas los ntawm nias lub iav loj ntawm sab xis saum toj ntawm lub vijtsam Arduino, lossis los ntawm txhaj Cov Cuab Yeej thiab tom qab ntawd Saib Ua Ntej.

FAQ

Yog tias tsis muaj qhov tso tawm, lossis cov cim coj txawv txawv tau luam tawm rau lub vijtsam; nws yog qhov zoo heev uas qhov kev xaiv baud raug xaiv tsis raug, nyob rau hauv qab txoj cai ntawm lub vijtsam saib lub ntsej muag, nyem qhov twg lo lus baud tshwm. Arduino Pro Mini muaj qhov tsis txaus ntseeg ntawm 57600, xaiv qhov no los ntawm cov npe thiab cov ntawv yuav tsum tshwm ntawm qhov screen. Lub sijhawm raug yuav tsum tshwm.

Kauj Ruam 5: Teeb tsa Servo

Kev teeb tsa Servo
Kev teeb tsa Servo
Kev teeb tsa Servo
Kev teeb tsa Servo
Kev teeb tsa Servo
Kev teeb tsa Servo

Cov Servo's hauv cov khaub ncaws no yuav siv los hloov cov pleats ntawm lawv cov xim. Txog qhov haujlwm no peb siv TowerPro 5010 Servo, muaj los ntawm Adafruit ntawm no.

Servo xav tau qhov kev kos tam sim no ntau dua li Arduino, thiab feem ntau Arduino tsis tuaj yeem txhawb qhov kev hloov pauv no thaum Servo tab tom thauj khoom. Lub Servo yuav tsum tau siv sab nraud rau Arduino kom ntseeg tau tias qhov hluav taws xob tsis hloov pauv hla Arduino.

Yuav tsum muaj

- DC rau DC hloov pauv - peb siv LM2596 pawg thawj coj - qhov no yuav ua kom ntseeg tau tias qhov hluav taws xob tso tawm tau ruaj khov rau peb cov Servo's. Qhov no tseem yuav txo qis txhua qhov hluav taws xob nkag rau peb qhov xav tau qhov hluav taws xob uas peb yuav teeb tsa.

- Ib lub zog sab nraud - Peb siv roj teeb 7.2v 2000mah

- Lub taub hau taub hau ntswj taub hau

- Multimeter los ntsuas qhov hluav taws xob tso tawm ntawm DC rau DC hloov pauv

- Jumper Cables

- Cov qhob cij

Lub Hwj Huam Sab Nraud

Lub zog hluav taws xob sab nraud yuav tsum ntau dua 5v, qhov no tuaj yeem muab los ntawm roj teeb.

Teem lub Transformer

1. Txuas qhov kev sib txuas zoo thiab tsis zoo ntawm koj lub zog hluav taws xob sab nraud mus rau cov pins nkag ntawm DC rau DC hloov pauv

2. Qhib koj lub multimeter thiab teeb nws mus rau qhov ntsuas hluav taws xob

3. Txuas cov neeg sib txuas ntawm lub multimeter mus rau qhov tso tawm ntawm tus hloov pauv

4. Tam sim no coj koj tus ntsia hlau.

5. Cov servos muaj qhov siab tshaj plaws ntawm 6v, kev nyeem ntawm lub multimeter yuav tsum qis dua tus nqi no

6. Tig lub pob qhov kub ntawm tus hloov pauv kom txog thaum ntsuas ntau tus nyeem tus nqi qis dua 6v, sim ua kom ze 6v yam tsis tshaj nws

Txuas cov Servos

1. Coj koj Arduino, txuas ib qho ntawm tus pin hauv av mus rau txoj kev tsis zoo ntawm lub khob cij.

2. Txuas qhov tsis zoo ntawm qhov hloov pauv thiab txuas nws mus rau tib txoj kev tsheb nqaj hlau ntawm lub khob cij.

3. Nqa koj lub servo, txuas nws tus pin hauv av, dub lossis xim av, rau tib txoj kev tsheb nqaj hlau. Qhov kev pabcuam, lub zog sab nraud thiab Arduino yuav tsum txhua tus sib koom ua ke.

4. Qhov ua tau zoo ntawm kev hloov pauv yuav tsum txuas rau lub zog servo (liab).

5. Txuas tus pin liab/daj teeb liab ntawm tus servo rau tus pin 9 ntawm Arduino Mini Pro

Xeem Pawg Thawj Coj

1. Qhib Arduino IDE

2. Nyem File ntawm cov ntawv qhia zaub mov bar -> Piv txwv -> Servo -> Sweep

3. Tshaj tawm rau Arduino thiab Servo yuav tsum txav rov qab thiab mus tom ntej

Kauj Ruam 6: Muab Txhua Qhov Ua Ke

Muab Nws Tag Nrho Ua Ke
Muab Nws Tag Nrho Ua Ke

Kauj ruam kawg ntawm cov txheej txheem yog txhawm rau ua ke txhua qhov no ua ke txhawm rau ua kom cov servos nrog qhov ntsuas kub thiab lub moos ntsuas.

Txoj cai kawg muaj nyob ntawm no ntawm kuv GitHub.

Pom zoo: