Cov txheej txheem:

Kev Cai Arduino (Cheaper MakeyMakey): 5 Kauj Ruam (nrog Duab)
Kev Cai Arduino (Cheaper MakeyMakey): 5 Kauj Ruam (nrog Duab)

Video: Kev Cai Arduino (Cheaper MakeyMakey): 5 Kauj Ruam (nrog Duab)

Video: Kev Cai Arduino (Cheaper MakeyMakey): 5 Kauj Ruam (nrog Duab)
Video: 19 year old buys a private jet! 2024, Kaum ib hlis
Anonim
Kev cai Arduino (Cheaper MakeyMakey)
Kev cai Arduino (Cheaper MakeyMakey)
Kev cai Arduino (Cheaper MakeyMakey)
Kev cai Arduino (Cheaper MakeyMakey)

Nyob zoo - Kuv muaj 14 xyoos (tsawg kawg kuv yog thaum kuv sau Cov Lus Qhia no) thiab kuv tau tsim txoj haujlwm no rau xibfwb qhia ntawv hauv tsev kawm qib siab hauv zej zog, ntxiv rau kuv pog, uas ua haujlwm nrog menyuam yaus muaj qhov tsis taus.

Yog tias koj nyiam Cov Lus Qhia no lossis txhawb nqa qhov ua rau kuv ua qhov no rau (cov menyuam xiam oob qhab), mus tom ntej thiab tawm lus tawm!

Makey Makey yog Arduino raws pawg thawj coj tsim thiab tsim los ntawm ob tus neeg kawm tiav MIT, Jay Silver thiab Eric Rosenbaum, koom tes nrog SparkFun Electronics. Nws ua raws li cov keyboard thiab nas, qhov tseem ceeb ntxiv cov keyboard thiab nas rau koj lub PC. Qhov kev hloov pauv tshiab tiag uas Nyiaj thiab Rosenbaum tau qhia yog lub peev xwm rau "kov hnov". Siv cov khoom muaj txiaj ntsig zoo rub-up resistors, lawv muaj peev xwm siv cov khoom niaj hnub ua cov nyees khawm.

Ntau lub peev xwm thiab cov tswv yim rau MakeyMakey nyob ntawd, tab sis ib qho kuv nyiam tshaj yog siv rau cov menyuam xiam oob qhab. Cov uas tsis tuaj yeem siv lawv cov ntiv tes zoo txaus los siv tus qauv QWERTY keyboard tuaj yeem siv MakeyMakey ua tus keyboard emulator. Muaj peev xwm siv cov khoom niaj hnub ua cov yuam sij rau cov keyboard, cov menyuam xiam oob khab muaj peev xwm siv cov khoom xws li txiv hmab txiv ntoo (txiv tsawb, txiv apples, lossis txiv kab ntxwv), ua khob noom cookie, lossis ib yam dab tsi me ntsis ua tus yuam sij.

Txoj haujlwm no pib ntau ntxiv raws li kev kawm paub. Kuv tus phauj nyuam qhuav kawm tiav chav kawm tshwj xeeb uas siv MakeyMakeys. Nws thiab lwm tus 15 tus tub ntxhais kawm tau ib leeg yuav lawv tus kheej MakeyMakeys rau $ 50. Kuv tau hais tias kuv tuaj yeem ua ib qho rau tsawg dua $ 40, thiab seem yog keeb kwm.

Cov ntawv ceeb toom sai: txoj haujlwm no yog tsim los ntawm thawj qhov tsim tau zoo muab los ntawm Open Source Hardware licence los ntawm Jay Silver thiab Eric Rosenbaum. Kuv muab credit tag nrho rau lawv thiab ua tsaug tag nrho rau lawv txoj kev siab dawb.

Kauj ruam 1: Tshawb nrhiav

Kev tshawb fawb!
Kev tshawb fawb!
Kev tshawb fawb!
Kev tshawb fawb!

Thawj kauj ruam yog txhawm rau txheeb xyuas yuav ua li cas ib txwm MakeyMakey ua haujlwm, tom qab ntawd txhawm rau nrhiav cov khoom thiab cov khoom lag luam los tsim ib tus kheej. Muaj hmoo rau koj, Kuv tau ua ntau npaum li kuv tuaj yeem ua rau koj, thiab muab tso rau qhov koj xav paub.

Ua ntej, MakeyMakey siv cov kev siv rub tawm cov neeg tawm tsam. Hauv ntej, tus rub tawm tus tiv thaiv yog ib feem uas lav lub khoos phis tawj yuav sau npe "tsis-kov" kom txog thaum tus pin tau kov tiag. Yog tsis muaj tus rub rub tawm, lub khoos phis tawj tsis paub tias tus pin raug kov lossis tsis kov.

Raws li kev piav qhia, cov neeg tawm tsam yog cov khoom siv hauv lub cev uas koj tuaj yeem pom thiab hnov. Tus rub tawm tus neeg tawm tsam yog tus tiv thaiv ib txwm, tsuas yog txuas mus ua haujlwm qee yam (txoj haujlwm ntawd yog "rub" tus pin).

Tam sim no, cov neeg tawm tsam tuaj ntau qhov txiaj ntsig, ntsuas hauv ohms. Txhua yam muaj kev tawm tsam, tab sis cov neeg tawm tsam tau ua nrog tus nqi tshwj xeeb. Ib qho kev rub tawm tus neeg tawm tsam feem ntau yog txog 10, 000 Ω (ohms). Cov uas nyob ntawm MakeyMakey yog 22, 000, 000 (22 lab) ohms, tso cai rau ib yam khoom uas muaj tsawg dua 22M Ω los ua haujlwm hloov pauv.

Los ntawm cov ntiv tes mus rau ntsis ntiv tes, koj muaj kev tiv thaiv ntawm txhua qhov chaw los ntawm 1, 000 Ω txog 100, 000 Ω, nyob ntawm qhov ntub koj cov tawv nqaij. Qhov ntawd ua rau koj muaj txog 21.9M Ω (22M - 100K = 21.9M) rau txhua yam khoom uas koj xav siv. Hlau, ntsev, txawm tias cov hlau lead los ntawm tus xaum yuav ua haujlwm, tsuav yog qhov kev tiv thaiv tsawg dua 22M Ω.

Yog tias koj xav tau cov lus piav qhia yooj yim ntawm yuav ua li cas MakeyMakey ua haujlwm, MakeyMakey muaj cov lus teb zoo.

Kauj Ruam 2: Npaj/Yuav

Npaj/Yuav
Npaj/Yuav
Npaj/Yuav
Npaj/Yuav

Rau theem no, peb yuav siv Eagle CAD software, tam sim no yog los ntawm Autodesk. Yog tias koj tsis muaj software no, koj tuaj yeem rub tawm qhov kev sim ib xyoos dawb. Thaum kuv hais txog kev hloov kho lossis siv cov cuab yeej tshwj xeeb, Kuv siv Eagle software. Kuv yuav qhia kuv qhov kev tsim zaum kawg, txawm li cas los xij.

Tam sim no koj tau nkag siab yooj yim ntawm yuav ua li cas MakeyMakey ua haujlwm, koj tuaj yeem pib xaj khoom. Kuv rub tawm SparkFun tus qauv rau MakeyMakey, thiab hloov kho nws kom ua kom yooj yim dua. Thawj qhov tsim siv SMD (Cov Khoom Siv Nto Mount) hauv qhov loj me 0402. Cov ntawv me me, li 0.4 hli x 0.2 hli. Kuv sim nws, tab sis poob yuav luag ib nrab ntawm txhua daim.

Txhawm rau ua kom yooj yim dua ntawm koj tus kheej, hloov qhov ntau thiab tsawg ntawm cov khoom siv rau qhov loj 0603 lossis loj dua. Txhawm rau hloov cov khoom no, tsuas yog siv "Hloov" cov cuab yeej. Raws li qhov no tsis yog Eagle qhia, Kuv yuav xav tias koj paub yuav ua haujlwm nrog Eagle.

Txhawm rau xaj PCB (Luam Ntawv Circuit Board), lossis pawg thawj coj uas txhua yam tau muab tso rau, Kuv tau mus rau OSHPark. Lawv ua tau zoo PCB sai heev, thiab pheej yig heev. Lawv muaj qhov xaj xaj tsawg kawg ntawm peb, tab sis koj tsis tuaj yeem tuav tus nqi. Nov yog qhov txuas rau kuv tsim.

Rau ntu, koj yuav tsum tau mus rau DigiKey lossis lwm tus muab khoom siv hluav taws xob. Kuv tsis tuaj yeem faib kuv lub laub, hmoov tsis zoo, tab sis nws yuav tsum tsis siv sijhawm ntev dua 20 feeb los ua kom tiav thiab xaj lub laub. Kuv muaj, txawm li cas los xij, suav nrog daim ntawv Excel nrog txuas. Tsuas yog qee qhov ntawv, tab sis, ua ntej koj xaj:

  • Nco ntsoov thaum koj ntxiv ATMEGA32u4 rau koj lub laub, tias nws yog 44TQFP pob
  • DigiKey kev xa khoom yog kim. Nws yog qhov zoo dua kom tau ntau dua qhov koj xav tau, yog li yog tias ib tus neeg tau ploj lossis puas, koj muaj cov khoom ntxiv.
  • DigiKey muaj nyiaj cheb ntau. Piv txwv li, ib tus tiv thaiv yog $ 0.10, tab sis 10 ntawm lawv yog $ 0.11. Siv qhov luv nqi!
  • Fuses yog kim dua me ntsis, tab sis yuav tsawg kawg yog ib qho ntxiv. Koj tuaj yeem ua tsaug rau kuv tom qab.
  • Kuv nrhiav tsis tau ib qho LEDs ntawm DigiKey, yog li kuv tsuas yog tsis siv lawv. Yog tias koj ua, txawm li cas los xij, koj yuav xav tau 330 Ω resistors mus nrog lawv.

Tsis tas li ntawd, nws yog ncaj nraim rau pem hauv ntej. Nov yog daim ntawv Excel uas kuv siv rau xaj:

Kauj ruam 3: Tsim Nws

Tsim Nws!
Tsim Nws!
Tsim Nws!
Tsim Nws!
Tsim Nws!
Tsim Nws!

Tam sim no los txog qhov lom zem: muab nws tso ua ke. Qhov no tsis yog cov lus qhia saum toj soldering, tab sis ntawm no yog cov lus qhia zoo. Raws li rau kev sib xyaw cov khoom sib txawv me me, lawv yuav tsum ua haujlwm zoo ib yam thaum kawg. Cov kauj ruam no yog qhov nyuaj tshaj plaws thiab siv sijhawm ntau, tab sis nws yuav tsum tsis txhob tua koj (Kuv pom zoo kom hla koj cov ntiv tes, txawm li cas los xij, tsuas yog kom nyab xeeb). Nov yog tsuas yog ob peb lub tswv yim kuv vam thaum ua haujlwm ntawm no:

  • Raws li rau ATMEGA32u4 microcontroller, txoj hauv kev zoo tshaj plaws uas kuv pom yog tin ib lub ncoo ntawm ib ces kaum ntawm lub rooj tsavxwm, tom qab ntawd tso lub nti rau saum, qhia kom raug. Tom qab ntawd, tom qab xauv nws hauv qhov chaw los ntawm yaj lub kaum sab xis, nqa tag nrho cov pins nrog cov laug. Yuav tsum muaj cov choj loj loj txuas. Tom qab ntawd, siv koj lub lauj kaub tais diav, rov ua dua lub lauj kaub kom tshem nws. Qhov no tawm qhov txiaj ntsig zoo, yam tsis muaj luv.
  • Ua ntej koj sim ntsaws lub USB cable rau hauv, kos cov pins hauv qab USB Mini-B txuas. Kuv thawj zaug tau muaj tus choj me me nyob hauv qab qhov txuas, ua rau puas ntsoog.
  • Raws li kev txiav txim ntawm ntu, pib nrog AMTEGA32u4 microcontroller, tom qab ntawd mus rau lub tshuab hluav taws xob, tiv thaiv, lub moos, thiab thaum kawg tus poj niam lub taub hau nrog USB txuas.

Kauj ruam 4: Code

Code
Code

Tam sim no los txog qhov kawg, txaus siab tshaj plaws (tsuas yog thaum nws ua haujlwm yog nws txaus siab). Txhawm rau ua tus cai Arduino, koj yuav tsum xub hlawv lub bootloader. Lub bootloader yog ib qho me me ntawm cov cai uas tau teeb tsa rau hauv txhua Arduino ntawm lub Hoobkas los qhia rau Arduino yuav ua dab tsi thaum nws pib ua ntej thiab yuav ua li cas nrog cov cai uas koj program nws nrog. Txij li qhov ua tiav ntawm Arduino lub Hoobkas, peb yuav tsum ua nws ib yam. Txhawm rau ua qhov no, peb tuaj yeem siv lwm qhov, ua ntej Arduino, los ua haujlwm rau nws. Qhov no xav tau Arduino nrog ATMEGA328 nti (xws li Uno lossis Nano). Txhawm rau ua qhov no, peb yuav ua raws SparkFun cov lus qhia. Nqa cov pins raws li qhia:

Arduino || Ib MakeyMakey

5V/Vcc - Vcc

GND - NCO

D11 - D16

D12 - D14

D13 - D15

D10 - RESET

Tom qab ntawd, nkag mus rau Arduino IDE, xaiv pawg Arduino uas koj tab tom siv los teeb tsa koj li MakeyMakey. Hauv cov piv txwv, qhib 'Arduino as ISP' kos duab. Tshaj tawm nws rau koj Arduino, ib yam li koj ib txwm xav tau. Tom qab ntawd, hauv Cov Cuab Yeej, xaiv hauv qab Board 'Arduino/Genuino Micro'. Tom qab ntawv hauv Cov Cuab Yeej> Tus Kheej, xaiv 'Arduino ua ISP' (tsis txhob xav tsis meej nrog 'ArduinoISP'). Tom qab ntawd, ib zaug ntxiv hauv Cov Cuab Yeej, xaiv 'Hlawv Bootloader'. Tom qab ob peb feeb, IDE yuav tsum hais "Ua kom hlawv bootloader". Koj MakeyMakey yog tam sim no npaj los ua lwm yam Arduino.

Cov kauj ruam tom ntej yog mus rau MakeyMakey's GitHub thiab mus rau ntu 'firmware'. Tsuas yog luam thiab paste 'makey_makey.ino' thiab 'settings.h' rau hauv Notepad, thiab txuag lawv raws li lawv qhov kev txuas ntxiv. Tam sim no, qhib koj li tshiab khaws tseg 'makey_makey.ino', qhib nws nrog Arduino IDE, thiab xa nws mus rau koj lub Rooj Tswjhwm Saib MakeyMakey. Tam sim no koj yuav tsum ua tiav MakeyMakey! Nrog koj zoo siab!

Kauj ruam 5: Ua si

Ua si!
Ua si!
Ua si!
Ua si!
Ua si!
Ua si!

Nrog koj tus MakeyMakey tshiab, koj tuaj yeem ua dab tsi? Muaj ntau txoj hauv kev xaiv, nrog qee cov apps lom zem lossis cov vev xaib siv teev hauv MakeyMakey lub vev xaib. Yog tias koj muaj lub tswv yim los qhia, thov ua! Kuv, thiab ntau lwm tus, xav hnov koj lub tswv yim! Kuv tau suav qee cov duab ntawm qhov kuv tau pom lossis los nrog kuv tus kheej.

Raws li cov lus ceeb toom: Yog tias koj muaj lus tawm tswv yim txog Phau Ntawv Qhia no, zoo lossis tsis zoo, thov tawm hauv cov lus. Kuv twb tau sim los ua tus kws sau ntawv zoo dua, yog li ntawd kev thuam raug qhuas. Ua tsaug!

Pom zoo: