Cov txheej txheem:

DIY Teeb Pom Kev Sab Nraud Sab Nraud: 7 Kauj Ruam (nrog Duab)
DIY Teeb Pom Kev Sab Nraud Sab Nraud: 7 Kauj Ruam (nrog Duab)

Video: DIY Teeb Pom Kev Sab Nraud Sab Nraud: 7 Kauj Ruam (nrog Duab)

Video: DIY Teeb Pom Kev Sab Nraud Sab Nraud: 7 Kauj Ruam (nrog Duab)
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Hlis ntuj nqeg
Anonim
DIY Sab nraum zoov Toj roob hauv pes teeb pom kev zoo
DIY Sab nraum zoov Toj roob hauv pes teeb pom kev zoo

Kuv tau muaj teeb meem nrog cov tuam txhab teeb pom kev zoo txij li thaum kuv yuav kuv thawj lub tsev nyob rau xyoo 2003. Cov hloov pauv tau siv zog tsawg nrog qhov tsis nkag siab khawm khawm cuam tshuam thiab cov ntxaij vab tshaus pheej yig qhov twg wattage zoo li muaj txiaj ntsig ntau dua li platinum. Tshwj tsis yog tias koj nkag mus rau tus nqi siab tiag tiag, cov teeb pom kev tsis zoo nrog qhov tsis txaus-rau-tsis muaj qhov hloov pauv hloov tshiab (spikes). Cov connectors yog kev nyuaj siab thiab finicky. Kuv tau ua si nrog Raspberry Pi ob peb xyoos thiab xav tias nws yuav tsum yog lub hauv paus zoo rau lub teeb pom kev zoo. Kuv yeej xav dov kuv tus kheej cov kev daws teeb meem thiab qhov no dhau los ua kuv lub caij nplooj ntoo hlav xyoo 2019 rau txoj haujlwm txhim kho tsev.

Khoom siv

Daim Ntawv Teev Npe Ua Tau Zoo Tam Sim No

~ Shrink Tubing:

~ Dej nyab:

~ Hlau:

~ Case:

~ Case Mounting Panel:

~ LED Waterproof Sawb:

~ Silicone Hlau:

~ Aluminium Channel (U06B10 Dub w/Mis Dawb Npog):

~ Xaus Caps (U06 Dub):

~ Toj roob hauv pes Staples:

~ Cov Khoom Siv Hluav Taws Xob:

~ Raspberry Pi W:

~ Relay:

Saib Cov Npe

~ Txuas:

Ntxiv Yooj Yim

~ Ryobi Chaw Tua Hluav Taws Xob:

~ Dremel Butane Torch:

Ua Tsis Tau Li Cas

~ Sab Nrauv Hlau Ceev:

~ Cov Txuas Hluav Taws Xob:

~ Dej nyab:

Kauj Ruam 1: Kev tshoov siab & Kev lees paub

Kev tshawb nrhiav ua ntej coj kuv mus rau ob qho kev qhia hauv online uas kuv xav tias tuaj yeem ua ke thiab hloov kho tshiab los tsim qhov kuv tab tom nrhiav.

~ Colin Miles, aka onehourcleaner ntawm Cov Lus Qhia, tau tshoov kuv siab nrog cov ntawv no. Nws piav qhia lub hwj chim txuas xov zoo kawg li yog li kuv yuav tsis rov sau nws cov haujlwm, theej kuv yuav ntxiv qee qhov hloov tshiab.

~ Matyscabreras hauv YouTube tsim cov yeeb yaj kiab zoo ntawm DIY LED teeb.

Kauj Ruam 2: Txheej Txheem

Raws li cov lus txhawb siab kuv lub hom phiaj yog raws li hauv qab no:

~ Siv lub PC fais fab mov uas yuav ua rau lub teeb thiab Raspberry Pi.

~ Sau cov cai Python uas yuav tswj kev tig lub teeb rau thiab tawm.

~ Siv lub vev xaib pabcuam los txiav txim lub hnub tuaj/hnub poob ua lub hauv paus rau kev tswj hwm lub teeb.

~ Tsim kuv tus kheej lub teeb kom cov khoom hloov pauv tau yooj yim.

~ Tshaj tawm kev daws rau lwm tus los siv/txhim kho/txaus siab.

Kauj Ruam 3: Sunrise/Sunset Web Service

Raws li tau hais hauv "Kauj Ruam 11: Kev Txhim Kho Kev Txhim Kho & Txhim Kho" ntawm ib qho ntawm cov lus txhawb siab, Colin hais txog siv Huab Cua Hauv Qab los ntawm kev tau txais tus lej API. Hmoov tsis zoo, WU's API tau mus txog qhov kawg ntawm kev pabcuam. Kuv tau pom lwm qhov kev pabcuam hu ua Sunrise Sunset uas siv REST API yooj yim. Koj tuaj yeem tsim qhov URL tsim nyog suav nrog koj qhov latitude thiab longitude coordinates hauv decimal degrees. Thaum raug hu, API yuav rov qab JSON nrog lub hnub tuaj thiab hnub poob ntawm qhov chaw ntawd hauv UTC lub sijhawm.

Ib qho piv txwv URL thiab cov lus teb yog raws li hauv qab no:

URL

api.sunrise-sunset.org/json?lat=36.7201600…

Teb

{

"cov txiaj ntsig": {"hnub tuaj": "6:31:48 AM", "hnub poob": "5:32:25 PM", "solar_ tav su": "12:02:07 PM", "day_length": "11: 00: 37 "," civil_twilight_begin ":" 6:05:35 AM "," civil_twilight_end ":" 5:58:39 PM "," nautical_twilight_begin ":" 5:35:23 AM "," nautical_twilight_end ":" 6:28:50 PM "," astronomical_twilight_begin ":" 5:05:23 AM "," astronomical_twilight_end ":" 6:58:50 PM "}," xwm txheej ":" OK"

Thaum sau kuv li Python code, Kuv tawm tsam ntau yam hauv kev cuam tshuam nrog thiab hloov pauv ntawm thaj chaw sijhawm. Kuv ntseeg tias kuv tus lej ua haujlwm raws li kuv xav tau. Qhov kev xeem zoo yuav yog thaum lub moos hloov pauv rau lub sijhawm txuag hnub nruab hnub. Hauv kev xav, kev txhim kho yav tom ntej yuav yog teeb tsa kuv Raspberry Pi kom ua haujlwm hauv UTC thiab tsis ua kev hloov pauv hlo li. Yog tias kuv txiav txim siab ua qhov ntawd, Kuv yuav hloov kho cov lus qhia no.

Kauj ruam 4: Python Code

Kuv ntxiv kuv tus lej nab npawb rau "Chaw Teeb Pom Kev Sab Nraud" ntawm kuv GitHub. Kuv zoo siab txais tos cov tswv yim ntawm kuv li Python code. README.md yog raws li hauv qab no:

Python cov ntawv siv los qhib lub teeb pom kev sab nraum zoov rau/tawm los ntawm Raspberry Pi. Siv Sunrise Sunset REST API kom rov qab tau sijhawm hauv JSON (https://sunrise-sunset.org/).

Siv cov pob hauv qab no: nab nab 3 pip3 nab nab-thov nab nab-dateutil Siv cov cron hauv qab no los khiav cov ntawv no thaum 1 teev sawv ntxov txhua hnub thiab ntawm kev kaw haujlwm rov ua haujlwm (crontab -e): 0 1 * * */home/pi/OutdoorLighting/OutdoorLighting. py @reboot /home/pi/OutdoorLighting/OutdoorLighting.py

Kauj Ruam 5: Tus Tswj Xyuas Lub Rooj Sib Tham

Cov Rooj Sib Tham Tswj
Cov Rooj Sib Tham Tswj
Cov Rooj Sib Tham Tswj
Cov Rooj Sib Tham Tswj
Cov Rooj Sib Tham Tswj
Cov Rooj Sib Tham Tswj

Cov duab tau sau nrog txhua qhov kev sib txuas xav tau los tswj tus tswj.

Kauj Ruam 6: Kev Tsim Kho Teeb

Kev Tsim Kho Teeb
Kev Tsim Kho Teeb
Kev Tsim Kho Teeb
Kev Tsim Kho Teeb
Kev Tsim Kho Teeb
Kev Tsim Kho Teeb

Tom qab qee qhov kev sim thiab ua yuam kev, qhov no yog lub teeb tsim kuv khom ntawm qhov uas kuv txaus siab nrog. Cov duab tau sau nrog cov lus qhia tshwj xeeb.

Kauj Ruam 7: Xaus

Xaus
Xaus
Xaus
Xaus

Txoj haujlwm no nyuaj me ntsis, tsis tu ncua, thiab muaj txiaj ntsig zoo. Kuv tau siv qee cov nyiaj thaum kuv tus kheej R&D, tab sis tsis ntau. Kuv siv ntau dua qhov kuv xav tau ntawm ATX lub zog xa khoom txhawm rau muab yav tom ntej nthuav dav-muaj peev xwm. Txoj kev npaj yuav khiav teeb pom kev thoob plaws hauv tsev. Lub teeb lawv tus kheej tig tawm heev niaj hnub thiab txaus nyiam. Qee tus yuav xav tau lub teeb sib txuas thiab kuv paub tseeb tias cov plug-and-play solution tuaj yeem nrhiav tau ntawm Amazon.

Pom zoo: