Cov txheej txheem:

Ua kom Cua-raws Ambient Zaub: 8 Cov Kauj Ruam (nrog Duab)
Ua kom Cua-raws Ambient Zaub: 8 Cov Kauj Ruam (nrog Duab)

Video: Ua kom Cua-raws Ambient Zaub: 8 Cov Kauj Ruam (nrog Duab)

Video: Ua kom Cua-raws Ambient Zaub: 8 Cov Kauj Ruam (nrog Duab)
Video: Siv Yis Neeb Leej Cawm Seej Music Video Short 2024, Hlis ntuj nqeg
Anonim
Ua kom Cua-raws Ambient Zaub
Ua kom Cua-raws Ambient Zaub

Nov yog chav kawm tsim thiab tsim los ntawm Trinh Le thiab Matt Arlauckas rau HCIN 720: Prototyping Wearable thiab Internet of Things Devices ntawm Rochester Institute of Technology.

Lub hom phiaj ntawm txoj haujlwm no yog xav kom pom qhov pom kev thiab qhov nrawm ntawm cua hauv qhov chaw cuam tshuam nrog RFID tokens. Ob qhov ntev no yuav muaj txiaj ntsig zoo rau txhua tus uas tsav nkoj, ya drones, kites, qauv foob pob hluav taws, thiab lwm yam.

Cov zaub yuav suav nrog kiv cua sab saud kom ua kab ntawm cov ntaub ripple thiab 'seev cev' saum lub rooj saum toj. Lub neej nyob ntawm cov hlua yuav qhia qhov loj ntawm cua ceev. Cov cua qhia yuav sawv cev los ntawm qhov taw qhia txuas nrog rau lub tshuab tsav hauv lub hauv paus thiab tuaj yeem tig tau 360 ° puv.

Kauj Ruam 1: Cov Ntaub Ntawv thiab Cov Cuab Yeej

Vaj tse

  • 1/8 "Acrylic (PMMA) Sheets, haum rau laser txiav
  • 1/8 "Acrylic Rods (rau txhaws pob qij txha)
  • Fringy cov khoom

