Cov txheej txheem:
Video: WiFi Mesh Synchronized LED Tuav: 3 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Los ntawm CarlSTeleToyland Ua raws ntau los ntawm tus sau:
Hais txog: Tus Tsim txij li thaum yau nrog txhua tus tsos mob tshwm sim, tus tsim khoom siv hlau, thiab Internet software CTO/Tech Tus Thawj Saib Xyuas Khoom. Xav paub ntau ntxiv txog CarlS »
Txoj haujlwm no yog sau los ntawm cov kab hluav taws xob LED nrog ib tus zuj zus tswj tau cov LEDs (WS2812b "Neopixels"). Lawv tso cai ua cov duab ua kom hla lawv yam tsis txuas lawv ua ke. Lawv siv WiFi Mesh los sib txuas ua ke, thiab cov yeeb yaj kiab ua yeeb yaj kiab hloov pauv kom muaj ntau lossis tsawg dua cov kab hauv cov ntxaij.
Qhov kev tshoov siab yog rau ob khub nais maum kom tau dai cov mace/pas nrig rau Christmas kev lom zem. Cov duab LED ntawm lawv yog synchronized. Cov LEDs kuj tseem tuaj yeem ua cov hlua tsis txhob siv cov hlua.
Lwm qhov siv yog rau teeb duab kos duab LED qhov twg koj tsis xav khiav cov ntaub ntawv xov tooj ntawm txhua lub LEDS ib puag ncig ib chav - txhua yam lawv yuav tsum tau ua yog txuas nrog tus kheej.
Rau qhov haujlwm no, lawv tsis txuas nrog Is Taws Nem. Lawv teeb tsa lawv tus kheej ntiag tug WiFi nkag tau cov ntsiab lus thiab web servers. Yog li, txoj haujlwm no tsis yog nyob ntawm kev sib tham sab nraud, thiab tuaj yeem ua haujlwm hauv cov chaw deb. Lawv khiav ntawm 5v, yog li tuaj yeem siv tau yooj yim los ntawm roj teeb xov tooj ntawm tes sab nraud!
Kauj Ruam 1: Qhov Chaw
Cov hauv qab no tau siv hauv txoj haujlwm rau txhua kab ntawv:
- Cov tsis muaj dej tsis muaj WS2812b LED sawb. Kuv siv 30 LEDs/meter. Cov uas tsis muaj dej feem ntau muaj daim kab xev ob tog twb tau txuas rau lawv yog li lawv yooj yim rau mount. Koj yuav xav tau 1 meter rau ib channel vim tias cov channel tau ntev ib meter. Ntau LEDs ib lub 'meter' zoo - tsuas yog xyuas kom tau txais lub zog loj sib xws. Txhua (5050) LED hauv cov kab no tuaj yeem siv txog 60ma thaum ua tiav.
- Yas cov phiaj xwm hluav taws xob thaiv 60x36x25mm - qhov no yog qhov me me txaus los tuav D1 Mini.
-
Ib lub vaj huam sib luag mount 5.5mm x 2.1mm DC jack
- Lub zog 5v - 2 amp ib qho yuav tsum zoo nrog 30 LEDS @ 0.06 amp txhua thaum puv rau.
- USB rau 5.5mm x 2.1mm cable yog tias koj xav tau lub zog ua haujlwm no los ntawm USB roj teeb
- D1 Mini ESP8266 lub rooj tsavxwm - kuj tseem muaj tsawg dua, tab sis tos ntev dua.
- Aluminium channel nrog npog thiab lub hau kawg rau LED kab. Muaj ntau qhov profile xaiv los ntawm. Qhov no yog qhov dav txaus rau WS2812b LED strips (12mm), thiab cov ntaub ntawv qis.
- Aluminium bar - cov channel yog 17mm dav, yog li 1/2 "dav aluminium bar yog qhov loj me. Nws yuav tsum yog 1/16" tuab thiab 6 "ntev rau txhua qhov bar koj ua.
- Muab ob sab ua daim kab xev - 1/2 "dav.
- 1000uF capacitor - pom zoo rau txhua kab, los pab tiv thaiv qhov hluav taws xob me me los ntawm kev puas tsuaj rau LEDs.
- Hookup hlau. Qhov 26 gauge silicone hlau no hloov pauv tau yooj yim thiab pab ua kom cov hlau rub los ntawm rub cov ntaub qhwv tawm ntawm LED sawb. Nws kuj tsis yaj thaum koj kov nws nrog cov hlau txuas. Kuv kuj tseem tau siv cov xaim servo uas tseem yoog tau, tab sis cov xaim silicone yog kuv xaim tshiab uas kuv nyiam tshaj. Koj tsuas yog xav tau abot 6 "ntawm txhua xim (liab, dub, daj).
- Jumper xov hlau - poj niam liab, dub, thiab daj tau siv los txuas rau CPU. Koj tuaj yeem hla cov no thiab muab cov hlau txuas txuas ncaj qha mus rau lub rooj tsavxwm yog tias koj muaj kev ntseeg siab.
- 330 ohm resistor los txo suab nrov hauv LED kab ntawv cov kab ntawv.
- 1N4448 Teeb Pom Kev Diode lossis zoo ib yam los tso cai rau 3.3v processor kom ntseeg tau tsav lub 5v LED sawb.
- 3mm cua sov ntsws tubing - koj tsuas xav tau txog 5 "ntawm nws.
Kauj Ruam 2: Tsim Cov Bars
Kev tsim kho rau cov tuav yog tib yam li hauv Cov Lus Qhia yav dhau los no. Muaj cov duab ib qib zuj zus zoo ib yam ntawm no los ntawm kev tsim kho tsis ntev los no, thiab kev sib tham tuaj yeem nrhiav pom ntawm lwm Cov Lus Qhia.
Ib qho lus qhia tshiab ntawm kev coj cov LEDs mus rau aluminium channel: Qee zaum daim kab xev ob sab ntawm cov kab hluav taws xob LED luv dua me ntsis ntawm lub rooj tsav xwm LED thiab koj yuav pom me ntsis khawm hauv LED sawb. Yog tias koj yooj yim txiav daim kab xev ntawm qhov chaw ntawd, nws yuav tso ncaj.
Kuv kuj tseem siv qee qhov tee ntawm UV kua nplaum los xauv lub xaim hluav taws xob thiab ib feem ntawm LED sawb uas tsis nyob qis.
Hloov chaw ntawm Particle Photon cov tswj hwm, txoj haujlwm no tau siv WeMos D1 Mini cov laug cam, raws li ESP8266 nti teeb tsa. Cov no yog qhov zoo thiab me me rau qhov project LED. Kuv siv txiv neej lub taub hau los tso chaw rau cov poj niam dhia. Kev thim rov qab cov txuas yuav tsis haum rau hauv qhov thaiv. Txoj hauv kev no tseem yooj yim rau cov laug. Kuv kuj tseem tau siv 20 ntsuas cov khoom tseem ceeb hlau nrog crimped ntawm cov poj niam sib txuas, thiab qhov ntawd ua haujlwm ib yam, tab sis yog siv zog ntau dua.
Cov kab no siv tib txoj kev txi LED mus rau thawj LED. Hauv kev xyaum, nws yeej tsis pom. Tsis tas li, qhov sib txawv me ntsis ntawm thawj ob qho tseem yuav luag tsis pom
Yog tias koj npaj siab yuav siv cov clip txhawm rau txhawm rau txhim kho aluminium channel, aluminium bar txuas cov channel mus rau lub phiaj xwm phiaj xwm tuaj yeem tau txais txoj hauv kev ncaj qha rau rub cov yeeb yaj kiab rau ntawm phab ntsa, yog li koj yuav xav tau tso qee lub tshuab ntxhua khaub ncaws lossis lub txiv ntseej xoob hauv qab. nyob ntawd kom sawv tawm lawv los ntawm 1/16.
Kauj Ruam 3: Mesh Code
Txhua tus LED tuav tau khiav tib txoj cai. Lub hauv paus ntawm txoj haujlwm no yog Lub Tsev Tsis Txaus Siab Mesh ntawm https://gitlab.com/BlackEdder/placeMesh. Lub tsev qiv ntawv ntawd ua haujlwm feem ntau ntawm qib qis ua haujlwm ntawm kev tsim Cov Ntsiab Lus, Web Servers thiab lwm yam.
Cov mesh muaj ib tus tswj, thiab cov ntawv ceeb toom hloov pauv tau tshaj tawm rau txhua qhov ntawm/kab tuav LED. Rau lub mesh loj, tuaj yeem muaj qee qhov latency hauv kev xa xov, tab sis rau qhov ntsuas uas kuv tau ua haujlwm, nws tsis pom.
Thaum pib, qhov xav tias nws yog tus tswj hwm, tab sis tom qab ntawd cov lus hloov pauv tau ua rau kev ntsuas. Qhov qis tshaj # daim npav ID hauv lub mesh los ua tus tswj hwm. Qhov no feem ntau yuav siv sijhawm thib ob lossis ob rau tag nrho cov nodes kom tsaws thiab xav tias yog ib tus tswj. Koj tuaj yeem siv dag zog ntau dua kom rov ua haujlwm tau zoo dua qub (nruab nrab-lub ntsej muag), tab sis cov kev hloov pauv cov lus tau sib tham ncaj ncees, yog li nws yuav siv sijhawm me ntsis rau lub network los daws qhov teeb meem. Hauv kev xyaum, thaum lawv rov ua haujlwm, lawv nyob ruaj khov.
Txog kev ua yeeb yaj kiab uas hla cov kab, cov cai tau txais cov npe ntawm cov nodes, txheeb nws, tom qab ntawd tsuas yog kos yog tias tam sim no ntawm qhov yog tus raug kos. Lawv txheeb nyob rau hauv daim npav ID xaj, yog li koj tuaj yeem ua cov duab uas yuav zoo ib yam, tsis hais thaum lawv pib li cas. Tsis tas li, cov duab ua yeeb yaj kiab yuav hloov pauv rau cov nodes raug poob.
Cov lej cim tshwm hauv peb qhov chaw. Thawj qhov yog qhov tau txaisCallback muaj nuj nqi, qhov bar tau txais cov lus qhia ua yeeb yaj kiab tshiab. Qhov no yog qhov yooj yim haum - tsuas yog teeb tsa lub sijhawm ua ntu zus rau cov duab ua haujlwm thiab rov pib dua cov txee. Qhov thib ob yog nyob hauv lub voj kev ua haujlwm. Nyob rau ntawd, cov cai tshuaj xyuas seb qhov kev ua yeeb yaj kiab tam sim no ua tiav, thiab txav mus rau theem tom ntej. Qhov chaw zaum kawg rau cov lej ua yeeb yaj kiab yog stepAnimation muaj nuj nqi, qhov twg txhua daim duab tau ua tiav.
Cov kab ke siv millis timer los hloov tshiab - zam kev siv lub sijhawm qeeb vim tias nws thaiv qee lub tsev qiv ntawv. Lub millis chaws yuav tsum rollover kom raug.
Nco ntsoov tias kuv muaj teeb meem nrog NeoPixel lub tsev qiv ntawv thiab tsis mob Mesh nrog ntau dua ib qho LED, yog li kuv hloov mus rau FastLED.
Nov yog tus lej ntawm GitHib, thiab nws tseem txuas nrog ntawm no. Koj zoo nkauj npaum li cas thauj nws ntawm txhua tus tuav thiab koj npaj txhij mus rau ntawm LED cov duab coding!
Pom zoo:
Neighborhood Wide Synchronized LEDs: 5 Kauj Ruam (nrog Duab)
Neighborhood Wide Synchronized LEDs: Kuv muaj qee lub wireless LED tuav uas kuv xav tias kuv tuaj yeem tso tawm rau hnub so. Tab sis, hauv kuv lub tsev, lawv kuj tseem tuaj yeem txuas tau thiab. Yog li, qhov kev sib tw txias txias yog dab tsi? Kev kho kom zoo nkauj LED ntawm txhua lub tsev ntawm kuv qhov thaiv nrog qhov tsis sib xws
NTP Synchronized Wordclock: 6 Cov Kauj Ruam (nrog Duab)
NTP Synchronized Wordclock: Txheeb koj lub moos nrog NTP lub sijhawm server kom lawv tuaj yeem tshawb xyuas lub sijhawm yog tias muaj qhov tsaus ntuj yog tias koj tsis nyob hauv tsev :-)
Nplaum rab phom tuav nrog LED Flickering: 5 Kauj Ruam (nrog Duab)
Cov Tua Hluav Taws Xob Nrog Cov Teeb LED: Kuv cov tub ntxhais kawm tau zoo, tab sis lawv tseem yog cov tub ntxhais kawm theem nrab. Qhov ntawd txhais tau tias lawv tsis nco qab ua tej yam xws li tshem rab phom phom thaum kawg ntawm chav kawm. Nov yog qhov phom sij phom sij thiab hluav taws xob tsis zoo yog li kuv tau tsim lub chaw phom phom nrog cov teeb uas tshem tawm
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: Nov yog txoj hauv kev yooj yim heev thiab tus nqi qis mus rau cov duab thav duab digital - nrog qhov zoo ntawm kev ntxiv /tshem cov duab hla WiFi ntawm 'nyem thiab luag' siv (pub dawb) xa cov ntaub ntawv . Nws tuaj yeem siv tau los ntawm qhov me me £ 4.50 Pi Zero. Koj tseem tuaj yeem hloov pauv
Tsim Tus Me Nyuam Me Me: Ua Lub Ntiaj Teb Me Me Lub Log Uas Neeg Hlau Nrog Tus Tuav: 9 Kauj Ruam (nrog Duab)
Tsim Tus Neeg Hlau Me Me: Ua Lub Ntiaj Teb Me Me Lub Log Uas Neeg Hlau Nrog Gripper.: Tsim kom muaj 1/20 cubic inch neeg hlau nrog tus tuav uas tuaj yeem nqa thiab txav cov khoom me. Nws yog tswj los ntawm Picaxe microcontroller. Lub sijhawm no, kuv ntseeg tias qhov no yuav yog lub ntiaj teb cov neeg hlau uas muaj log tsawg tshaj plaws nrog tus tuav. Qhov ntawd yuav tsis muaj kev ntseeg ch