Kana iwe uchitsvaga nzira yekuyera madaro nemazvo uchishandisa Arduino uye iyo VL53L4CD sensor, iwe uri panzvimbo chaipo. Iyi sensor yakavakirwa pane tekinoroji ye Nguva Yekubhururuka (ToF), inobvumira madaro kuyerwa chaizvo uye nekukurumidza, uye yakanakira kubatanidza mumapurojekiti pazvinenge zvichidikanwa kuziva chinhambwe chechinhu nekuvimbika, zvisinei nemamiriro ekuvhenekesa kana maitiro echinangwa. Tiri kuzokupa gwara rakadzama rekuti rinoshanda sei, mashandisiro aungaite mumapurojekiti ako eArduino uye zvaunofanira kuchengeta mupfungwa kuti ushandise zvakanyanya kugona kwayo.
Kushandisa iyo VL53L4CD iri nyore kana uine ruzivo rwekutanga zvemagetsi uye Arduino hurongwa. Aya marudzi emasensa anopa zvakakosha zvakakosha pamusoro pedzimwe nzira dzekuyera, dzakadai seyechinyakare ultrasonic kana infrared sensors, sezvo zvisingaenderane nehunhu hwenzvimbo yekuyera kuyerwa. Pamusoro pezvo, saizi yaro compact uye yakakura kuyerwa renji inoita kuti ive sarudzo yakanakira marobhoti mapurojekiti, drones, kana chero application uko madaro anoda kuyerwa nekuvimbika.
Chii chinonzi VL53L4CD sensor?
El VL53L4CD Iyo inzwa kureba inoshandisa tekinoroji Nguva Yekubhururuka (ToF) kuyera nhambwe yechinhu. Chaizvoizvo, iyo sensor inotumira isingaonekwe infrared laser pulse iyo inodonha kubva pachinhu uye ichidzokera kune sensor. Nguva inotora kuita rwendo irworwo rwekudzoka ndiyo inoshandiswa kuverenga daro, nenzira chaiyo. Iyi nzira inobvumira kuyerwa kuwanikwa mumamiriro emwenje akasiyana uye nemhando dzakasiyana dzenzvimbo, pasina kukanganiswa nezvinhu zvakaita seruvara, chimiro kana magadzirirwo echinhu.
El VL53L4CD inogona kuyera nhambwe kubva 1mm kusvika 1200mm (1,2 metres) nechigadziriso che 1 mm, zvichiita kuti ive sarudzo yakanakisa yemapurojekiti uko kuyerwa kwakaringana kwemadaro mapfupi uye epakati anodiwa.
Zvakanakira iyo VL53L4CD sensor
El VL53L4CD inopa akawanda mabhenefiti pamusoro pemamwe echinyakare manzwi sensors:
- Kururama: Kusiyana neyakajairwa ultrasonic sensors uye infrared sensors, iyo VL53L4CD inopa yakanyanya kurongeka kunyangwe mumamiriro ezvinhu akaoma.
- Chiedza kushivirira: Unogona kuita zviyero zvakavimbika kunyangwe munzvimbo dzine chiedza chepamusoro kana chakaderera, pasina kukanganiswa nekusimba kwechiedza chakakomberedza.
- Rango de medición: Iine huwandu hwakakura hwekuyera kubva pa1 mm kusvika ku1200 mm, yakanakira akasiyana ehunyanzvi uye anoshanda maapplication.
- Kureruka kwekushandisa: Inoshandisa yakajairwa I²C kutaurirana, zvichiita kuti zvive nyore kubatanidza mune akawanda Arduino-based mapurojekiti uye mamwe microcontroller mapuratifomu.
Iyo VL53L4CD inoshanda sei
Sezvatakambotaura, the VL53L4CD shandisa tekinoroji Nguva Yekubhururuka (ToF). Iyi nzira yakavakirwa pakuyera kuti zvinotora nguva yakareba sei mwaranzi yechiedza kufamba kune chinhu uye kudzokera kune sensor. Iyo inokurumidza kukurumidza maitiro inobvumira kuyerwa kuitwa pafrequency inosvika zana Hz, zvichiita kuti ive yakakodzera kune zvine simba zvikumbiro, senge padhuze sensing mumarobhoti kana mota dzinozvimiririra.
Iyo sensor inosanganisira laser Vertical Cavity Surface Emission VCSEL ye940nm, isingaonekwe uye yakachengeteka zvachose kumaziso. Kusiyana nemasensa akajairwa anoshandisa kusimba kwechiedza chinoratidzwa, iyo VL53L4CD zvakananga kuverenga nguva yekubhururuka, iyo inoita kuti ive yakasununguka pamamiriro ekuvhenekera uye maitiro echinhu chacho. Nekudaro, pasi pemamiriro asina kunaka, senge zvinhu zvakaderera zvinoratidzira kana nzvimbo dzakaomarara, huwandu hweyero hwepamusoro hunogona kudzikiswa zvishoma.
Kutsanangurwa kwehunyanzvi uye maficha akakosha
El VL53L4CD Iyo inouya nehuwandu hwezvinhu zvinoita kuti ive inochinja-chinja uye inoshanda sensor kune yakakura nhamba yekushandisa:
- Vipimo: 13mm × 18mm × 2mm
- Chiyero chikuru chechiyero: 1,2m (1200mm)
- Kugadzirisa: 1 mm
- Maximum sampling rate: 100Hz
- kushanda voltage: 2,6V kusvika 5,5V
- Supply current: 25 mA kazhinji (inogona kusvika 40 mA pasi pemamiriro chaiwo)
- Nzvimbo yekuona (FoV):18º
Kubatanidza iyo VL53L4CD kuArduino
Kubatsira kukuru kwe VL53L4CD ndeyekuti kutaurirana neArduino kunoitwa kuburikidza nebhazi I²C, izvo zvinoita kuti kubatana kwako kuve nyore. Iwe unongoda kubatanidza mapini mana kuti utange kushandisa iyi sensor: VIN, GND, SCL uye SDA. Iyo VIN pini inofanirwa kubatana kune 2,6V kusvika 5,5V yekugovera, nepo SCL neSDA mapini achizobatana neanoenderana I²C mapini eArduino (kazhinji A4 neA5 pamhando dzakaita seUno).
Code muenzaniso wekutanga kuyera madaro
Pazasi tinokuratidza yekutanga kodhi muenzaniso kuti uverenge kureba kukosha kweiyo VL53L4CD. Iyi kodhi inoshandisa raibhurari yepamutemo ye adafruit Kuti uite kuverenga:
#include "Adafruit_VL53L4CD.h" VL53L4CD sensor; void setup() { Serial.begin(115200); if (!sensor.begin()) { Serial.println("No se ha detectado el sensor"); while (1); } } void loop() { sensor.rangingTest(); if (sensor.TimeoutOccurred()) { Serial.println("Timeout en la medición"); } else { Serial.print("Distancia medida: "); Serial.print(sensor.distance()); Serial.println("mm"); } delay(100); }
Iyi kodhi inotangisa sensor uye inotanga kuverenga yakayerwa madaro, ayo anoratidzwa pane serial monitor. Iwe unogona kugadzirisa sampling rate uye mamwe ma sensor paramita zvinoenderana nezvaunoda chaizvo.
Mazano ekuvandudza kushanda
Kuti uwane kuyerwa kwakanyatso uye kutora mukana weiyo yakazara kugona kweiyo VL53L4CD, zvinokurudzirwa kuti utarise zvimwe zvinhu:
- Mamiriro emwenje: Kunyangwe iyo sensor inoshanda nemazvo mumamiriro mazhinji ekuvhenekesa, yakanaka kuiisa munzvimbo ine low ambient light kuti uwane iyo yakanyanya kusvika 1200 mm.
- Hunhu hwechinhu: Zvinhu ne high reflectivity inobvumira kuyerwa kwakanyatsojeka, nepo zvinhu zvakasviba kana zvakakasharara zvinogona kukanganisa kuita.
- Sensor configuration: Unogona kugadzirisa zvigadziriso paramita kuburikidza ne I²C interface kukwirisa kumhanya, kugadzirisa uye kushandiswa kwesimba kwe sensor zvinoenderana nezvinodiwa neprojekiti yako.
El VL53L4CD inopa mhinduro inoshanda uye yakarurama yekuyera madaro. Kugona kwayo kushanda pasi pechero mamiriro ezvakatipoteredza, kuderera kwesimba rekushandisa uye kureruka kwekuita kunoita kuti ive imwe nzira yepamusoro kune mamwe echinyakare ma sensors senge ultrasonic kana infrared. Ingave yepedyo sisitimu murobhoti kana drone, kana kunyangwe yemaindasitiri maapplication, neArduino uye iyi sensor unogona kugadzira mapurojekiti anofadza kwazvo nekuita kwakaringana.