Cov txheej txheem:
- Kauj Ruam 1: Tshem Koj Cov Ntoo
- Kauj Ruam 2: Sib dhos Cov Khoom Siv Hluav Taws Xob
- Kauj Ruam 3: Arduino thiab Neopixel Ring
- Kauj Ruam 4: Lub Hwj Huam Fais Fab
- Kauj ruam 5: Programming
Video: Fibreoptic Christmas Tree Upgrade: 5 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Peb tau muaj ib qho ntawm cov ntoo fiber optic Christmas ntoo rau qee xyoo. Lub hauv paus muaj lub teeb hluav taws xob 12V halogen teeb pom kev zoo, thiab cov xim xim uas tau tsav los ntawm lub cav tau muab tso nruab nrab ntawm lub teeb thiab lub hauv paus ntawm tsob ntoo. Lub teeb thiab lub cev muaj zog tau siv los ntawm 12V AC "phab ntsa lub voos xwmfab" hom lub ntsiab hluav taws xob. Tab sis cov xim tau raug ntxuav tawm thiab rov ua dua txhua 10 vib nas this lossis ntau dua, thiab qee tus neeg uas muaj cov ntoo zoo sib xws pom lub cav nrov nrov me ntsis. Nws ntaus kuv peb tuaj yeem ua tau zoo dua nyob rau hnub no thiab hnub nyoog!
Tau hloov lub teeb los ntawm 7-pixel Neopixel ntiv nplhaib uas tau tsav los ntawm Arduino Pro Mini, tam sim no nws tsis xav tau cov xim xim lossis lub tshuab tsav nws, thiab muab cov xim ntau dua siv hluav taws xob tsawg dua. Cov vis dis aus tsis ua ncaj ncees rau cov xim - qhov sib txawv ntawm LEDs tawm tsam ib qho keeb kwm yav dhau los ua rau lawv nyuaj rau thaij duab zoo
Daim duab Arduino kuv tau sau ua ke 2 cov haujlwm uas hloov pauv txhua 5 - 10 feeb. Hauv ib qho, txhua qhov Neopixels ua raws tib qho xim sib xws, tab sis txhua qhov tau qeeb me ntsis los ntawm yav dhau los, muab cov xim cuam tshuam thoob plaws tsob ntoo. Hauv lwm qhov, tag nrho 21 xim LEDs (ib qho liab, ib qho ntsuab thiab ib qho xiav hauv txhua Neopixel) tau ploj mus thiab tawm ntawm qhov tsis sib xws, muab qhov ua rau pom zoo heev ntawm kev mob hnyav thiab hloov pauv tas li.
Txij li koj tsob ntoo tsis zoo ib yam li kuv li thiab koj yuav tsis xav kom lub zog zoo ib yam li kuv tsis tuaj yeem muab cov lus qhia ntxaws rau tus pib ua tiav, tab sis cia siab tias koj yuav kawm qee yam hauv kev hloov lawv rau koj tsob ntoo.
Koj yuav xav tau:
- Adafruit Jewel Neopixel nplhaib, lossis Far Eastern sib npaug.
- Arduino Pro Mini lossis Nano (nws yuav tsum yog 5V ib feem)
- Yog tias koj siv Pro Mini, FTDI USB rau txuas txuas
- Stripboard, tus pin sawb, soldering hlau, solder, txuas hlau thiab lwm yam.
Koj tuaj yeem siv ib qho ntawm ATTiny85 cov laug cam (Trinket, Lily Tiny, Gemma) hloov pauv ntawm Pro Mini lossis Nano tab sis nws yuav tsis muaj chav rau tag nrho cov duab kos nrog ob qho program - saib Kauj Ruam 5.
Yog tias koj rov siv dua 12V AC adapter, koj yuav xav tau:
- 1N4004 rectifier diodes - 4 tawm
- 1000uF 35V electrolytic capacitor
- 5V nqis-nqis hloov pauv tus qauv tswj hwm (ib qho raws li LM2596 nti yuav tsum ua), lossis ua kom lub tsheb qub satnav lossis USB them nyiaj xa 5V raws li kuv tau ua.
Txwv tsis pub:
Rov qab siv lub 5V USB qub qub, xws li Apple lossis Blackberry them nyiaj, lossis tau txais ib qho tshiab
Kauj Ruam 1: Tshem Koj Cov Ntoo
Raws li koj yuav pom los ntawm cov duab, kuv tsob ntoo muaj lub hauv paus puag ncig uas muaj cov haujlwm, nrog lub qhov nyob rau sab saud uas siv tsob ntoo nws tus kheej.
Nws yuav tsis nyuaj rau disassemble lub hauv paus. Kuv tsuas muaj 3 tus ntsia hlau nyob hauv qab. Tshem tawm cov no thiab lub hau los ncaj ncaj. Txheeb nws ua haujlwm zoo ib yam li kuv, nrog lub teeb pom kev zoo halogen, lub cev muaj zog thiab lub disk xim.
Tshem lub teeb (2 tus tuav tuav lub nplhaib tuav) thiab daim disk xim (ruaj nrog ib tus txiv ntoo nyob rau sab saum toj ntawm ntxaiv).
Ua raws txoj kab thaiv kom pom tias nws ua haujlwm li cas. Kev hloov pauv tau yooj yim tshaj plaws yog tias koj tuaj yeem sib sau cov khoom siv hluav taws xob tshiab los ua tus qauv los hloov lub teeb ncaj qha, haum rau hauv thiab siv lub zog los ntawm nws lub qhov (socket). Tej zaum koj yuav xav txiav lub cav thiab tej zaum tshem nws tag nrho.
Kauj Ruam 2: Sib dhos Cov Khoom Siv Hluav Taws Xob
Daim duab qhia pom qhov kawg, ua ntej hloov lub hau.
Cov khoom siv hluav taws xob suav nrog txog 3 ntu:
Lub nplhaib Arduino thiab Neopixel
thiab yog tias koj tab tom siv cov khoom siv hluav taws xob 12V AC tam sim no:
- 1N4004 diodes rectifier thiab ua kom lub zog ua kom zoo
- DC-DC kauj ruam-down tus tswj.
Kuv yuav piav qhia txhua tus tig, tab sis ua ntej, txiav txim siab seb koj yuav mus rau lawv li cas kom haum rau qhov chaw ntawm lub teeb.
Kuv tau siv 3-tus pin-dav daim ntawm cov kab txaij nrog tus pin nruab nrab tshem tawm mus rau hauv qab ntawm ib thooj ntawm kab txaij. Qhov no haum rau lub qhov (socket) ntawm lub teeb.
Kuv ua kom ntseeg tau tias daim kab xev yog qhov siab tib yam li lub teeb, thiab sab saum toj ntawm kab txaij yog qhov dav ib yam li lub qhov taub qhov muag. Txoj kev ntawd daim kab xev tuaj yeem hloov lub teeb ncaj qha, khaws rau saum nrog lub nplhaib uas siv los tuav lub teeb.
Kauj Ruam 3: Arduino thiab Neopixel Ring
Yog tias koj Arduino los yam tsis muaj tus lej xov tooj tau npaj ua tiav koj tuaj yeem rub nws ncaj qha mus rau ntawm kab txaij, los ntawm kev khiav luv luv ntawm cov hlau liab qab los ntawm tus pin ntawm Arduino thiab los ntawm kab txaij, muag ntawm ob sab. Arduino Pro Mini xav tau ib txoj hauv kev 6-txoj hlua kab txuas rau lub chaw nres nkoj txuas rau rau kev ua haujlwm.
Koj tsuas yog xav tau txuas tus +5V, GND thiab D8 pins ntawm Arduino, tab sis txiav cov kab ntawm kab ntawv kab ntawm ob kab ntawm tus pin lawm, kom muaj kev nyab xeeb. Qhov ntawd yuav tso cai rau koj kom txuas ib lossis ob tus pin ntxiv kom ruaj ntseg nws yam tsis muaj kev tsim hluav taws xob luv.
Kuv siv 3 daim tuab tooj liab xaim rau ob leeg txhawb nqa lub nplhaib Neopixel thiab txuas nws mus rau ntawm kab txaij.
Lub nplhaib Neopixel muaj 4 qhov sib txuas: Vcc, Gnd, D-In thiab D-Out. Peb tsuas yog siv thawj 3 ntawm cov no.
Thaum tau teeb tsa lub nplhaib Neopixel raws li qhia, siv qhov ntev ntawm kev txuas hlau txuas Vcc rau Arduino +5V tus pin, Gnd rau Arduino Gnd tus pin, thiab D-Hauv rau Arduino tus pin D8, lossis D1 yog tias koj siv ib qho ntawm ATTiny85 cov laug cam.
Txheeb xyuas kom ntseeg tau tias cov hlua hluav taws xob uas koj tau siv lub Neopixel ntiv nplhaib kom tsis txhob cuam tshuam nrog Arduino, thiab txiav lawv yog tias tsim nyog los ua txhaum ib qho kev sib txuas zoo li no.
Kauj Ruam 4: Lub Hwj Huam Fais Fab
Yog tias koj siv 5V lub zog xa khoom txhua yam koj xav tau yog txuas qhov txuas zoo rau Vcc/+5V thiab qhov tsis zoo rau Gnd ntawm Arduino thiab Neopixel ntiv nplhaib, thiab koj tuaj yeem hla mus rau tom Programming.
12V AC cov khoom siv ua ntej yuav tsum tau kho nrog 4 diodes (tig mus rau DC), tom qab ntawd ua kom du nrog lub tshuab hluav taws xob hluav taws xob.
Kuv tau teeb tsa lub diodes thiab lub ntsuas hluav taws xob ntawm tib daim ntawv ntawm kab txaij raws li Arduino. Hauv cov duab, cov hlua tooj liab khiav ntsug.
Mount 4 diodes raws li qhia, hloov txoj kev puag ncig. Qhov kawg ntawm txhua qhov diode tau cim nrog cov qhab dawb. Txiav txhua ntawm 4 daim kab xev tooj liab ntawm ob qho kawg ntawm txhua qhov diode.
12V AC nkag los ntawm cov xov hlau dawb los ntawm cov pins uas ntsaws rau hauv lub qhov (socket). Ntawm AC kawg, diodes tau txuas nrog ib khub uas nyob ib sab raws li qhia los ntawm kab dawb, txhua AC cov xov hlau nkag mus rau ib qho zoo kawg thiab ib qho tsis zoo kawg ntawm diode.
Ntawm qhov kawg ntawm diodes txuas nrog qhov xaus zoo ua ke (kab liab) thiab qhov tsis zoo xaus ua ke (kab xiav).
Solder lub capacitor rau kab ntawv cim xim liab thiab xiav. Kuv tau siv nws txuas ntxiv mus rau ntawm lub rooj tsavxwm tom qab ntawd khoov txoj hauv kev kom tso cai rau lub tshuab hluav taws xob zaum kom huv si hla lub diodes.
Tseem ceeb heev: ib sab ntawm lub capacitor tau cim tsis zoo (nrog cov cim rho tawm). Koj yuav tsum txuas qhov ntawd mus rau kab txaij cim xiav!
Tam sim no koj tuaj yeem txuas cov xim liab thiab xiav mus rau qhov zoo thiab qhov tsis zoo sib xws ntawm DC-DC kauj ruam-nqis hloov pauv.
Yog tias koj tab tom siv tus hloov pauv qis nrog hloov kho tau, nco ntsoov ntsuas qhov tso tawm hluav taws xob nrog lub ntsuas hluav taws xob thiab kho nws mus rau 5V ua ntej mus ntxiv lossis koj tuaj yeem ua rau koj lub suab nrov Arduino thiab Neopixel puas tsuaj.
Thaum kawg, txuas qhov zoo thiab qhov tsis zoo ntawm qhov hloov pauv mus rau Vcc lossis 5V thiab Gnd ntawm Arduino thiab Neopixel nplhaib.
Koj tuaj yeem tuaj yeem teeb tsa DC-DC hloov pauv me me ntawm kab txaij nrog rau lwm cov khoom siv, tab sis kuv lub qhov loj heev, yog li kuv yuav tsum txuas nws nrog cov ya ya thiab khi nws rau ob peb nqe lus yooj yim.
Kauj ruam 5: Programming
Yog tias koj tsis muaj nws, koj yuav tsum rub tawm thiab teeb tsa Arduino IDE. Nws yog dawb xwb. Nco ntsoov tias koj muaj qhov hloov tshiab kawg (1.6.13 lossis tom qab - qee qhov ua ntej dhau los muaj kab uas ua rau kuv lub sijhawm ntau).
Hauv koj daim ntawv Arduino (los ntawm lub hauv paus Windows qhov no yog hauv Kuv Cov Ntaub Ntawv) tsim cov npe hu ua Neopix_colours3. Luam cov ntawv Neopix_colurs3.ino rau hauv daim nplaub tshev no.
Tam sim no tso Arduino IDE thiab nrhiav cov duab kos Neopix_colours3 hauv koj daim duab.
Yog tias koj tab tom siv ATTiny85 pawg thawj coj yuav tsis muaj chaw rau kos duab tas nrho. Tawm tswv yim tawm lub ntsiab lus ntawm FUNCTION_1 lossis FUNCTION_2 ze rau qhov pib ntawm daim duab. Xwb, koj tuaj yeem tuaj yeem nyem tag nrho cov duab hauv yog tias koj fij lub bootloader thiab ua haujlwm nws siv lwm Arduino.
Hauv Cov Cuab Yeej, xaiv pawg thawj coj uas koj siv (Pro Mini lossis Nano, lossis ib qho twg). Yog tias koj tab tom siv Pro Mini, txuas FTDI adapter rau Arduino (xyuas kom tseeb tias nws yog txoj hauv kev puag ncig) thiab ntsaws nws rau hauv USB chaw nres nkoj ntawm koj lub computer. Nyob rau hauv cov ntaub ntawv ntawm Nano koj tsuas yog txuas nws rau koj lub khoos phis tawj nrog USB cable.
Hauv koj lub khoos phis tawj, mus rau Tus Thawj Tswj Ntaus Ntawv - cov chaw nres nkoj (COM & LPT) thiab txheeb xyuas qhov chaw nres nkoj COM twg tau muab rau Arduino. Teeb qhov no hauv Cov Cuab Yeej - Chaw Nres Nkoj.
Tam sim no koj tuaj yeem xa daim duab kos thiab tshawb xyuas tias nws ua haujlwm. Neopixels ci ntsa iab heev yog li nws yog lub tswv yim zoo los muab ib daim ntawv hla lawv los tiv thaiv koj ob lub qhov muag, lossis hloov ib ntus cov lus txhais ntawm BRILL hauv daim duab los ntawm 255 txog 50.
Cov duab kos raws li kuv tau tshaj tawm nws pib nrog txoj haujlwm 1 thiab tom qab ntawd hloov ntawm ob txoj haujlwm sib pauv txhua 5-10 feeb. Yog tias koj nyiam ib lossis lwm qhov, nrhiav kab
muaj nuj nqi = 1;
thaum kawg ntawm teeb tsa () muaj nuj nqi. Hloov qhov 1 ntawm -1 lossis -2 txhawm rau xauv nws mus rau qhov program 1 lossis program 2. Koj tuaj yeem hloov qhov tsawg kawg thiab lub sijhawm siab tshaj plaws (hauv milliseconds) txhua qhov haujlwm khiav los ntawm kev nrhiav thiab hloov cov ntsiab lus ntawm MINCHGTIME thiab MAXCHGTIME.
Thaum koj zoo siab, muab txhua yam ua ke dua, zaum rov qab thiab txaus siab!
Pom zoo:
LED Circuit Board Christmas Christmas Ntoo Ornament: 15 Kauj Ruam (nrog Duab)
LED Circuit Board Christmas Christmas Ornament: Hnub Christmas no, Kuv txiav txim siab ua Christmas cov khoom siv los muab rau kuv cov phooj ywg thiab tsev neeg. Kuv tau kawm KiCad xyoo no, yog li kuv txiav txim siab ua cov khoom qub tawm ntawm cov rooj sib tham. Kuv tau ua txog 20-25 ntawm cov khoom qub no. Kev kho kom zoo nkauj yog lub voj voog
Google Trends Powered Christmas Tree: 6 Kauj Ruam (nrog Duab)
Google Trends Powered Christmas Tree: Xav paub tias Christmas zoo li cas? Tshawb nrhiav nrog Google qhov kev hloov pauv no tau siv tsob ntoo Christmas! Hom kev suav nrog
Christmas Tree ATmega (arduino): 10 Kauj Ruam (nrog Duab)
Christmas Tree ATmega (arduino): Christmas Tree ATmega (arduino)
Cov Duab Duab Duab thiab Cov Duab 1: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Cubes thiab Cov Duab 1: Thaum sim nrog qee cov ntoo ntoo thiab cov duab los qhia, kuv pom ob peb txoj hauv kev los ua cov voos thiab lwm yam duab los ntawm cov khoom siv yooj yim. Los ntawm kev muab cov no los ua Cov Ntawv Qhia, Kuv vam tias yuav txhawb nqa kev ua si thiab kev kawm. Kev hloov pauv ntawm qhov kev qhia no
Flashing Multicolor Christmas Tree Star: 4 Kauj Ruam (nrog Duab)
Flashing Multicolor Christmas Tree Star: Yog li, kuv tus poj niam tshiab thiab kuv tau tsiv mus rau hauv peb lub tsev tshiab, Christmas nyob ntawm no thiab peb tau cog tsob ntoo, tab sis tos … tsis yog peb ntawm lub hnub qub zoo rau saum tsob ntoo. Cov lus qhia no yuav qhia koj yuav ua li cas txias heev, flashing, hloov xim