Cov txheej txheem:
- Kauj ruam 1: Kho vajtse thiab khoom
- Kauj ruam 2: Electronics
- Kauj Ruam 3: Npaj Tus nas
- Kauj Ruam 4: Tus Txheej Txheem Cai
- Kauj ruam 5: Yees duab
Video: 3D AIR Mouse - Arduino + Ua: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:31
3D AIR nas | Arduino + ProcessingKuv yog ib tus tub ntxhais kawm tsim qauv tsim khoom, thiab xyoo tas los yog ib feem ntawm chav kawm hu ua "Technology as RAW materiel" Kuv ua qhov haujlwm no raws li kuv qhov haujlwm kawg. Kuv ua haujlwm feem ntau nrog SolidWorks, CAD software rau tsim thiab teeb tsa. Kev tig lub cev khov kho ntawm lub vijtsam yog ua tiav siv khawm nas nruab nrab. Kuv tab tom nrhiav qee yam uas xav paub ntxiv. Nov yog qhov kuv tau ua tiav ua 3D huab cua nas, qhov twg qhov kev hloov pauv tiag tiag ntawm cov khoom tau ua los ntawm kev txav tus nas nyob nruab nrab ntawm huab cua ntawm txhua 3 axis - tib txoj kev koj yuav tig lub cuab yeej yog tias koj tuav nws hauv koj txhais tes. Kuv tau siv Arduino, ob peb lub ntsuas hluav taws xob thiab Txheej Txheem Kev kos duab. sau ib qho yog tias koj paub yuav ua li cas:):) Txij li txhua yam kho vajtse tsis yog kuv li, 3D tiag nas tau ploj mus ntev, thiab kuv siv qee cov duab thiab vis dis aus los sim thiab nkag siab qee qhov hauv no, thiab muab rau koj qee lub tswv yim yog tias koj xav sim thiab tsim ib qho ntawm koj tus kheej… Txaus siab rau nws… (Nws yog thawj qhov kev qhia) Ntawm no yog daim vis dis aus ntawm qhov haujlwm tiav
Kauj ruam 1: Kho vajtse thiab khoom
Nws tsis yog qhov pheej yig tshaj qhia raws li nws tau ua raws 3 axis accelerometer + compass sensor. Stuff koj yuav xav tau:* Tus nas - siv ib qho yog qhov zoo dua (tsuas yog vim nws tau siv thiab pheej yig dua), txhua tus nas yuav tsum ua. Koj yuav tsum muaj qee qhov chaw nyob hauv tsev kom pom lub ntsuas cua thiab qee cov xov hlau ntxiv, yog li tsis txhob mus rau cov nas me me ntxiv / ntxiv me me.* Compass Module nrog Tilt Compensation - HMC634 - Qhov no yog 3 axis sensor, yuav ntawm SpurkFun rau ~ $ 149* Cov Hloov Logic Level - YUAV TSUM! Txij li Arduino yog 5V thiab 3 axis sensor yog 3.3V, koj xav tau ib qho ntawm cov ntawd los hloov 5V rau 3.3V. Nws muaj lub npe loj, tab sis tsuas yog them tus nqi $ 1.95 ntawm SpurkFun.* Loj Qhov Khoos Phis Tawj Ntes / Phototransistor Loj - Qhov no yog lub ntsuas qhov muag yooj yim, siv hauv qhov haujlwm no txhawm rau txheeb xyuas thaum tus nas raug tshem tawm ntawm qhov chaw ua haujlwm. Yuav ntawm SpurkFun rau $ 2.25 Yog tias koj tsis muaj chaw txaus los ua lub tsev no hauv koj tus nas xaiv, koj tuaj yeem siv qhov no, me dua thiab pheej yig dua. * Ib qho (1) LED - tsis txhob mloog xim, lub teeb ci ci yuav ua haujlwm tau zoo dua.* 2 Cov Tiv Thaiv - Ib (1) x 100Ω thiab Ib (1) x 100KΩ (Rau lub ntsuas qhov muag pom)* Arduino board - DA! Kuv siv tus qauv Diecimila. Duemilanove tshiab yog avalilable ntawm SpurkFun txog $ 29.95 (Yuav tsum ua haujlwm ib yam nkaus) + Arduino software teeb tsa.* Txhim kho cov software tiav.* Txoj haujlwm lub hauv paus chaws (Tsis txhob txhawj, koj yuav tau rub nws hauv ib ntus.) Ntxiv rau: kub kua nplaum (kho cov khoom nyob rau hauv qhov chaw) Ob peb ntsia hlau me me. Ua li 10cm ntawm 6mm (Dia.) ntoo thauj tog rau nkoj. Qee cov xov hlau ntxiv. Cov hlau xaim hluav taws xob qee yam los txiav cov yas nrog, Kuv siv rab riam txiav thiab cov ntawv (RAU shaping). ("Ok, tsis txhob ntxub kuv rau qib no, Lus Askiv yog kuv hom lus thib ob, yog tias kuv tau txais qhov no tsis raug, thov txim, Kuv paub tseeb tias koj yuav nkag siab qhov kuv tab tom hais txog hauv ib pliag." koj yuav pom nws hauv cov duab ")
Kauj ruam 2: Electronics
Txhua yam yuav tsum tau muab sib dhos ua ke… Ib txoj hauv kev… NCO TSEG: Lub 3 axis sensor yog qhov kim me ntsis ob zaug kos lub thaiv ua ntej ua kom muaj zog txhua qhov… Saib cov duab qhia txuas rau txhua qhov thaiv uas siv hauv txoj haujlwm no. tuaj yeem ua haujlwm nkaus xwb yog tias koj siv tus lej tus lej qub uas kuv tau ua, tab sis xav tias hloov pauv cov ntawd thaum txuas mus ntev li ntev tau koj hloov tus lej tsim nyog hauv tus lej. Connecting the 3 axis sensor to the logic level converter: Sensor VCC -> Arduino 3V3Sensor GND -> Arduino GndSensor SDA -> Converter TXI (Chan1) Converter TXO (Chan1) -> Arduino ANALOG IN 4Sensor SCL -> Converter TXI (Chan2) Converter TXO (Chan2) -> Arduino ANALOG IN 5Converter GND (tsawg kawg yog ib qho ntawm lawv) -> Arduino GndConverter HV -> Arduino 5VConverter LV -> Arduino 3V3Optical sensor rau Arduino: Saib cov duab txuas ntxiv hauv = Pin 11 ntawm ArduinoLED: GND rau qee GND (Kuv siv ib qho ntawm lub ntsuas qhov muag pom zoo)+ rau Arduino PIN 13 (Qhov no tau ua tiav txij li tus pin no twb muaj tus tiv thaiv kab mob, yog tias koj siv qhov sib txawv, nco ntsoov siv tus tiv thaiv kom koj thiaj li tsis hlawv lub LED)
Kauj Ruam 3: Npaj Tus nas
Nov yog qhov uas cov neeg ntsuas pom lawv qhov chaw nyob hauv nas lub tsev nyob. Nrhiav qhov chaw zoo tshaj los kho lub 3 axis sensor. Ua kom ntseeg tau tias nws yog qib thiab mloog qhov kev taw qhia (Koj yuav paub thaum twg koj yuav muaj lub sensor nyob rau hauv tes) Koj tuaj yeem kho nws txhua txoj kev uas koj nyiam, Kuv tau siv 2 daim me me ntawm cov ntoo thauj tog rau nkoj, drilled kom lees txais 2 cov ntsia hlau me me, thiab kub glued rau tus nas lub rooj tsavxwm loj. Rau qhov kho qhov muag pom qhov zoo, ua lub qhov plaub fab nyob hauv qab ntawm tus nas, lub tswv yim yog kom muaj lub sensor "saib" lub rooj txhua lub sijhawm. Thaum tus nas tau rub thiab lub xeev sensor yog "qhib" (tsis muaj lub rooj kom pom) nas hloov mus rau hauv 3D hom (sau cov txheej txheem ua haujlwm) Hloov lwm lub qhov rau kev xa xov ntxiv (los ntawm cov ntsuas mus rau Arduino) tawm ntawm yas tsev. Mine tau nyob ntawm sab xis ntawm tus nas. Kho lub LED qhov twg yuav pom. Hauv qhov haujlwm no LED yog 3D-hom qhia. Kuv tso kuv ib sab ntawm lub silicone nas log. Thaum tus nas tau tsa, lub log muaj qhov ci zoo nkauj.
Kauj Ruam 4: Tus Txheej Txheem Cai
Cov cai rau Arduino tau sau los ntawm Shachar Geiger, kuv tus kws qhia ntawv, Thiab tau hloov kho los ntawm kuv rau txoj haujlwm no. Qhov 3D lub voos xwmfab yog tus lej yooj yim pom ntawm Kev Ua Lub Vev Xaib. Kuv hloov kho nws me ntsis Hauv txoj cai, ntu no hloov cov ntaub ntawv nyoos los ntawm lub ntsuas (feem ntau -180 txog 180 x 10) rau 0-255 getHeading (); Serial.write ('x'); x = (x +1800) / 14; Serial.write (x); Serial.write ('y'); y = (y+1800) / 14; Serial.write (y); Serial.write ('z'); z = (z+1800) / 14; Serial.write (z); Cov ntaub ntawv los ntawm lub ntsuas hluav taws xob thiab Arduino mus rau Txheej Txheem Kev kos duab rau txhua txoj kab sib cais, tab sis nrog tsab ntawv ua ntej ua ntej (rau exp. X12 Y200 Z130), cov cai hauv qab no poob tsab ntawv thiab tawm tsuas yog qhov txiaj ntsig xa mus rau COM chaw nres nkoj thaum (port.available () == 0) {} char nyeem = 0; thaum (nyeem! = 'x') {thaum (port.available () == 0) {} nyeem = (char) port.read ();} X = port.read (); thaum (nyeem! = 'Y') {thaum (port.available () == 0) {} nyeem = (char) port.read ();} Y = chaw nres nkoj.read (); thaum (nyeem! = 'z') {thaum (port.available () == 0) {} nyeem ntawv = (char) port.read ();} Z = port.read (); Cov lej no ua rau txhua qhov tsis zoo… yog ((X! = -1) && (Y! = -1) && (Z! = -1)) {rotateZ (-(ntab) Y/25.0); rotateX ((ntab) X/25.0); tig Y ((ntab) Z/25.0); pX = X; pY = Y; pZ = Z;} lwm tus {tig Z (-(ntab) pY/25.0); tig X ((ntab) pX /25.0);rotateY((float)pZ/25.0);} Cov ntaub ntawv ZIP txuas nrog muaj ob qho Arduino thiab ua cov cai
Kauj ruam 5: Yees duab
Qhov ntawd yog nws … Qhov no yog qhov haujlwm tiav hauv kab yeeb yaj kiab. Muaj qhov tsis zoo me me (Koj tuaj yeem pom tias lub voos xwmfab qee zaum "dhia" hauv daim vis dis aus), Qhov no yog vim Z axis, tej zaum yuav tsis tshwm sim rau koj …