Cov txheej txheem:

Flickering LED Tswmciab: 10 Kauj Ruam
Flickering LED Tswmciab: 10 Kauj Ruam

Video: Flickering LED Tswmciab: 10 Kauj Ruam

Video: Flickering LED Tswmciab: 10 Kauj Ruam
Video: {Failed} sealant to seal the gap between the glass roof and the wall without backer rod 2024, Kaum ib hlis
Anonim
Flickering LED Tswmciab
Flickering LED Tswmciab

Nqa ib duas-khw "flickering" LED tswm ciab, ntxiv AVR ATtiny13 thiab tus lej me ntsis, thiab koj tau txais tswm ciab LED uas zoo li yuav luag tiag.

Kauj Ruam 1: Qhib Cov Tswmciab Casing

Qhib Cov Tswmciab Casing
Qhib Cov Tswmciab Casing

Cov duab me me zoo li yog cov cuab yeej zoo tshaj plaws rau txoj haujlwm no. Lub casing tsis glued. Tsuas yog kev sib txhuam-haum ncej uas nkag mus rau hauv qhov tau txais hauv lub hau. Ua haujlwm nyob ib ncig ntawm lub hau npog thiab lub hauv paus yuav pib xoob. Tsis txhob maj nrawm vim tias cov xov hlau txuas rau LED module sab hauv zoo heev thiab tawg yooj yim. Peb yuav rov siv cov xov hlau no, yog li ceev faj.

Kauj ruam 2: Tshem tawm LED Module

Tshem tawm LED Module
Tshem tawm LED Module
Tshem tawm LED Module
Tshem tawm LED Module
Tshem tawm LED Module
Tshem tawm LED Module

LED, txuas nrog nws lub hauv paus, yog kev sib txhuam-haum rau lub hauv paus ntawm cov yas tswm ciab nplaim taws. Nyias me ntsis thiab rub kom tshem tawm. Nco tseg ntawm cov xim hlau, vim tias lawv yuav txawv ntawm chav tsev kuv siv. Kuv yuav siv "daj" rau qhov tsis zoo thiab "liab" rau qhov zoo.

Kauj Ruam 3: Tsiv Cathode Hlau

Tsiv Cathode Hlau
Tsiv Cathode Hlau

Peb yuav tsis siv qhov qub Circuit Court, uas yog qhov hloov pauv qis uas tsuas yog flickers LED tawm rau ob peb milliseconds ib ntus. Ua tib zoo tshem tawm cov xaim daj thiab txav nws mus rau LED cathode ntawm tus pin nruab nrab. Cov xaim zoo heev. Siv lub raj kub kub los yaj qhov kev sib txuas qub. Ntxiv me ntsis tshiab solder rau hauv nruab nrab tus pin. Tom qab ntawd koj tuaj yeem tuav cov xaim tawm tsam tus pin nruab nrab thiab rov ua dua qhov sib koom ua ke tau yooj yim.

Kauj ruam 4: Program Koj Chip

Program Koj Chip
Program Koj Chip

Peb yuav txiav tawm cov pins uas tsis siv ntawm ATtiny13, yog li nco ntsoov npaj cov nti ua ntej koj ua qhov ntawd! Kuv siv USBtinyISP programmer thiab SparkFun breakout board hauv lub lauj kaub tais diav uas tsis tau siv. Peb tab tom siv cov oscillator sab hauv ntawm qhov me me 13, yog li tsis tas yuav hlawv ib qho ntawm cov phiaj xwm fuses. Koj tuaj yeem siv cov ntaub ntawv hex muab lossis suav koj tus kheej nrog cov chaws muab los. Qhov sau tseg txog qhov chaws: Kuv siv lub tshuab hluav taws xob tus lej tsis raug vim tias stdlib rand () muaj nuj nqi yuav luag ob npaug. Thaum koj tsuas muaj 1024 bytes ntawm Flash nco, txhua byte suav! Tsis tas li, lub millisecond timer tsis zoo li ua kab nrog lub sij hawm teev phab ntsa tiag. Tab sis txij li lub sijhawm tseeb tsis yog qhov tseem ceeb hauv daim ntawv thov no, Kuv tsuas yog pom lub sijhawm. Cov neeg lim hiam tuaj yeem tsoo, tab sis kuv yog tus coj ncaj ncees.:) Txhawm rau ua haujlwm siv cov ntaub ntawv hex muab rau ntawm Linux system, siv kab lus hais kom ua no: avrdude -p attiny13 -P usb -c usbtiny -U flash: w: flicker.hexWinAVR cov neeg siv yuav tej zaum paub qhov yog. Kuv tsis ua Windows.: DUpdate: flicker2.zip muaj qhov hloov pauv thib ob ntawm cov cai, suav nrog ob lub qauv flicker (flicker-up thiab flicker-down), nrog rau ntxiv saib xyuas kev tiv thaiv kom rov pib dua lub nti yog cov cai tseem ceeb yuav tsum khov.