Cov Khoom Siv Hluav Taws Xob

  • Particle Photon (https://store.particle.io/collections/photon)
  • 2.1mm DC chim jack (https://www.adafruit.com/product/373)
  • 12VDC 600mA Fais fab mov nrog 2.1mm ntsaws (https://www.adafruit.com/product/798)
  • DC-DC Power Converter (https://www.digikey.com/product-detail/en/murata-power-solutions-inc/OKI-78SR-12-1.0-W36-C/811-3293-ND/6817698) LOSSIS 7805 Cov Hluav Taws Xob Hluav Taws Xob (https://www.instructables.com/howto/7805/)
  • MFRC522 RFID Reader Board (https://www.amazon.com/dp/B00VFE2DO6/ref=cm_sw_su_dp)
  • L293D Dual H-Choj Tsav Tsav Tsheb (https://www.adafruit.com/product/807)
  • 12V Stepper Motor (https://www.adafruit.com/product/918)
  • 120mm 12VDC Ntxuam (https://www.amazon.com/Kingwin-CF-012LB- Ua tau zoo -Txhua yam -Ventilation/dp/B002YFP8BK)
  • S9013 NPN Transistor (lossis zoo sib xws)
  • 2 - 220 Ohm resistor
  • 1N4001 Diode
  • 5 hli Xiav LED
  • Mifare Classic 1K RFID daim ntawv lo cim npe (https://www.amazon.com/YARONGTECH-MIFARE-Classic-Material-adhesive/)

Thaiv

  • Adafruit Perma-Proto Half Board (https://www.adafruit.com/product/1609)
  • 22 AWG xaim, ruaj thiab tso tseg
  • 20 AWG, ob tus neeg tsav hlau (rau lub zog)
  • Txiv neej header connector sawb (rau kiv cua thiab lub cev sib txuas)
  • 2 - 12 tus pin poj niam stackable header strips (rau Photon)
  • 1 - 1x3 0.1 "suab poj niam header strip (rau kiv cua transistor)
  • 1 - 1x8 0.1 "pitch header connector thiab crimp socket hu (RFID nyeem ntawv)
  • 1 - 1x2 0.1 "suab header connector thiab crimp socket hu (kiv cua)
  • 4 - 1x1 0.1 "suab header connector thiab crimp socket hu (stepper lub cev muaj zog)
  • 1-16-pin DIP qhov (rau H-choj)
  • Cov nylon khi me me (xaiv tau)
  • Thaum tshav kub kub ntsws tubing (yeem)

Kho vajtse

  • 2 - M3x6mm screws (rau mount stepper lub cev muaj zog)
  • 4 - M3x35mm ntsia hlau (rau mount kiv cua)
  • 8 - M3 tiaj tus ntxhua khaub ncaws
  • 4 - M3 noob

Cov cuab yeej

  • Laser txiav
  • 3D Tshuab Luam Ntawv
  • Cuab yeej cuab yeej
  • Acrylic nplaum (https://www.amazon.com/Acrylic-Plastic-Cement-Applicator-Bottle/)
  • Caij nplooj ntoos hlav corrugated ntawv los xij (rau sib dhos jig)

Kauj ruam 2: Cov ntaub ntawv los sawv cev

Cov Ntaub Ntawv los Sawv Cev
Cov Ntaub Ntawv los Sawv Cev

Cov Cua Qhia yuav tso tawm sawv cev ntawm cov cua qhia thiab nrawm los ntawm qhov chaw cuam tshuam nrog RFID-tagged token. Cov ntaub ntawv no yuav raug khaws los ntawm WeatherUnderground API.

Kauj Ruam 3: Zaub Tsim

Zaub Tsim
Zaub Tsim
Zaub Tsim
Zaub Tsim
Zaub Tsim
Zaub Tsim

Laser Txiav

Ua raws li phau ntawv qhia rau lub tshuab txiav laser koj yuav siv, npaj cov duab Adobe Illustrator cov ntaub ntawv (hauv qab) rau kev txiav. Koj yuav xav tau rov kho cov khoom hauv cov ntaub ntawv kom haum rau qhov loj ntawm lub tshuab txiav laser uas koj siv.

Laser txiav cov phaj los ntawm 1/8 acrylic (PMMA) cov ntawv yas.

Assembly Sib

Txhawm rau tswj hwm lub tsev pentagon sab nraum lub kaum sab xis ntawm 116.6 °, peb tau tsim lub nrawm nrawm (sib dhos_jig.ai) los pab ua ke cov phiaj.

  1. Qhib cov ntawv sib dhos_jig.ai, thiab txiav ntau daim los ntawm cov duab los qhia corrugated.
  2. Muab lawv tso rau hauv ib pawg, ua kom ntseeg tau tias cov pawg nyob ruaj khov.

Lub Filler Qaum

Vim tias cov ces kaum tsis zoo ib yam rau ib leeg, peb siv 1/8 acrylic pas nrig txhawm rau txhawm rau qhov sib txawv, thiab muab thaj tsam ntau ntxiv rau gluing. ntawm txhua qhov kawg rau qhov twg cov ces kaum tuaj ua ke.

Sib Sau Lub Hauv Paus

Pib nrog lub hauv paus nrog lub qhov ntxuam loj, thiab lo ib daim ntawm acrylic pas nrig ntawm txhua ntawm tsib ntug.

Muab cov kiv cua no tso rau ntawm ib qho me me ntawm lub rooj sib dhos jig, thiab tso lub hauv paus ib sab rau ntawm ib sab tig rov qab.

Ua tib zoo thov cov nplaum rau ntawm qhov sib koom tes thiab tos kom nws teeb tsa.

Txuas ntxiv ua haujlwm nyob ib ncig ntawm ob sab ntawm lub hauv paus, ua kom ntseeg tau tias yuav tsum tau muab ib daim pas nrig tso rau qhov twg los xij ob daim hlau sib ntsib.

Sib sau ua ke DeckGlue ob lub stepper motor mounting disks rov qab-rau-rov qab, ua kom ntseeg tau kab kab. Thaum teeb tsa, ua tib zoo siv lub kais los xov ob lub qhov me me rau M3 cov ntsia hlau. Tam sim no, lo qhov no rau nruab nrab ntawm lub phaj lawj, rov ua kom ntseeg tau kab ntawm qhov nruab nrab qhov.

Txuas tus tsav tsheb siv ob lub M3x6mm ntsia hlau.

Sib Sau Ua Ke

Sab saum toj tau sib sau ua ke ib yam nkaus li hauv qab, tab sis tsuas muaj plaub daim phiaj xwb. Koj yuav tawm ntawm qhov sib txawv qhov twg phaj thib tsib 'yuav' nyob. Tsis txhob hnov qab siv cov pas nrig acrylic nrog lo rau saum cov phaj.

Kauj ruam 4: Electronics

Electronics
Electronics
Electronics
Electronics
Electronics
Electronics
Electronics
Electronics

Txoj haujlwm no tuaj yeem sib sau ua ke tau sai siv lub khob cij thiab cov xov txuas. Tsuas yog ua raws daim duab saum toj no.

Txog rau kev cog lus ntau dua, ua tau zoo, tom qab ntawd nws yog lub sijhawm tsoo tawm cov txuj ci ntawd.

Koj puas muaj kev txawj ntse vwm, tsis yog koj? Yog tias tsis yog, ntawm no ob peb qhov txuas los pab kho qhov ntawd …

  • Cov lus qhia: Yuav Siv Li Cas
  • Adafruit Phau Ntawv Qhia rau Kev Txhim Kho Zoo

Siv Adafruit Perma-proto ib nrab pawg thawj coj, teeb cov khoom raws li pom hauv daim duab Fritzing saum toj no. Kev siv lub qhov (socket) rau kev sib txuas hauv Circuit Court thiab transistor tso cai hloov pauv sai thiab yooj yim yog tias koj tshwm sim los tso ib qho Magic Smoke (https://en.wikipedia.org/wiki/Magic_smoke).

Cov kab laug sab hauv taub hau/qhov ntsaws rau hauv pawg thawj coj los pab txuas cov khoom siv sab nrauv (lub cev muaj zog thiab lub kiv cua) thiab ua rau lawv hloov pauv tau yooj yim (saib 'Cov pa luam yeeb Magic' saum toj no). Lub zog hluav taws xob thiab cov xov hlau hauv av ua ntej, sim ua kom lawv luv thiab ncaj ncaj li sai tau. Siv lub DC fais fab txuas mus rau ib qhov kawg ntawm qhov ntev ntawm 20AWG ob tus coj hlau, thiab lwm qhov kawg mus rau sab saum toj ntsia hlau (pawg thawj coj qhia nrog Photon headers mus rau sab laug).

Siv cov xaim hluav taws xob los ua cov kab hluav taws xob sib txuas. Hauv qee kis, nws yooj yim dua rau kev thaiv cov kab hauv qab ntawm pawg thawj coj saib. Rau tus nyeem ntawv RFID, cov kab ntawv sib dhos tau yooj yim rau Photon tso cai muaj chav txaus rau kev sib txuas ua hauv qab Photon. Txiav qhov RFID xov hlau nrog 1x8 lub taub hau txuas, txhawm rau txuas rau RFID tus nyeem ntawv lub taub hau.

Kauj Ruam 5: Nruab Hluav Taws Xob

Nruab Electronics
Nruab Electronics
Nruab Electronics
Nruab Electronics
Nruab Electronics
Nruab Electronics

Thaum lub hauv paus tau glued, nruab lub kiv cua hauv lub hauv paus siv plaub M3x35 ntsia hlau, tshuab ntxhua khaub ncaws thiab txiv ntseej.

Txuas lub rooj tsavxwm tseem ceeb rau sab hauv ntawm lub phaj rov qab (phaj nrog lub kaum plaub txiav tawm rau DC lub tog raj txuas) siv daim kab xev txhawb nqa daim kab xev.

Ntxig DC lub tog raj tso rau hauv lub qhov lub qhov, thiab cov cement hauv qhov chaw siv cov nplaum acrylic.

Txuas cov ntawv nyeem RFID rau lub txuas thiab txuas rau qhov twg los tau yooj yim siv ua npuas ncauj-txhawb nqa daim kab xev. Nws tsis ua li cas yog tias sab nraum qab ntawm lub rooj tsavxwm ntsib lub ntsej muag sab nrauv, lub kav hlau txais xov tseem yuav tuaj tos lub teeb liab RFID. Ruaj ntseg Blue LED nyob ze.

Txuas lub kiv cua thiab tus tsav tsheb mus rau hauv pawg thawj coj.

Kauj ruam 6: Programming

Tshiab rau Particle Photon?

Txoj haujlwm no yuav siv Particle Webhooks los sau cov ntaub ntawv cua. Nov yog tus txheej txheem, hauv qhov yooj yim.

  1. Lub cuab yeej tos kom token raug luam theej duab.
  2. Thaum tus lej cim tau raug tshuaj xyuas, tus cim cim cim tshwj xeeb tau khaws cia.
  3. Tom qab ntawv lub cuab yeej luam tawm tus lej cim no mus rau Particle.io.
  4. Thaum tau txais cov ntaub ntawv no, Particle.io xa cov ntaub ntawv rau peb nplooj API ntawm webhook kev koom ua ke.
  5. API nplooj ntawv tau txais tus cim token, thiab saib lub nroog thiab xeev cuam tshuam nrog nws los ntawm Cov Chaw Tshawb Nrhiav.
  6. API nplooj ntawv tom qab ntawd ua rau AP hu rau WeatherUnderground (WU) siv cov ntaub ntawv qhia chaw.
  7. WU API xa rov qab JSON cov khoom ntawm qhov ua tiav huab cua tam sim no rau qhov chaw ntawd rau API nplooj ntawv.
  8. API nplooj ntawv txheeb xyuas cov ntaub ntawv no, rho tawm thiab hloov cov cua qhia thiab cua nrawm, thiab xa lawv rov qab mus rau lub cuab yeej ua JSON yam khoom.
  9. Cov cuab yeej cais tawm JSON cov khoom, khaws cia cov cua qhia thiab nrawm kom siv los tswj cov stepper lub cev muaj zog thiab kiv cua.

Firmware

Tsim txoj haujlwm Photon tshiab hu ua 'wind_display' thiab sau cov ntawv tseem ceeb nrog rau wind_display.ino code (hauv qab).

Tom ntej no, nrhiav thiab teeb tsa cov tsev qiv ntawv hauv qab no hauv koj qhov project:

  • MFRC522 - v0.1.4 RFID lub tsev qiv ntawv rau Cov Khoom Siv Particle
  • SparkJSON - v0.0.2 JSON qiv los ntawm @bblanchon
  • Stepper - v1.1.3 Stepper Motor library rau Arduino

Sau cov phiaj xwm thiab rub mus rau koj li Photon.

API nplooj ntawv

Txhawm rau siv API nplooj ntawv, koj yuav tsum tau xa nws mus rau PHP-qhib lub web server. Muaj ntau yam dawb PHP web hosting xaiv muaj.

Rub tawm getWindData.txt thiab hloov cov ntawv txuas mus rau.php. Qhib hauv koj tus kws kho mob uas koj nyiam thiab ua cov kev hloov hauv qab no:

Ntxiv koj Photon Core ID:

// Ntxiv rau core_id rau Photons koj xav tso cai siv API no $ allowedCores = array ('Koj CoreID mus ntawm no');

Ntxiv koj WeatherUnderground API Key:

// WeatherUnderground API Key $ wu_apikey = "Koj li WU API Key";

Lub sijhawm no, tsis txhob txhawj txog teeb tsa lub tokens/qhov chaw. Peb yuav saib xyuas qhov ntawd tom qab txhua yam tau teeb tsa.

Txuag thiab xa cov ntawv mus rau lub web server. Sau qhov URL nyob rau API nplooj ntawv.

Particle Webhook

Nkag mus rau hauv koj li Particle Console, thiab nyem rau ntawm Integrations icon ntawm sab laug.

  1. Nyem rau ntawm 'Kev Sib Koom Tshiab', tom qab ntawd xaiv 'Webhook'.
  2. Teem Sijhawm Lub Npe rau 'wind_display'.
  3. Teeb URL mus rau qhov URL nyob ntawm API Nplooj Ntawv.
  4. Nyem 'Tsim Webhook'.

Tau txais RFID Token IDs thiab hloov kho API nplooj ntawv

Nrog Photon ntsaws rau hauv koj lub khoos phis tawj ntawm USB, thiab tshem tawm los ntawm lub zog hluav taws xob sab nraud, qhib lub qhov rai dav hlau thiab khiav Particle Serial Monitor.

  1. Luam theej duab daim ntawv RFID thiab sau tus lej 8 tus cim token uas tau tshwm rau hauv kab ntawv saib.
  2. Rov ua dua rau lwm cov cim npe uas koj xav siv.

Tam sim no rov qab mus rau getWindData.php thiab nrhiav qhov Chaw Cov Chaw seem:

// Qhov chaw Array // Hloov "TokenID n" nrog scanned token ID // Hloov "Cityn" nrog lub nroog cuam tshuam nrog token ID // Hloov "Sn" nrog ob lub xeev sib txuas nrog lub nroog $ cov chaw = array ("TokenID 1" => array ("nroog" => "City1", "state" => "S1"), "TokenID 2" => array ("nroog" => "City2", "state" => "S2"), "TokenID 3" => array ("nroog" => "City3", "xeev" => "S3"));

Hloov txhua tus lej cim nrog cov cim cim cim ntawm koj cov cim npe, thiab koom nrog txhua lub nroog thiab xeev uas koj xav tau cov ntaub ntawv cua los ntawm.

Txuag cov ntaub ntawv thiab xa mus rau koj lub web server.

Kauj ruam 7: Siv nws

  1. Muab tso rau txhua qhov chaw koj xav tau.
  2. Teem lub cua vane mus rau sab qaum teb.
  3. Plug rau hauv lub hwj huam mov.
  4. Muab tus cim cim ze tus nyeem ntawv RFID thiab tos kom lub xiav LED ntsais.

Kauj Ruam 8: Cov Tswv Yim Ntxiv

Nov yog qee cov tswv yim los txuas ntxiv txoj haujlwm!

Pom zoo: