Cov txheej txheem:

Tsim Koj Tus Kheej Kev Txhim Kho Pawg Thawj Coj: 8 Kauj Ruam (nrog Duab)
Tsim Koj Tus Kheej Kev Txhim Kho Pawg Thawj Coj: 8 Kauj Ruam (nrog Duab)

Video: Tsim Koj Tus Kheej Kev Txhim Kho Pawg Thawj Coj: 8 Kauj Ruam (nrog Duab)

Video: Tsim Koj Tus Kheej Kev Txhim Kho Pawg Thawj Coj: 8 Kauj Ruam (nrog Duab)
Video: Cas Tsis Xaiv Koj - R-Lin Thoj New Song Original By Zaj Dub [Official MV] 2023 2024, Hlis ntuj nqeg
Anonim
Tsim Koj Tus Kheej Kev Txhim Kho
Tsim Koj Tus Kheej Kev Txhim Kho

Cov lus qhia no yuav qhia koj yuav tsim koj li kev txhim kho koj tus kheej li cas los ntawm kos! Txoj kev no yooj yim thiab tsis xav tau cov cuab yeej siv siab, koj tuaj yeem ua nws ntawm koj lub rooj ua noj. Qhov no tseem muab kev nkag siab zoo ntawm yuav ua li cas Ardruinos thiab lwm cov phiaj xwm kev txhim kho tiag tiag ua haujlwm.

Koj tuaj yeem tsim koj lub rooj tsav xwm txhim kho kom haum rau koj lub hom phiaj tshwj xeeb. Pawg tswj hwm kev loj hlob no tau qhia hauv daim duab tau siv los tswj lub rpm ntawm DC-lub cev muaj zog. DC-lub cev muaj zog tau tswj los ntawm lub khoos phis tawj siv lub chaw nres nkoj txuas. Cov LEDs tau siv los pab thaum xav tau debug.

Hauv Cov Lus Qhia Kuv yuav qhia yuav tsim lub rooj tsav xwm kev txhim kho ntau yam, yog li daim ntawv teev npe yuav tsis zoo ib yam li ib qho uas tau qhia hauv daim duab.

Kauj Ruam 1: Qhov Chaw

Qhov
Qhov

Cov npe:

  • 1 Atmel ATmega88 (lossis ib lub tshuab ua haujlwm twg zoo tshaj qhov koj xav tau)
  • 1 Dip IC qhov (socket) 28
  • 1 10k ohm resistor
  • 1 100 ohm resistor
  • 1 ib diode
  • 3 0.1 μF capacitor
  • 1 10 μF capacitor
  • 1 LED-diode
  • 1330 ohm tiv thaiv
  • Qee tus dhia
  • Qee tus txiv neej-pin (lossis poj niam)
  • Ib daim kab xev (siv ib qho nrog ib daim kab xev thiab tsis sib xyaw, saib daim duab)

Tom qab tuaj yeem tuaj yeem ua haujlwm rau koj lub microcontroller koj yuav xav tau ISP programmer (In-System programming). Kuv siv AVRISP mkII (https://www.atmel.com/tools/avrispmkii.aspx). Muaj ntau qhov sib txawv ISP-programmers xaiv los ntawm, lossis koj tuaj yeem tsim koj tus kheej. Kuj tseem muaj qee txoj hauv kev los teeb tsa arduino los ua tus ISP-programmer.

Kauj ruam 2: Teori

Teori
Teori

Txhawm rau tsim thiab teeb tsa phiaj xwm txhim kho los ntawm kos koj yuav tsum tau nyeem qee cov ntawv teev tseg. Qee zaum nws tuaj yeem nyuaj nrhiav qhov uas koj tab tom nrhiav tab sis kuv yuav muab cov khoom tseem ceeb tshaj plaws.

Cov ntaub ntawv ATmega88

Kev tsim kho vajtse xav txog

Ua ntej peb yuav tsum tau saib ntawm pinout ntawm ATmega88 uas tuaj yeem pom hauv cov ntawv teev npe.

Qee qhov chaw nres nkoj tseem ceeb uas xav tau kev txiav txim siab ntxiv yog cov hauv qab no:

  • Tus Pin 1. Nov yog tus pin rov pib dua uas yuav rov pib dua tus txheej txheem thaum nws qis. Tus pin no yuav xav tau rub tawm, yog li tus pin ib txwm muaj siab tshwj tsis yog tias koj xav rov pib dua. (Qhov no yuav qhia tom qab)
  • Tus Pin 7 thiab 20 yog qhov uas Vcc yuav tsum txuas nrog, 5V.
  • Pin 9 thiab 10: Rau cov pins no siv lead ua sab nraud tuaj yeem txuas nrog, tab sis peb yuav siv cov oscillator sab hauv. Yog li peb tuaj yeem kho cov pins li niaj zaus cov koob digital.
  • Pin 17, 18 thiab 19: Cov no yuav raug siv rau lub cajmeem (qhov no yuav qhia tom qab).

Kauj ruam 3: Stripborad Layout

Stripborad txheej txheem
Stripborad txheej txheem

Txhawm rau tsim cov duab kos peb yuav siv StripCAD, ua raws qhov txuas mus rub tawm qhov program.

Qhov program no tuaj yeem siv me ntsis nyuaj vim tias nws tsis siv tus phooj ywg, tab sis nws muaj txiaj ntsig thaum koj paub siv nws li cas. Ua si nrog nws me ntsis thiab koj yuav sai sai no nws. Qee cov lus qhia zoo yog cov hauv qab no.

  • Nias c txhawm rau tshawb nrhiav cov khoom
  • Nias v kom tau txais ntau yam sib txawv
  • Nias sab laug nas nias nruab nrab ntawm ob kab ntawv kab rov tav kom tau txais kev cuam tshuam
  • Nias sab laug nas nias ntawm ob kab ntsug kom tau tus choj txuas

Thaum tshawb xyuas cov khoom:

  • "DILxx" yuav muab rau koj Ob Kab Hauv-kab ua raws tus lej naj npawb
  • "SILxx" yuav muab rau koj Ib Leeg Nyob Hauv Kab ua raws tus lej naj npawb

Txwv tsis pub tsuas yog tshawb rau cov khoom uas koj tab tom nrhiav.

Kauj ruam 4: Rub-up Reset Pin

Rub-up Reset Pin
Rub-up Reset Pin
Rub-up Reset Pin
Rub-up Reset Pin

Los ntawm cov ntaub ntawv tsim kho qhov xav tau ntawm sab 6 peb pom cov Circuit hauv daim duab. Nyeem cov ntawv hauv daim ntawv kom nkag siab zoo dua. Nov yog cov kauj ruam yog peb tuav lub rub tawm rau tus pin 1.

Nws tuaj yeem yog qhov zoo rau ntxig phau ntawv rov pib dua rau lub microcontroller. Qhov no tuaj yeem siv los ntawm kev txuas SIL2 hauv kab nrog 100 ohm resistor rau hauv av. Luv Circuit Court SIL2 nrog lub jumper thiab lub microcontroller yuav rov pib dua. 100 ohm resistor yuav tiv thaiv lub capacitor los ntawm luv-Circuit Court. Txwv tsis pub cia li ua raws daim duab qhia chaw ntawm daim ntawv.

Hauv daim duab thib ob qhov rub tawm txuas tau qhia hauv StripCAD

Kauj Ruam 5: Lub Hwj Huam Fais Fab

Hwj chim Mov
Hwj chim Mov

Txhawm rau zam kev cuam tshuam lub capacitor 10 μF tau muab tso ze rau qhov ntsuas hluav taws xob ntawm lub rooj tsavxwm. Txhawm rau zam kev cuam tshuam uas tshwm sim hauv pawg thawj coj saib 0.1 μF capacitor tau muab tso nruab nrab ntawm tus pin 7 thiab 8, thiab nruab nrab ntawm tus pin 20 thiab 22. Cov capacitors no yuav ua raws li cov lim qis. Lub capacitor me me yuav tsum tau muab tso ze rau ntawm tus pin li sai tau rau qhov ua tau zoo tshaj plaws.

Nws kuj tseem tuaj yeem ntxiv qee yam kev ntsuas hluav taws xob xws li 78L05, kom nws ua haujlwm ntawm lub roj teeb.

Kauj ruam 6: ISP Programmer

ISP Programmer (UA)
ISP Programmer (UA)

Txhawm rau teeb tsa tus txheej txheem koj yuav xav tau ISP programmer. Muaj qhov sib txuas sib txawv muaj, 6 tus pin lossis 10 tus pin. Kuv siv ib qho nrog rau tus pin, saib cov ntaub ntawv kho vajtse kom pom tias yuav tsum tsim kev sib txuas li cas.

ISP-programmer sawv rau Hauv-Qhov program. Qhov yooj yim nrog hom programmer no yog tias koj tuaj yeem tsim kho koj lub cuab yeej thaum nws tau teeb tsa hauv qhov ua tiav, tsis yog kom koj lub chip teeb tsa ua ntej txhim kho nws rau hauv kab ke. Nws kuj tseem yooj yim rau reprogram ib zaug nws tau teeb tsa rau hauv kab ke.

Saib cov kauj ruam tom ntej rau yuav ua li cas ISP kev sib txuas yuav tsum tau ua.

Kauj ruam 7: Txheej txheem

Txheej txheem
Txheej txheem

Thaum tus qauv tsim tiav, nias sau kom txuag nws ua PDF (lossis siv cov ntawv txuas). Qhib cov ntawv PDF thiab luam nws. Nco ntsoov tias lub tshuab luam ntawv teeb tsa yuav tsum tau teeb tsa rau qhov loj me, txwv tsis pub tus qauv tsim yuav tsis sib phim nrog daim kab xev.

Nws ib txwm yog lub tswv yim zoo kom suav nrog LED uas qhia tau yog tias lub zog rau pawg tswj hwm kev txhim kho nyob. Cov lus qhia yooj yim no tuaj yeem txuag ntau qhov kev debugging tsis tsim nyog.

Cov kauj ruam los tsim koj tus kheej lub rooj tsav xwm txhim kho:

  1. Luam tawm daim duab kab hluav taws xob, thiab siv txiab txiav nws tawm.
  2. Txiav tawm ib daim ntawv loj txaus ntawm daim kab xev, yog li daim ntawv haum rau saum.
  3. Muab daim ntawv tso rau ntawm daim kab xev kom lub qhov sib haum, siv cov kua nplaum zoo tib yam los txuas daim ntawv rau ntawm kab txaij. Muab daim ntawv nplaum rau sab uas tsis muaj tooj liab.
  4. Pib los ntawm kev ua kev cuam tshuam ntawm tus ntoo khaub lig liab
  5. Ua raws li kev tsim thiab muab tshuaj txhuam los ntawm cov khoom qis tshaj mus rau qhov siab tshaj plaws, uas yuav ua rau kev sib dhos yooj yim dua.
  6. Nqa nws mus rau lub zog hluav taws xob (5V) thiab pib ua haujlwm.

Tam sim no kho vajtse ntawm pawg thawj coj loj tau ua tiav!

Kauj ruam 8: Programming

Kuv siv Atmel Studio rau kev ua haujlwm hauv C. Rub tawm qhov program thiab pib tsim txoj haujlwm txaus nrog koj tus kheej lub rooj tsav xwm kev txhim kho. Nws yuav muaj peev xwm rau khau raj-thauj khoom arduino, tab sis yog tias koj xav tau kev nkag siab zoo ntawm dab tsi yog zais tob hauv qab hauv cov lus arduino sim qee qhov piv txwv hauv C. Piv txwv sim tawm qee lub sijhawm, cuam tshuam thiab nyeem analog.

Hauv ATmega88 cov ntawv koj tuaj yeem pom ntau tus lej piv txwv rau cov haujlwm tshwj xeeb sib txawv uas koj lub microcontroller tuaj yeem ua.

Raws li koj tuaj yeem pom qhov no yog txoj hauv kev yooj yim los tsim cov qauv sib txawv rau cov khoom siv hluav taws xob. Nws yog ib qho yooj yim, pheej yig thiab tsis xav tau cov cuab yeej tshwj xeeb.

Kev Sib Tw Microcontroller 2017
Kev Sib Tw Microcontroller 2017
Kev Sib Tw Microcontroller 2017
Kev Sib Tw Microcontroller 2017

Khiav Tawm Hauv Kev Sib Tw Microcontroller 2017

Pom zoo: