Cov txheej txheem:

Sib tham sib Touchless Teeb: 7 Cov Kauj Ruam (nrog Duab)
Sib tham sib Touchless Teeb: 7 Cov Kauj Ruam (nrog Duab)

Video: Sib tham sib Touchless Teeb: 7 Cov Kauj Ruam (nrog Duab)

Video: Sib tham sib Touchless Teeb: 7 Cov Kauj Ruam (nrog Duab)
Video: Leap Motion SDK 2024, Kaum ib hlis
Anonim
Sib tham sib Touchless Teeb
Sib tham sib Touchless Teeb

Nyob zoo sawv daws! Kuv xav qhia qhov project kuv tau ua haujlwm ntawm no. Kuv tau txais kev tshoov siab los sim nrog kev muaj peev xwm kov tau zoo los ntawm qhov haujlwm hauv kuv lub tsev kawm ntawv. Kuv pom tawm txog cov thev naus laus zis no los ntawm kev qhia thiab siv cov khoom kuv tau kawm ntawm no thiab los ntawm lwm qhov chaw hauv is taws nem los tsim kuv tus kheej kov-tsawg tus tswj hwm, uas kuv siv los sib xyaw sib txawv RGB qhov tseem ceeb los tsim cov xim zoo nkauj.

Txog qhov pib, thaum kuv pib qhov haujlwm no kuv paub ib sab tsis muaj ib yam dab tsi txog cov khoom siv hluav taws xob lossis lub peev xwm kov lub ntsej muag.

Qee qhov teeb meem kuv tau khiav mus rau thaum ntxov tau tshwm sim los ntawm kev nkag siab yuam kev tias yuav muaj dab tsi tshwm sim. Yog li cov lus qhia luv luv los ntawm qhov kuv nkag siab nws li cas:

Lub peev xwm ntsuas tau siv ntau yam khoom, feem ntau yog:

Lub tshuab hluav taws xob (hauv txoj haujlwm no peb siv cov ntawv txhuas, tab sis nws kuj tseem tuaj yeem siv cov dej ua kua thiab lwm yam), xov hlau (ofcourse, nws electronics)

thiab tus tiv thaiv, txhua yam hauv qab 10 MOhm yog qhov me me tsis kam rau ntau dua li kov ncaj qha.

txoj kev nws ua haujlwm yog los ntawm kev ntsuas qhov sib txawv ntawm lub sijhawm ntawm taw tes A thiab taw tes B. Txij thaum pib tus pin nws xa lub teeb liab mus rau qhov kawg, lub sijhawm nws siv yog ntsuas nrog lub sijhawm. Los ntawm kev txo tus nqi tiv thaiv (los ntawm kev txav lub capacitor (hauv qhov no koj txhais tes) ze rau lub capacitor ntawm lub sensor (aluminium ntawv ci) lub sijhawm no luv dua, qhov sib txawv hauv lub sijhawm yog dab tsi lub sensor muab rov qab raws li tus nqi.

Vim lub sensor raug cuam tshuam los ntawm qhov chaw muaj peev xwm cov ntaub ntawv tuaj yeem ua tsis zoo vim yog cuam tshuam. Qhov no tuaj yeem daws tau rau qhov loj los ntawm kev ua kom raug insulating lub capacitor thiab tseem siv av (Kuv yuav qhia tom qab li cas).

Yog li tam sim no uas tsis yog txoj hauv kev peb tuaj yeem pib sau cov khoom txhua yam peb xav tau:

Kauj Ruam 1: Peb Xav Tau Dab Tsi?

Electronics:

1. 2 x 22M Ohm + resistors (qhov loj dua qhov muaj peev xwm ua kom deb dua koj lub ntsuas pa, kuv tus kheej siv 22M Ohm, yam tsawg kawg kom tau txais cov ntaub ntawv siv tau kuv tau ntsib yog 10M Ohm)

2. 3x 330 Ohm resistors

3. Wires

4. Cov qhob cij

5. Lub rooj tsav xwm hauv Circuit Court (kuv muaj cov txuas txuas tooj liab txuas)

6. Ntau yam Cathode RGB Leds (Kuv siv 8, tab sis koj tuaj yeem muaj ntau lossis tsawg dua nyob ntawm seb koj xav tau lub teeb ntau npaum li cas)

7. Aluminium ntawv ci

8. Cling qhwv

9. Arduino Ib

10. Kab xev

Rooj plaub:

1. Ntoo Kuv siv 50 x 50 x 1.8 CM MDF (koj tuaj yeem siv txhua yam tiag tiag. Nws nyob ntawm qhov cuam tshuam koj xav tau thiab cov cuab yeej uas koj muaj thaum koj pov tseg)

2. Acrylic plexiglas Kuv siv 50 x 50 x 0.3 CM (lossis lwm yam khoom siv pob tshab/zoo ib yam li ntawv nplej)

3. Saib ntawv (ntawv zoo)

4. Wood-kua nplaum

5.veneer (yeem)

6. Alrylic kua nplaum

Cov Cuab Yeej:

Hlau stripper

Soldering hlau + tin

Stanley riam

laum

Pom (Kuv siv lub rooj pom)

Kauj ruam 2: Prototyping:

Prototyping
Prototyping
Prototyping
Prototyping

Tam sim no peb muaj txhua yam thiab peb tuaj yeem pib ua tus qauv los saib seb nws ua haujlwm li cas:

Npaj ua haujlwm:

Txiav tawm 4 daim duab plaub los ntawm cov ntawv ci txhuas (Kuv li 10 cm los ntawm 5 cm), qhwv cov no hauv qhwv qhwv kom tiv thaiv lawv los ntawm kev kov ncaj qha thiab lo ib lub xaim rau cov ntawv ci txhuas. Kuv tsuas yog kaw qhov stripped kawg rau cov ntawv ci (tsuav yog lawv nyob hauv kev sib cuag).

Txhawm rau kom ntseeg tau tias txhuas tau zoo insulated Kuv qhwv hauv qhwv qhwv thiab ironed nws ntawm cov ntawv (tsuas yog ob peb feeb thiaj li nws tsis yaj tag).

Tom qab ntawd teeb tsa lub Circuit Court raws li pom hauv daim duab.

Tus pin 4 tau siv los ua tus pin xa rau ob qho tib si, thaum lub koob tau txais yog tus pin 2 thiab 5. Koj tuaj yeem siv ntau tus lej xa tab sis nws ua rau muaj teeb meem vim tias lawv ua tsis tau zoo.

siv qhov teeb tsa no los daws qhov laj thawj ua ntej yuav siv txhua yam ua ke, kom ntseeg tau tias txhua yam yeej ua tau zoo raws li lub hom phiaj xav tau.

Kauj ruam 3: Code:

Tam sim no peb muaj txhua yam thiab peb tuaj yeem pib debug qhov ntsuas.

Txhawm rau siv kuv tus lej koj yuav tsum rub tawm lub tsev qiv ntawv hnov lub peev xwm los ntawm Arduino thiab nruab nws raws li cov lus qhia muab los ntawm nplooj ntawv siv: Nyem rau kuv

Cov cai: (Kuv tsis zoo ntawm coding, yog li yog tias koj paub yuav ua li cas thiaj zoo dua thov ua)

#suav nrog // ntshuam lub tsev qiv ntawv code

CapacitiveSensor cs_4_2 = CapacitiveSensor (4, 2); // Xa tus pin = 4, tau txais yog 2 thiab 5 CapacitiveSensor cs_4_5 = CapacitiveSensor (4, 5); const int redPin = 11; const int greenPin = 10; const int bluePin = 9; const int numIndexR = 10; // array loj const int numIndexG = 10; int colorR = 0; int colorG = 0; ntab colorB = 0; int indexR [numIndexR]; int posIndexR = 0; ntev totalR = 0; // nws yuav tsum tau ntev vim tias tag nrho kuv cov kab ke tau loj rau ib qho zauv. int nruab nrab R = 0; int indexG [numIndexG]; int posIndexG = 0; ntev totalG = 0; int nruab nrab G = 0; teeb tsa tsis muaj dab tsi () {pinMode (redPin, OUTPUT); tus pinMode (greenPin, OUTPUT); tus pinMode (bluePin, OUTPUT); rau (int thisIndexR = 0; thisIndexR <numIndexR; thisIndexR ++) {// teeb tsa cov array rau 0 indexR [thisIndexR] = 0; } rau (int thisIndexG = 0; thisIndexG = 4500) {// cap lub ntsuas qhov tseem ceeb rau qhov siv tau ntau tshaj, qhov no tsis zoo ib yam rau txhua tus tiv thaiv tus nqi thiab tseem yuav txawv me ntsis ntawm ib puag ncig mus rau ib puag ncig koj yuav xav tau tweak qhov no rau koj tus kheej xav tau. tag nrho 1 = 4500; } yog (total2> = 4500) {total2 = 4500; } totalR = totalR - indexR [posIndexR]; // qhov no ntawm no tsim ib qho array uas txuas ntxiv ntxiv cov khoom tso tawm thiab tsim qhov nruab nrab. indexR [posIndexR] = tag nrho 1; totalR = totalR + indexR [posIndexR]; posIndexR = posIndexR + 1; yog (posIndexR> = numIndexR) {posIndexR = 0; } nruab nrab R = totalR / numIndexR; // peb siv qhov nruab nrab es tsis txhob siv cov ntaub ntawv nyoos los ua kom du tawm, nws ua rau cov txheej txheem qeeb me ntsis tab sis nws kuj tseem tsim tau cov dej ntws zoo tiag tiag. totalG = totalG - indexG [posIndexG]; indexG [posIndexG] = total2; totalG = totalG + indexG [posIndexG]; posIndexG = posIndexG + 1; yog (posIndexG> = numIndexG) {posIndexG = 0; } nruab nrab G = totalG / numIndexG; yog (nruab nrab R> = 2000) {// peb tsis xav kom lub leds hloov pauv tus nqi tshwj tsis yog tias muaj kev nkag los ntawm koj txhais tes, yog li qhov no ua kom ntseeg tau tias txhua qhov kev nyeem ib puag ncig qis dua tsis suav nrog. colorR = daim ntawv qhia (nruab nrab R, 1000, 4500, 255, 0); analogWrite (redPin, colorR); } lwm yog (nruab nrab R = 1000) {colorG = daim ntawv qhia (nruab nrab G, 1000, 4500, 255, 0); analogWrite (greenPin, colorG); } lwm yog (nruab nrab G <= 1000) {colorG = 255; analogWrite (greenPin, colorG); } yog (colorR <= 125 && colorG <= 125) {// B ua haujlwm sib txawv me ntsis vim tias kuv tsuas yog siv 2 lub cim thiaj li kuv tau teeb tsa B ntawm ob lub cim xim colorB = daim ntawv qhia (xim R, 255, 125, 0, 127.5) + daim ntawv qhia (colorG, 255, 125, 0, 127.5); analogWrite (bluePin, colorB); } lwm {colorB = daim ntawv qhia (colorR, 255, 125, 127.5, 0) + daim ntawv qhia (colorG, 255, 125, 127.5, 0); yog (colorB> = 255) {colorB = 255; } yog (colorB <= 0) {colorB = 0; } analogWrite (bluePin, colorB); } Serial.print (millis () - pib); // qhov no yog rau lub hom phiaj debugging Serial.print ("\ t"); Serial.print (colorR); Serial.print ("\ t"); Serial.print (colorG); Serial.print ("\ t"); Serial.println (colorB); ncua (1); }

Qhov cai no ua yog rho cov ntaub ntawv nyoos los ntawm lub ntsuas cua (cov ntaub ntawv no ib txwm ua tsis raug vim yog txhua yam sib txawv uas cuam tshuam rau lub sensor) thiab nws tso cov ntaub ntawv nyoos tsis tu ncua hauv ib qho array, thaum cov array mus txog yog tus nqi siab tshaj (hauv kuv rooj plaub 10) nws tshem tawm tus nqi kawg thiab ntxiv qhov tshiab. Txhua lub sijhawm tus nqi raug ntxiv nws xam tus nqi nruab nrab thiab muab tso rau hauv qhov hloov pauv tshiab. Qhov sib txawv nruab nrab no tau siv los ua daim duab qhia tus nqi ntawm tus nqi 0 txog 255, qhov no yog tus nqi uas peb sau rau RGB pins kom nce qhov ci ntawm txhua cov channel (cov channel yog R G thiab B).

Tam sim no yog tias koj tso koj cov cai mus rau arduino thiab koj qhib lub ntsuas saib koj yuav tsum pom RGB tus nqi qis dua thaum koj tuav koj txhais tes hla txhua lub sensor kuj lub teeb xim ntawm coj yuav tsum hloov.

Kauj ruam 4: Tam sim no rau rooj plaub:

Tam sim no rau Case
Tam sim no rau Case
Tam sim no rau Case
Tam sim no rau Case
Tam sim no rau Case
Tam sim no rau Case

Cov ntaub ntawv: Kuv tau ua rooj plaub siv cov cuab yeej muaj los ntawm kuv lub tsev kawm ntawv, yog li txoj haujlwm no tsis siv rau txhua tus. Txawm li cas los xij tsis muaj ib yam tshwj xeeb txog nws, nws xav tau lub qhov ntawm ib sab rau USB chaw nres nkoj kom haum los ntawm tab sis lwm yam tshaj li nws tsuas yog qhib lub thawv topped.

Qhov ntev yog raws li hauv qab no:

15 x 15 CM rau pob tshab saum

thiab

15 x 8 CM rau ntoo puag (tuab ntoo yog 1.8 CM rau kuv).

Kuv siv lub rooj pom los txiav cov phaj ntawm MDF rau hauv qhov loj me uas kuv xav tau (uas yog 4 panels 15 x 8 CM thiab 1 15 x 15 CM vaj huam sib luag hauv av), tom qab uas kuv txiav cov ces kaum rau hauv 45 degree kaum. Txhua ntu kuv tau ua ke siv cov kua nplaum ntoo thiab clamps (cia nws qhuav tsawg kawg 30 feeb), Kuv siv tib txoj hauv kev rau Plexiglas tab sis nrog lub ntsej muag pom tshwj xeeb.

1 ntawm ob sab ntoo yuav tsum muaj lub qhov nyob hauv nruab nrab ntawm qhov siab ntawm arduino USB ntsaws kom tso cov arduino ntsaws rau hauv.

Kuv ua tiav lub hauv paus nrog veneer. Kuv txiav nws ua tej daim me me loj dua qhov saum npoo ntawm txhua sab.

Qhov no kuv tau glued rau nws, tom qab ntawd kaw nws 30 feeb rau txhua sab (zoo dua los ua nws tus kheej kom koj paub tseeb tias nws tsis swb thiab tom qab nws qhuav Kuv txiav tawm dab tsi daig tawm.

Lub hau kuv glued ua ke siv cov kua nplaum tshwj xeeb rau Acryl hu ua Acryfix.

Nco ntsoov tias yog tias koj siv acrylic Plexiglas, cov kua nplaum yaj Plexiglas me ntsis, yog li ua kom nrawm thiab nrawm li sai tau (nws qhuav li ob peb feeb, tab sis raug cua nyob hauv vib nas this).

Txhawm rau ua kom tiav lub hau Kuv khov lub voos xwmfab nrog cov xuab zeb tab sis koj tseem tuaj yeem siv cov ntawv xuab zeb zoo nws tsuas yog siv sijhawm ntau dua los ua kom nws zoo ib yam. Them siab txawm hais tias yog koj siv cov ntawv xuab zeb nws yuav tsum tau ua kom zoo zoo thiab tseem muab cov kua nplaum ua ke tom qab txheej txheem ua kom khov (Yog li koj tsis ua txhaum nws los ntawm kev thov kom siab ntau)

Kom paub tseeb tias lub hau tsis swb ntau npaum li cas kuv tau txuas ob peb tus ntoo ntoo me ntawm ntug ntawm lub voos xwmfab ntoo.

Kauj Ruam 5: Qhov Kawg Qhov Yuav Tsum Saib Zoo Li No:

Qhov Tseeb Qhov Yuav Tsum Tau Pom Ib Yam Zoo Li No
Qhov Tseeb Qhov Yuav Tsum Tau Pom Ib Yam Zoo Li No

Kauj ruam 6: Soldering

Soldering!
Soldering!
Soldering!
Soldering!

Yog tias koj muaj lub rooj tsav xwm hauv vaj huam sib luag koj tuaj yeem pib siv tag nrho txhua ntu ua ke siv tib lub teeb uas koj lub khob cij muaj.

Kuv lub rooj tsav xwm hauv Circuit Court muaj cov kab tooj liab txuas mus ntxiv kom yooj yim siv.

Rau txhua lub ntsuas hluav taws xob kuv txiav tawm ib lub xwmfab me me los txhawm rau txhawm rau cov resistors thiab cov xov hlau rau.

Cov xa xov hlau (cov xov hlau uas mus ntawm tus pin 4 mus rau txhua lub ntsuas) tau muab sib dhos ua ntu zus rau ib qho xwm txheej cais, nrog 1 xaim uas nkag mus rau tus pin 4.

Kuv khaws ib daim duab plaub ntev los ua ib daim kab xev coj los ntsuas (ntsuas nws kom nws haum rau sab hauv ntawm lub hau tab sis ntawm ntug ntawm lub hauv paus). Koj tuaj yeem tsuas yog siv cov leds nyob rau hauv ib ntu tom qab ib leeg (nco ntsoov hauv daim duab kuv tau yuam kev siv cov leds thiab cov neeg tawm tsam ntawm sab tsis raug ntawm lub rooj tsav xwm hauv Circuit Court, cov tooj liab yuav tsum ib txwm nyob hauv qab).

Thaum koj tau ua tiav cov khoom seem ntawm tus kheej ua ke, haum lawv rau hauv rooj plaub. Kuv tsis tau muab kuv cov xov hlau txuas ua ke yog li kuv tuaj yeem hloov lawv tawm yooj yim yog xav tau.

Lub sijhawm kom haum txhua yam rau hauv paus: Qhov no zoo nkauj npaum li cov kauj ruam yooj yim tshaj plaws, arduino xav tau ua qhov chaw ua ntej nrog USB chaw nres nkoj hla lub qhov nyob tom qab ntawm rooj plaub. Tam sim no ntxiv cov ntsuas ntsuas, xyuas kom tseeb tias cov ntawv ci ntsuas haum rau ntoo ntawm ob sab, nrog cov ntawv ci hauv av ncaj rau nws. Thaum txhua yam haum zoo, ntsaws RGB coj mus rau hauv txoj cai koob (9, 10, 11) thiab cia nws ntsaws rau ntawm ntug ntawm lub hauv paus.

Kauj Ruam 7: Peb Ua Tiav lawm

Yog tias koj tau ua raws nrog txhua qhov tawm ntawm no, koj yuav tsum tam sim no muaj lub teeb ua haujlwm nrog lub peev xwm kov xim sib xyaw. Muaj kev lom zem!

Pom zoo: