Cov txheej txheem:

Ntse Tail Teeb: 3 Kauj Ruam
Ntse Tail Teeb: 3 Kauj Ruam

Video: Ntse Tail Teeb: 3 Kauj Ruam

Video: Ntse Tail Teeb: 3 Kauj Ruam
Video: Koos Loos & Ulias - Ulias Tsab Ntse 2024, Kaum ib hlis
Anonim
Ntse Tail Teeb
Ntse Tail Teeb

Qee lub sij hawm dhau los lub teeb nrig ntawm kuv lub tsheb kauj vab nres ua haujlwm. Thaum kuv qhib nws, muaj PCB me me nrog qee cov khoom siv hluav taws xob thiab LED hauv nws. Qhov teeb meem yog lub laub khawm hloov uas tsis ua haujlwm. Kuv tuaj yeem hloov qhov hloov pauv tab sis qee yam hais txog kev tsim qauv no cuam tshuam kuv. Lub ntsiab lus yog tias lub teeb pom kev tom qab yog lub roj teeb siv hluav taws xob thiab ib zaug qhib, nws nyob twj ywm kom txog thaum koj hloov nws lossis thaum lub roj teeb tau txhaws.

Txij li thaum kuv saib xyuas ib puag ncig kuv xav tau kev daws teeb meem uas tsis ntws kuv lub roj teeb yog tias kuv tsis hnov qab hloov lub teeb lub teeb. Yog li txoj haujlwm tshiab tau yug los.

Lub teeb pom kev ntse no muaj 3 lub luag haujlwm tseem ceeb:

  1. Hloov lub LED rau lossis tawm thaum lub laub khawm tau nias.
  2. Khaws lub LED tso thaum lub tsheb kauj vab txav mus thiab hloov lub LED tawm tom qab 10 feeb yog tias lub tsheb kauj vab tsis txav mus lawm.
  3. Hloov tawm LED thaum lub roj teeb hluav taws xob poob qis dua 2.1 Volt.

Txog qhov haujlwm no kuv tau rov siv lub qaij hloov los ntawm Tea Light Clone project los ntawm qhov uas kuv kuj tau siv qee qhov software rau txoj haujlwm no.

Raws li ib txwm kuv tau tsim txoj haujlwm no ib puag ncig kuv nyiam micro tswj lub PIC, siv JAL cov lus programming.

Kauj Ruam 1: Cov Cheeb Tsam Xav Tau

Yuav tsum tau Cheebtsam
Yuav tsum tau Cheebtsam

Koj yuav tsum muaj cov hauv paus hauv qab no rau qhov haujlwm no:

  • Ib daim ntawm daim ntawv qhia zaub mov
  • PIC microcontroller 12F615
  • 8-pin IC qhov (socket)
  • Capacitor 100 nF
  • Resistors: 2 * 10k, 1 * 100 Ohm
  • Siab Brightness Amber LED lossis Liab LED
  • Push Button On/Off hloov
  • Qaij hloov

Saib daim duab schematic ntawm yuav ua li cas txuas cov khoom siv.

Kauj Ruam 2: Tsim thiab Tsim Cov Khoom Siv Hluav Taws Xob

Tsim thiab Tsim Cov Khoom Siv Hluav Taws Xob
Tsim thiab Tsim Cov Khoom Siv Hluav Taws Xob
Tsim thiab Tsim Cov Khoom Siv Hluav Taws Xob
Tsim thiab Tsim Cov Khoom Siv Hluav Taws Xob
Tsim thiab Tsim Cov Khoom Siv Hluav Taws Xob
Tsim thiab Tsim Cov Khoom Siv Hluav Taws Xob
Tsim thiab Tsim Cov Khoom Siv Hluav Taws Xob
Tsim thiab Tsim Cov Khoom Siv Hluav Taws Xob

Kev ua haujlwm ntau ntawm PIC yog nruab nrab ntawm 2 Volt thiab 5.5 Volt uas ua rau nws haum siv 2 AAA roj teeb ua lub zog siv. Kev tsim qauv yuav tsum muaj lub zog qis yog li qhov qaij hloov tsuas yog ua haujlwm thaum lub cuab yeej qhib los ntawm kev ua tus pin 3 ntawm PIC qis thaum ua haujlwm.

Hauv qhov tsim thawj, tam sim no dhau los ntawm LED yog 20 mA uas yog qhov siab heev rau qhov ci ci LED thiab tsis xav tau. Txhawm rau txuag roj teeb, qhov kev tsim qauv siv tam sim no ntawm 10 mA rau LED.

Txij li thaum PIC raug tso rau hauv hom pw tsaug zog thaum tsis ua haujlwm, lub pob nyem hloov pauv tau txuas nrog cuam tshuam tus lej PIN ntawm PIC kom nws sawv los ntawm kev tsaug zog. Hauv hom pw tsaug zog PIC siv yuav luag tsis muaj zog.

Lub Circuit Court tau ua rau ntawm lub khob cij uas haum zoo nyob hauv lub tsev uas twb muaj lawm ntawm lub teeb nrig. Hauv daim duab koj tuaj yeem pom tias pawg thawj coj tau teeb tsa li cas thiab nws haum li cas hauv tsev.

Kauj ruam 3: Software

Raws li tau hais dhau los, software tau sau rau PIC12F615 siv JAL cov lus programming. Lub software ua ob peb yam haujlwm:

  • Pib PIC thiab muab tso rau hauv hom pw tsaug zog tom qab qhib lub zog.
  • Wakeup los ntawm kev pw tsaug zog thaum nias lub pob nyem thiab qhib lub LED. Rov qab mus pw tsaug zog yog tias nias lub pob nyem dua. Kev sawv los tau qhib los ntawm kev cuam tshuam sab nraud ntawm PIC uas lub laub khawm txuas nrog.
  • Thaum tsaug zog ua kom lub qaij hloov thiab saib xyuas yog tias lub qaij hloov tau qhib vim yog cov lus tsa suab. Yog tias tsis pom kev txav mus rau 10 feeb, LED tau kaw, lub qaij hloov tau xiam thiab PIC tau muab rov qab rau hauv hom pw.
  • Thaum tsaug zog ntsuas qhov hluav taws xob ntawm lub roj teeb thiab yog tias nws poob qis dua 2.1 Volt LED tau raug tua, lub qaij qaij tau xiam thiab PIC tau muab rov qab rau hauv hom pw.

Thaum pib lub software txhawm rau tshawb pom lub suab tau tsim los siv Kev cuam tshuam ntawm kev hloov pauv (IOC) ntawm PIC tab sis qhov ntawd tsis ua haujlwm zoo. Hloov chaw, tam sim no hloov pauv txhua 100 peb los txiav txim siab tias nws tau qhib lossis tsis ua. Kev ntsuas qhov ntsuas hluav taws xob tau ua tiav siv kev sib xyaw Analog Rau Digital hloov pauv uas kuaj cov khoom siv hluav taws xob txhua 20 ms.

Cov ntaub ntawv JAL thiab cov ntaub ntawv Intel Hex rau kev ua haujlwm PIC tau txuas nrog. Yog tias koj xav siv PIC microcontroller nrog JAL - Pascal zoo li cov lus programming - mus ntsib JAL Lub Vev Xaib.

Muaj kev lom zem tsim koj tus kheej txoj haujlwm thiab tos ntsoov rau koj cov kev xav thiab lwm yam kev thov.

Pom zoo: