Cov txheej txheem:
- Kauj ruam 1: Schematic
- Kauj ruam 2: Txheej txheem
- Kauj Ruam 3: "Logic" ntawm "Wort-Uhr"
- Kauj ruam 4: Code Snippets
- Kauj Ruam 5: Vaj Tsev
Video: Wort-Uhr: 5 Kauj ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:24
Nyob zoo ua ke!
Qhov no yuav yog thawj qhov kev qhia thiab yog tias koj muaj lub tswv yim yuav txhim kho nws lossis ua kom nkag siab yooj yim thov tsis txhob yig tiv tauj kuv!
Zoo thaum xub thawj, hom "moos" no tsis yog kuv lub tswv yim! Kuv tau pom ntau qhov througout hauv is taws nem thiab lawv tuaj yeem xaj tsuas yog ob peb duas las hauv cov khw muag khoom sib txawv. Tab sis kuv tsis xav yuav ib qho, kuv xav ua ib qho ntawm kuv tus kheej kom kawm thiab nkag siab tias nws ua haujlwm li cas.
Ib lo lus rau "tsis yog neeg German" cov tswv cuab … Thov txim qhov tseeb tias qhov no tsuas yog "German Wort Uhr". Nws yuav hloov pauv ua lus Askiv lossis lwm yam lus yooj yim, tab sis raws li kuv yog German Kuv tau ua nws ua kuv hom lus. Yog tias koj xav tau kev txhawb nqa rau koj hom lus hu rau kuv thiab kuv yuav sim pab koj.
Yog li cia pib …
Kauj ruam 1: Schematic
Cov txheej txheem yog ncaj nraim rau pem hauv ntej thiab yog tias daim duab tsis zoo rau nyeem, tseem muaj cov ntawv PDF.
Cia peb pib ntawm kaum sab laug hauv qab. Muaj lub zog siv hluav taws xob yooj yim siv LM7805 los ua kom ruaj khov 5V tso tawm rau PIC, hloov npe (74HC164) thiab lub sijhawm tiag tiag nti DS3231. Txhua LEDs kuj tau muab los ntawm ntu no. D22 ntawm qhov kawg yog tsuas yog qhia lub hwj chim thiab tuaj yeem yooj yim sib nrug yog tias tsis xav tau.
Koj tuaj yeem siv txhua lub zog DC rau lub moos nrog tsawg dua 40V, tab sis koj yuav tsum xaiv qhov tsim nyog rau C7. Nws yuav tsum muaj qhov ntsuas hluav taws xob tsawg kawg ob npaug ntawm qhov hluav taws xob nkag thiab nco qab tias koj tab tom tsim cua sov hauv LM7805 yog li koj yuav tsum sim ua kom cov hluav taws xob nkag qis kom tsawg li sai tau vim tias txhua yam tsuas yog nkim lub zog xwb. Qhov zoo tshaj yog ib yam ntawm 9V txog 12V DC.
Tsis txhob thab txog polarity ntawm koj lub zog mov … Lub p-channel MOSFET (Q1) ua raws li kev tiv thaiv tsis tseeb polarity thiab lub moos yuav tsuas tsis ua haujlwm thiab tsis tau txais kev puas tsuaj. Koj tuaj yeem tshawb xyuas qhov no ntawm "lub zog" LED D22 yog teeb tsa.
Ntawm sab xis ntawm cov phiaj xwm yog cov npe-hauv kev ua haujlwm-tawm ua haujlwm tawm npe. Kuv txiav txim siab siv lawv vim tias kuv tsis xav siv PIC loj nrog ntau ntawm I/O-Ports. Kuv xav siv me dua thiab kuv tseem muaj qee qhov 16F1829 hauv tsev yog li qhov kev xaiv twb tau meej lawm. Cov ntaub ntawv (IN_1, IN_2 thiab IN_3) yog muab los ntawm PIC (saib ntu ntu hauv qab no) thiab REGISTER_CLK ib yam nkaus. Txhawm rau kom yooj yim hauv kuv cov cai thiab txheej txheej PCB kuv siv ob ntawm 74HC164 rau teev thiab zaum kawg rau "kev xav".
Nyob rau sab laug sab saud yog PIC thiab txhua ntu tsim nyog. Kuv siv lub moos sab hauv yog li tsis xav tau oszillator. Tsuas yog peb tus tiv thaiv rau SCL, SDA thiab MCLR. Txog qhov tseeb uas kuv tau siv 32kHz raws qhov qhia ntawm "vib nas this" tsis tas yuav tsum muaj qhov ruaj khov thiab raug rau PIC.
Hauv nruab nrab muaj DS3231 nrog qhov tsawg kawg ntawm cov khoom sab nraud. Qhov tseeb kuv siv tsuas yog SDA thiab SCL cov tswv yim rau kev sib txuas lus hla I²C thiab 32kHZ cov zis raws li lub moos sab nraud siv rau Timer1 ntawm PIC16F1829. Txog qhov tso tawm no cov ntawv teev tseg hais tias nws yog qhov rub tawm sab nraud xav tau. Lwm qhov txiaj ntsig kuv tsis tau siv hauv txoj haujlwm no thiab ua rau lawv tsis txuas nrog.
Kuj tseem nyob hauv nruab nrab, LEDs… Raws li koj tuaj yeem nyeem hauv cov txheej txheem Kuv tau siv LED xiav (cov uas muaj vaj tsev nyob meej) thiab tus tiv thaiv tus nqi ntawm 1k Ohms. Yog tias koj npaj siab ua txoj haujlwm no los ntawm koj tus kheej koj yuav tsum xaiv qhov tseem ceeb ntawm cov neeg tawm tsam no raws li xim thiab hom LEDs uas koj xaiv. Tsis tas li nco ntsoov qhov twg koj xav kom teeb tsa lub moos. Kuv ib tus sawv ntawm kuv chav pw vim li ntawd kuv tsis xav kom cov LEDs ci dhau thiab xaiv tus nqi loj dua rau cov tiv thaiv. Ua qee qhov sim ntawm lub khob cij nrog LEDs thiab tus nqi tiv thaiv ua ntej yuav muab tso rau ntawm PCB.
Kauj ruam 2: Txheej txheem
Tom qab ua tiav cov txheej txheem nws yog lub sijhawm los rau PCB. Txog qhov ntawd kuv tau siv KiCAD (rau schematic kuj). Tsis muaj ntau yam hais, tsuas yog qhia cov kab.
Txog qhov uas kuv tau luam tawm lub tsev nyob ntawm lub moos los ntawm kuv tus kheej, nws yog qhov tseem ceeb heev qhov twg LEDs nyob rau txheej txheej saum toj kawg nkaus. Kuv tsuas yog tso cov LEDs thiab cov tiv thaiv rau txheej saum toj kawg nkaus, vim tias kuv xaj kuv li PCB ib feem txuas (tag nrho cov ntu SMD) thiab vim tias lub tuam txhab kuv xaiv rau qhov ntawd tsuas yog tso ib sab ntawm ib sab thiab tsis yog ob tog.
Koj tuaj yeem pom qhov tso rau hauv ob daim duab 3-seem uas kuv tau ua los ntawm KiCAD.
Yog tias koj xav tau … Nws muaj peev xwm xa tawm KiCAD PCB rau Eagle thiab tom qab ntawd nws yooj yim heev los tsim lub tsev, vim tias koj tau siv los ntawm PCB.
Kauj Ruam 3: "Logic" ntawm "Wort-Uhr"
Qhov loj tshaj plaws rau txoj haujlwm no yog tus lej rau PIC…
Thaum xub thawj pom qhov "logic" ntawm lub sijhawm hais lus hauv German thiab txhais nws rau tus lej.
Hmoov tsis nws tsis tuaj yeem tso cov ntaub ntawv Excel ncaj qha, tab sis kuv vam tias cov ntawv xa tawm PDF nyeem tau txaus rau koj. Yog tias tsis yog, thov hu rau kuv thiab kuv yuav xa koj thawj daim ntawv Excel. Hauv PDF koj tuaj yeem pom li cas kuv teeb tsa cov laj thawj rau kuv lub moos. Koj tuaj yeem pom yuav ua li cas kuv tau mus hla cov sijhawm sib txawv thiab cov ntawv sau zoo li cas. Kev suav sab hauv cov cai (feem ntau yog-lwm nqe lus) tuaj yeem muab los ntawm cov ntaub ntawv ntawm sab xis ntawm lub rooj. Ib feem yog rau feeb thiab ib feem rau cov teev.
Raws li koj tuaj yeem pom qhov no tsis muaj khawv koob thiab tuaj yeem sau tau yooj yim hauv C. Qhov "dag tshaj" taw tes sab hauv cov laj thawj yog yuav ua li cas thiaj li teev tau raws li koj tuaj yeem pom hauv cov ntawv uas tsuas yog thaum pib ntawm ib teev lub sijhawm teev tau qhia. Hauv German (tej zaum qhov no tsuas yog qhov tshwj xeeb ntawm Bavarian) qhov "teev tom ntej" tau siv ntxov heev.
Txog kev sau kuv tau siv MPLABX raws li kuv qhov IDE xaiv.
Kauj ruam 4: Code Snippets
Kuv yuav tsis tshaj tawm kuv tus lej ntawm no, tab sis yog tias koj npaj siab yuav sau koj tus lej kuv yuav muab qee qhov kev qhia rau koj tias kuv tau "dawm li cas" thaum txhim kho …
Thawj qhov "sau npe" -filling:
Yog tias koj hloov cov ntaub ntawv tshiab mus rau cov npe ntau dhau thiab nyob rau lub sijhawm luv dhau kuv tau ua qhov kev sim, tias LEDs pib ntsais muag. Yog li kuv tau ua qee qhov "thaiv cov chij", uas tsuas yog ib feeb xwb ib qho tshiab "suav" ntawm lub sijhawm hais lus tau ua tiav thiab sau npe hloov tshiab tau ua.
Txoj cai rau sau cov npe yog nyob hauv daim duab saum toj no. Raws li koj tuaj yeem pom kuv sau tag nrho 3 daim ntawv sau npe ua ke yog li kuv xav tau 3 tus pin ntawm PIC rau cov ntaub ntawv thiab 1 tus pin rau CLK. 74HC164 siv dua cov ntaub ntawv tshiab ntawm kev hloov pauv ntawm kab CLK los ntawm 0 txog 1.
Tus so ntawm cov cai feem ntau yog PIC cov khoom, "lub sijhawm hais lus"-logic thiab tuav kev sib txuas lus thiab khawm. Kev sib txuas lus feem ntau yog muab los ntawm Microchip MPLABX vim tias kuv siv MSSP module.
Lub tswv yim zoo yog nyeem cov ntawv teev npe ntawm DS3231 vim tias cov ntaub ntawv khaws tseg hauv BCD yog li koj yuav tau "hloov pauv" qhov no hauv koj cov cai. Zoo li kuv txhawj xeeb kuv yog "kawm los ntawm" txiv leej tub thiab NTAWV tsis tau nyeem cov ntawv teev tseg … Ua rau kuv ntau qab haus huv thiab teev.
Raws li koj yuav tau pom, muaj ob txoj hauv kev "ua raws lub sijhawm" nrog rau qhov kev siv no.
- Koj tuaj yeem nyeem lub sijhawm tiag tiag ntawm DS3231
- Koj tuaj yeem "suav vib nas this" hauv PIC nws tus kheej thiab tsuas yog synchronice lub sijhawm nrog DS3231 ib ntus
Nws nyob ntawm koj thiab ob txoj hauv kev yog xyaum ua thiab ncaj nraim mus. Kuv siv thawj qhov kev xaiv thiab tsuas yog sib xyaw lub sijhawm thaum kho lub sijhawm los ntawm cov nyees khawm (sau lub sijhawm rau DS3231) lossis txhua 24 teev (nyeem sijhawm los ntawm DS3231), vim tias kuv xav siv ntau lub logic los ntawm kuv tus kheej. Kuv kuj tig kuv lub moos thaum hmo ntuj (23:00 txog rau 05:00) yog li ntawd yooj yim me ntsis hauv kuv lub tswv yim.
Kauj Ruam 5: Vaj Tsev
Qhov kawg tab sis tsis tsawg kawg yog lub sijhawm saib luv luv ntawm cov vaj tsev.
Raws li kuv tau hais los saum no, Kuv tau ua vaj tsev los ntawm kuv tus kheej (siv Eagle) thiab luam tawm nrog kuv li 3D-Tshuab Luam Ntawv yog li kuv tau saib xyuas ntawm txoj haujlwm ntawm LEDs sib txawv.
Txuas nrog koj tuaj yeem nrhiav cov ntaub ntawv STL yog tias koj xav siv lawv.
Vam tias cov lus qhia no pab koj thaum tsim koj tus kheej "Wort-Uhr". Yog tias tseem muaj "lus nug qhib" tsis txhob yig tau hu rau kuv. Txoj hauv kev zoo tshaj los ntawm kev tawm lus hauv qab no, vim tias koj yuav tsis yog tib tus uas muaj lus nug tshwj xeeb.
Pom zoo:
Arduino Tsheb Rov Qab Chaw Nres Tsheb Ceeb Toom - Cov Kauj Ruam ntawm Kauj Ruam: 4 Kauj Ruam
Arduino Tsheb Rov Qab Chaw Nres Tsheb Ceeb Toom | Cov kauj ruam ib kauj ruam: Hauv txoj haujlwm no, kuv yuav tsim qhov yooj yim Arduino Tsheb Rov Qab Tsheb Nres Tsheb Nres Sensor Siv Arduino UNO thiab HC-SR04 Ultrasonic Sensor. Qhov no Arduino raws Lub Tsheb Rov Qab ceeb toom tuaj yeem siv rau Kev Tshawb Fawb Txog Tus Kheej, Robot Ranging thiab lwm yam
Tsev Automation Kauj Ruam ntawm Kauj Ruam Siv Wemos D1 Mini Nrog PCB Tsim: 4 Kauj Ruam
Tsev Automation Kauj Ruam Ib Leeg Siv Wemos D1 Mini Nrog PCB Tsim: Tsev Automation Kauj Ruam los ntawm Kauj Ruam siv Wemos D1 Mini nrog PCB Tsim cov tub ntxhais kawm ntawv qib siab. Tom qab ntawd ib tus ntawm peb cov tswv cuab tuaj
RC Taug Qab Neeg Hlau Siv Arduino - Kauj Ruam Ib kauj ruam: 3 Kauj Ruam
RC Tracked Robot Siv Arduino - Kauj Ruam Ib Nrab: Hav guys, Kuv rov qab los nrog lwm tus neeg hlau txias chassis los ntawm BangGood. Vam tias koj tau dhau los ntawm peb cov phiaj xwm yav dhau los - Spinel Crux V1 - Tus Cwj Pwm Tswj Tus Neeg Hlau, Spinel Crux L2 - Arduino Xaiv thiab Muab Neeg Hlau nrog Robotic caj npab thiab Badland Braw
Kawm Yuav Ua Li Cas Kos Tus Tswm Ciab - Kauj Ruam Ib Kauj Ruam: 6 Kauj Ruam
Kawm Yuav Ua Li Cas Thiaj Li Tswmciab - Kauj Ruam Ib kauj ruam: Cov tswm ciab no siv sijhawm 10 feeb los kos yog tias koj ua raws kuv cov kauj ruam ua tib zoo
DIY Arduino Robotic Arm, Kauj Ruam ntawm Kauj Ruam: 9 Kauj Ruam
DIY Arduino Robotic Arm, Kauj Ruam ntawm Kauj Ruam: Cov ntawv qhia no yog qhia koj yuav tsim lub Caj Npab Caj Npab ntawm koj tus kheej li cas