Kauj Ruam 5: Txiav Chip Legs

Txiav cov ceg
Txiav cov ceg
Txiav cov ceg
Txiav cov ceg

Txij li thaum peb tsuas yog siv tus pin 4, 5 thiab 8, txiav tawm tus so ntawm tus pin nrog txheej txheej ntawm cov yaug dej.

Kauj Ruam 6: Ua Qee Qhov Kev Sib Txuas

Ua Ib co Kev Sib Txuas
Ua Ib co Kev Sib Txuas
Ua Ib co Kev Sib Txuas
Ua Ib co Kev Sib Txuas

Cov hmoov txhuas liab (zoo) raug txiav hauv cov theem ua ntej. Tam sim no koj yuav hle kwv yees li 3/16 ntawm ib nti ntawm rwb thaiv tsev los ntawm txhua qhov pub dawb ntawm cov hlau liab. Tom qab ntawd xaub cov xaim uas raug. Muab cov pins ntxiv rau ntawm koj lub me me 13 nti, ib yam nkaus. Qhov no ua rau txuas cov xov hlau zoo dua yooj yim dua, vim tias koj tuaj yeem tuav cov xaim tiv thaiv tus pin tus pin thiab rov ua dua qhov sib koom ua ke nrog cov hlau kub kub.

Cov hlau lead liab los ntawm LED tus qauv txuas rau tus pin 5. Cov hlau lead liab los ntawm lub roj teeb mus rau tus pin 8. Rau hauv av txuas, siv tus pas ntsuas lub qhov ntswg zoo txhawm rau khoov tus pin hauv "U". Nrog rab riam ntse, ntsuas qhov rwb thaiv tsev ntawm cov hlau daj (tsis zoo) thiab rub nws sib nrug kom nthuav tawm ntu me me ntawm cov xaim liab qab. Muab qhov seem ntawm cov hlau tsis huv tso rau hauv "U" koj tsuas yog khoov thiab ua kom zoo zoo.

Kauj Ruam 7: Ntxiv Qee Qhov Rwb Thaiv Tsev

Ntxiv Qee Rwb Thaiv Tsev
Ntxiv Qee Rwb Thaiv Tsev

Vinyl hluav taws xob daim kab xev ua rau tus neeg sib tw zoo rau insulating cov raug. Txiav ib txoj kab nqaim thiab plam nws nruab nrab ntawm lub cev nti thiab tus pin, tom qab ntawd quav nws. Thaum insulated, quav cov pins hla hauv qab ntawm lub nti.

Kauj Ruam 8: Kuaj Koj Li Circuit Court

Ntsuam Xyuas Koj Lub Hauv Paus
Ntsuam Xyuas Koj Lub Hauv Paus

Tam sim no yog lub sijhawm zoo los teeb lub roj teeb thiab tshuaj xyuas koj txoj haujlwm.

Kauj Ruam 9: Muab tag nrho ua ke

Muab Tso Ua Ke
Muab Tso Ua Ke

Rov tso lub LED rau hauv qab ntawm cov nplaim yas. Muab lub nti tso rau hauv rooj plaub qhov twg nws yuav tsis tig tawm tsam qhov qhib-tawm. Thaum kawg, muab lub hauv paus ntawm tswm ciab rov qab, zaum lub rooj zaum hauv qab hauv qab rau hauv lub qhov (socket) hauv lub hau.

Kauj ruam 10: Saib! Flickering nplaim taws

Yog tias txhua yam ua haujlwm tau zoo, tam sim no koj muaj qhov nplaim taws "nplaim taws" saum koj lub tswm ciab LED. Cog rau koj cov phooj ywg. Cov koog kuv tau yuav tuaj 2 rau ib pob, yog li koj tuaj yeem yooj yim qhia ua ntej thiab tom qab.

Pom zoo: