Cov txheej txheem:

Vibrotactile Sensory Hloov Chaw thiab Ntaus Ntaus (SSAD): 4 Cov Kauj Ruam
Vibrotactile Sensory Hloov Chaw thiab Ntaus Ntaus (SSAD): 4 Cov Kauj Ruam

Video: Vibrotactile Sensory Hloov Chaw thiab Ntaus Ntaus (SSAD): 4 Cov Kauj Ruam

Video: Vibrotactile Sensory Hloov Chaw thiab Ntaus Ntaus (SSAD): 4 Cov Kauj Ruam
Video: ? Что такое многополосный 6 атомный хронометраж ? То 2024, Kaum ib hlis
Anonim
Vibrotactile Sensory Hloov Chaw thiab Ntaus Ntaus (SSAD)
Vibrotactile Sensory Hloov Chaw thiab Ntaus Ntaus (SSAD)
Vibrotactile Sensory Hloov Chaw thiab Ntaus Ntaus (SSAD)
Vibrotactile Sensory Hloov Chaw thiab Ntaus Ntaus (SSAD)

Txoj haujlwm no muaj lub hom phiaj los pab txhawb kev tshawb fawb hauv cheeb tsam ntawm Kev Hloov Hloov thiab Kev Hloov Kho. Kuv muaj peev xwm tshawb nrhiav txoj hauv kev sib txawv ntawm kev tsim vibrotactile SSAD tus qauv hauv kuv li MSc cov lus piav qhia. Raws li Kev Hloov Pauv Hloov Pauv thiab Kev nce qib yog lub ncauj lus uas txhawj xeeb tsis yog kws tshawb fawb computer nkaus xwb, tab sis kuj yog cov kws tshawb fawb los ntawm lwm qhov chaw, xws li kev paub txog kev nkag siab, kev qhia ib qib ib qib yuav tsum ua rau cov kws tshaj lij tsis siv hluav taws xob thiab computer science los sib sau ua qauv no rau lawv tus kheej lub hom phiaj tshawb fawb.

Kuv tsis npaj siab yuav tshaj tawm rau ib hom khoom lag luam/khoom. Txoj haujlwm no tsis tau txhawb nqa los ntawm ib lub tuam txhab. Cov khoom siv, kuv tau siv, tau raug xaiv vim kev qhia tshwj xeeb thiab yooj yim (nrawm/tus nqi xa khoom, muaj, thiab lwm yam). Rau tag nrho cov khoom lag luam uas tau hais hauv Phau Ntawv Qhia no, muaj cov kev xaiv sib npaug uas tsim nyog.

Cov Lus Qhia tam sim no muaj cov lus qhia ib qib zuj zus ntawm yuav ua li cas tsim ib qho qauv SSAD yooj yim nrog txog 4 lub cav thiab cov ntsuas sib piv.

Ntxiv rau qhov Kev Qhia Kuv tau tsim peb qhov txuas ntxiv: Ua ntej, Kuv tau tshaj tawm cov lus qhia txog yuav siv ntau dua plaub lub cav nrog SSAD tus qauv no (https://www.instructables.com/id/Using-More-Than-4…). Qhov thib ob, Kuv tau tsim muab thiab piv txwv ntawm yuav ua li cas thiaj tsim tau cov qauv no (https://www.instructables.com/id/Making-the-SSAD-W… /www.instructables.com/id/Covering-Rotating…). Ntxiv mus, ib qho piv txwv ntawm yuav ua li cas sib koom ua ke tsis yog cov khoom siv sib piv (hauv qhov no ib qho kev sib thooj sib xws) rau tsab ntawv luam tawm ib yam nkaus (https://www.instructables.com/id/Including-a-Proxi…).

Dab tsi yog "Kev Hloov Kho Lub Siab thiab Kev Loj Hlob"?

Nrog Kev Hloov Pauv Hloov pauv cov ntaub ntawv sau los ntawm ib qho kev nkag siab zoo (piv txwv li pom) tuaj yeem pom los ntawm lwm qhov kev nkag siab (piv txwv li lub suab). Nws yog cov lus cog tseg uas tsis siv tus txheej txheem uas pab tib neeg kov yeej kev hnov qab tsis zoo lossis tsis zoo.

Yog tias qhov kev xav ntawm lub siab, uas tau txhais, feem ntau tsis tuaj yeem pom los ntawm tib neeg (piv txwv li lub teeb UV), txoj hauv kev no hu ua Sensory Augmentation.

Yam txuj ci twg xav tau los tsim cov qauv no?

Yeej, tsis muaj txuj ci txuj ci siab xav tau los ua raws cov lus qhia, muab hauv qab no. Txawm li cas los xij, yog tias koj yog tus pib siv cov tooj dag, npaj qee lub sijhawm ntxiv kom paub cov txheej txheem no. Yog tias koj tsis tau npaj ua ntej, qee qhov kev pab los ntawm lwm tus neeg muaj kev paub ntau dua hauv kev tsim qauv yuav xav tau.

Puas muaj cov tshuab lossis cov cuab yeej tsim nyog uas kim lossis tsis yooj yim?

Tsuas yog cov hlau txuas, tsis muaj cov tshuab lossis cov cuab yeej tsim nyog los tsim cov qauv no uas koj tsis tuaj yeem yooj yim yuav online lossis hauv khw hauv tsev tom ntej. Qhov SSAD no tau tsim los tso cai ua qauv sai, uas txhais tau tias nws yuav tsum tau rov tsim dua sai sai thiab tso cai rau kev tshawb nrhiav pheej yig ntawm cov tswv yim.

Khoom siv

Cov khoom tseem ceeb (li 65 £ rau 4 lub cav, tsis suav nrog cov cuab yeej siv khoom siv)

  • Arduino Uno (piv txwv li https://store.arduino.cc/arduino-uno-rev3, 20 £)
  • Adafruit Motorshield v2.3 (piv txwv li https://www.adafruit.com/product/1438, 20 £) thiab txiv neej stacking headers (ib txwm suav nrog thaum yuav lub motorshield)
  • Cylindrical ERM motors (piv txwv li https://www.adafruit.com/product/1438, 5, 50 £/motor)
  • Soldering hlau thiab soldering hlau
  • Hlau

Yeem (saib Extensions)

Yog tias ERM lub cev muaj zog nrog pom qhov hloov pauv loj tau yuav:

  • Vinyl raj
  • Nyias pawg thawj coj saib
  • 3D tshuab luam ntawv (rau Arduino casing)

Yog tias koj xav siv ntau dua 4 lub cav (rau ntau dua 8 tib lub sijhawm):

  • Adafruit Motorshield v2.3 thiab txiv neej stacking headers
  • Poj niam stacking headers (piv txwv li
  • Arduino Mega rau ntau dua 6 lub cav (piv txwv li

Kauj ruam 1: Soldering

Soldering
Soldering

Muab cov pins tso rau ntawm daim iav

Adafruit muab cov lus qhia qhia ntxaws ntxaws txog yuav ua li cas muab lub taub hau txuas rau lub motorshield (https://learn.adafruit.com/adafruit-motor-shield-v…):

  1. Ua ntej tshaj, muab cov kab lus sib dhos tso rau hauv tus pin ntawm Arduino Uno,
  2. Tom qab ntawd, tso daim thaiv rau saum, kom sab luv ntawm cov pins tawm.
  3. Tom qab ntawd, txhuam tag nrho cov pins mus rau daim ntaub thaiv thiab ua kom ntseeg tau tias cov kuab paug ntws nyob ib puag ncig tus pin thiab tsim cov duab hluav taws xob (saib daim duab saum toj no, uas tau saws los ntawm https://cdn.sparkfun.com/assets/c/d/ a/a/9/523b1189…).

Yog tias koj yog tus pib siv cov tooj dag, pab koj tus kheej nrog kev qhia ntau ntxiv, xws li

Siv cov xov hlau ntev dua rau lub cav

Raws li feem ntau ntawm cov motors tuaj tsis muaj lossis luv heev thiab cov xov hlau nyias, nws ua rau muaj kev nkag siab los txuas lawv los ntawm kev siv lawv kom ntev dua thiab muaj zog dua cov xov hlau. Nov yog qhov koj tuaj yeem ua li cas:

  1. Tshem cov yas nyob ib ncig ntawm qhov kawg ntawm cov xov hlau thiab muab lawv tso kom lawv sib kov nrog lawv cov xov hlau uas nthuav tawm, zoo li hauv daim duab.
  2. Ua ke lawv ua ke los ntawm kov ob lub xov hlau thiab tso cov kab laug sab hla lawv.

Kauj ruam 2: Kev thaiv kab

Thaiv
Thaiv
  1. Stack motorshield atop Arduino.
  2. Ntsia cov motors rau hauv daim iav.
  3. Cov xov hlau sib piv rau Arduino (hauv daim duab no ua tiav nrog lub teeb pom kev zoo, tab sis tib lub Circuit Court zoo ib yam rau lwm qhov kev ntsuas sib piv).

Kauj ruam 3: Coding

Coding
Coding
Coding
Coding
Coding
Coding
Coding
Coding

1. Rub tawm

Rub tawm zip nplaub tshev (SSAD_analogueInputs.zip), txuas hauv qab no. Unzip nws.

Rub tawm Arduino IDE (https://www.arduino.cc/en/main/software).

Qhib cov ntaub ntawv Arduino (SSAD_analogueInputs.ino) uas nyob hauv daim nplaub tshev unzipped nrog Arduino IDE.

2. Nruab Libraries

Txhawm rau khiav cov cai muab, koj yuav tsum teeb tsa qee lub tsev qiv ntawv. Yog li, yog tias Arduino cov ntaub ntawv, uas tau txuas nrog qhov kawg ntawm kab lus no, tau qhib sab hauv Arduino IDE, ua cov hauv qab no:

  1. Nyem: Cov Cuab Yeej → Tswj Cov Tsev Qiv Ntawv…
  2. Saib rau "Adafruit Motor Shield V2 Library" hauv Lim koj qhov kev tshawb nrhiav
  3. Nruab nws los ntawm txhaj rau lub pob Install

Tom qab rub tawm cov tsev qiv ntawv no, tam sim no #suav nrog nqe lus hauv cov lej muab yuav tsum ua haujlwm. Txheeb xyuas qhov ntawd los ntawm txhaj rau "Txheeb Xyuas" Khawm (Tick nyob rau sab saum toj sab laug). Koj paub tias txhua lub tsev qiv ntawv ua haujlwm, yog tias koj tau txais cov lus "Ua tiav kev suav sau" hauv qab ntawm qhov haujlwm. Txwv tsis pub lub bar liab tshwm thiab koj yuav tau txais cov lus ntawm qhov tsis raug.

3. Hloov Txoj Cai

Hloov cov cai raws li koj siv rooj plaub los ntawm kev ua raws cov lus qhia hauv qab no:

Pib Pib Cov Hluav Taws Xob thiab Lawv Cov Khoom Siv Hluav Taws Xob

Ua ntej tshaj plaws, tshaj tawm uas pins cov motors siv, nrog rau hauv qhov ntau ntawm cov motors ua haujlwm li cas. Piv txwv li, lub cev muaj zog uas txuas nrog M4 thiab ua haujlwm nyob rau hauv (nrawm) ntau ntawm 25 thiab 175 tau tshaj tawm zoo li ntawd (hauv qab cov ntsiab lus tseem ceeb):

Motor1 = Tsav (4, 25, 175);

Thaum ua haujlwm nrog lub cav me me uas tau tsav hauv qhov ntau txog 3V, lub cav tsheb yuav tsum tau siv nrog ceev faj vim nws tau tsim rau kev tsav lub cav ntawm 4.5VDC txog 13.5VDC. Txhawm rau tsis ua rau 3V lub cev muaj zog, Kuv tau txwv txoj kev tso tawm Volt ntawm daim ntaub thaiv kom siab tshaj 3V (raws nraim 2.95V). Kuv tau ua qhov ntawd los ntawm kev ntsuas ntau npaum li cas qhov siab tshaj plaws ntawm 255 yog hauv Volt thiab ntsuas nrog lub ntsuas qhov ntsuas uas yog 4.3V. Yog li ntawd, kuv tsis tau tso cai kom nrawm dua 175, uas yog kwv yees li 3V, rau lub cav.

Txhua lub cav yuav txuas nrog ib qho SensoryOutput.

Ib qho SensoryOutput yog tsim los ntawm ib lossis ntau qhov kev txhawb siab. Piv txwv li, lub cev muaj zog tuaj yeem tshee raws li ib lub sensor, lossis raws li qhov nruab nrab ntawm ntau yam, sib txawv ntawm qhov ntsuas qhov ntsuas.

Yog li ntawd, thawj zaug rau txhua lub cav, ib qho SensoryOutput yuav tsum tau tshaj tawm. Cov lej sab hauv cov kab ntawv yog qhov tsawg kawg nkaus thiab qhov siab tshaj plaws ntawm qhov uas lub ntsuas (pawg) tuaj yeem pom. Rau cov khoom siv sib piv qhov no feem ntau yog 0 thiab 1023:

SensoryOutput output1 = SensoryOutput (0, 1023);

Hauv lub voj () ua haujlwm txhua lub cav tau muab rau ib tus nqi tso tawm. Ntawm no koj sau sau rau txhua lub cav cov lus hauv qab no thiab hloov ntawm "output1", xijpeem SensoryOutput tus nqi yuav tsum txuas nrog nws. Tsis txhob hnov qab tseem hloov tag nrho "output1" cov npe hauv kab no, yog tias koj siv lwm lub npe rau nws.

motor1.drive (output1.getValue (), output1.getMin (), output1.getMax ());

Yog tias koj xav tau, koj tuaj yeem muab ntau lub cav (piv txwv li lub cav 1 thiab lub cav 2) tib yam SensoryOutput (piv txwv li tso tawm 1).

Ntxiv mus, koj tuaj yeem muab tus nqi ntawm ntau lub ntsuas rau ib lub cav (saib ntu tom ntej).

Kev txhais cov Sensors

Hauv kev teeb tsa () muaj nuj nqi nws yuav tsum tau tshaj tawm tias cov sensors twg yuav yog ib feem ntawm qhov kev co lub cev muaj zog (SensoryOutput). Nov yog qhov piv txwv ntawm qhov koj txhais tau tias lub ntsuas hluav taws xob uas txuas nrog Arduino Pin A0 yuav tsum tau txhais ua kev co nrog lub cev muaj zog 1 thiab yog li tso tawm 1:

output1.include (A0);

Yog tias ntau qhov kev nkag siab xav tau yuav tsum tau ua ke nyob rau hauv ib qho kev co lub cev muaj zog, koj tuaj yeem tsuas yog ntxiv lwm tus pin analog analog rau output1:

output1.include (A1);

Txwv tsis pub, tsuas yog txuas ntxiv nrog cov txiaj ntsig tom ntej:

output2.include (A1);

Ua ke ntau yam Sensors

Raws li tau hais los saud, ntau lub tswv yim nkag mus (piv txwv li los ntawm A0, A1 thiab A2) tuaj yeem coj mus rau ib lub cav. Cov cai, kuv muab, yog xam qhov nruab nrab ntawm cov txiaj ntsig uas tau nyeem los ntawm txhua qhov suav nrog cov ntsuas. Yog li, yog tias qhov no txaus rau koj cov ntaub ntawv siv thiab koj tsuas xav tau daim ntawv qhia ncaj qha, piv txwv li, kev nkag siab qis rau lub suab qis, koj ua tiav thiab tsis tas yuav xav txog cov hauv qab no:

Yog tias koj, txawm li cas los xij, muaj lwm lub tswv yim ntawm yam koj xav ua nrog ib lossis ntau yam kev nkag siab nkag siab, koj tuaj yeem ua raws qhov kev hloov pauv hauv kev ua haujlwm int getValue () hauv chav kawm SensoryOutput:

int tauValue () {

finalOutput = 0; // TODO ua txhua yam koj xav tau nrog qhov kev nkag siab // ntawm qhov nruab nrab tau tsim, yog tias ntau qhov txiaj ntsig tau ua ke rau (int i = 0; i <curArrayLength; i ++) {finalOutput+= analogRead (valueArray ); } rov qab finalOutput / curArrayLength; }

4. Tshaj Tawm Txoj Cai rau koj li Arduino Prototype

Txuas rau Arduino Prototype (los ntawm Kauj Ruam 2) rau koj lub PC.

Nyem Cov Cuab Yeej → Chaw Nres Nkoj the Xaiv Chaw Nres Nkoj, qhov twg Arduino/Genuino Uno tau sau rau hauv kab zauv

Nyem Cov Cuab Yeej → Pawg → Arduino/Genuino Uno

Tam sim no, lub cav yuav tsum khiav raws li cov tswv yim ntawm cov khoom siv sib piv. Yog tias koj xav tau, koj tuaj yeem txuas Arduino ntawm koj lub PC thiab txuas nws mus rau lwm lub zog siv, zoo li lub roj teeb 9V.

Kauj Ruam 4: Ua Tau Ntxiv

Ua Tau Ntxiv
Ua Tau Ntxiv
Ua Tau Ntxiv
Ua Tau Ntxiv
Ua Tau Ntxiv
Ua Tau Ntxiv

Cov qauv uas koj nyuam qhuav ua tau tso cai tshwj xeeb rau cov tswv yim sib piv thiab tuaj yeem tsav mus txog plaub lub cav. Ntxiv mus, nws tseem tsis tau hnav. Yog tias koj xav txuas ntxiv cov yam ntxwv no, saib ntawm cov lus qhia hauv qab no:

  • Npog Kev Sib Hloov Loj ntawm ERM Cov Tsav Tsheb:
  • Ua SSAD Hnav Hnav:
  • Siv ntau dua 4 Lub Cav-Muab ntau lub cav pov tseg:
  • Siv lub ntsuas hluav taws xob sib xws ultrasonic raws li SSAD cov tswv yim:

Pom zoo: