Cov txheej txheem:

Ultrasonic Raws Li Txheej Txheem: 6 Cov Kauj Ruam (nrog Duab)
Ultrasonic Raws Li Txheej Txheem: 6 Cov Kauj Ruam (nrog Duab)

Video: Ultrasonic Raws Li Txheej Txheem: 6 Cov Kauj Ruam (nrog Duab)

Video: Ultrasonic Raws Li Txheej Txheem: 6 Cov Kauj Ruam (nrog Duab)
Video: Pocket Option Торговая стратегия-прибыль от 15-минутных бинар... 2024, Hlis ntuj nqeg
Anonim
Ultrasonic Raws Li Txheej Txheem
Ultrasonic Raws Li Txheej Txheem

Lub sijhawm no kuv nthuav qhia koj cov txheej txheem nkag raws ultrasonic Kuv xav tias nws tuaj yeem nthuav.

Nws yog raws ultrasonic nthwv dej yog li nws yog lub kaw lus nkag tsis tau uas tsis xav tau lwm yam khoom siv hluav taws xob tab sis yam khoom twg txawm tias koj txhais tes sim ua kom nkag mus tau rau txhua yam koj xav tau.

Cov hauv paus ntawm cov kab ke: kev txiav txim ua ntu zus ntawm kev ntsuas qhov deb ua ib qho tseem ceeb

Kuv vam tias koj nyiam

Kauj Ruam 1: Nws Ua Haujlwm Li Cas

Lub kaw lus siv lub ntsuas hluav taws xob ultrasonic txhawm rau ntsuas kev nrug mus rau cov khoom uas muab tso rau ntawm nws xub ntiag.

Cia peb xav tias peb teeb tsa lub kaw lus kom lees paub 6 qhov kev ncua deb: 1/2 ", 1/5", …

Ua si nrog cov lej ntawm qhov kev ncua deb tshwj xeeb thiab qhov ntev ntawm tus yuam sij nkag peb tuaj yeem teeb tsa kev nkag mus nrog ntau tus lej ua ke.

Lub kaw lus ib txwm ntsuas kev nrug deb.

Yog tias qhov kev ncua deb raug ntsuas los ntawm lub ntsuas hluav taws xob thaum lub sijhawm teev tseg tshwj xeeb, daim duab kos khaws nws thiab teeb lub teeb dawb coj thaum lub sijhawm luv luv.

Tom qab ntawd kos duab kos yog tias txhua qhov kev cuam tshuam yav dhau los khaws cov khoom sib xws hauv tib qho kev txiav txim nrog tus yuam sij nkag siv.

Yog tias yog, daim duab kos yuav pom lub teeb ntsuab coj los thiab yuav qhib qhov teeb meem.

Kauj ruam 2: Cov khoom siv

Khoom siv
Khoom siv
  • Ib qho HC-SR04 ultrasonic sensor
  • Ib ARDUINO NANO lossis sib xws microcotroller
  • Ib lub micro servo motor
  • Ib qho ARDUINO LCD
  • Ib I2C ARDUINO LCD adapter
  • Ib tus protoboard
  • Peb 5 mm leds: dawb, liab thiab ntsuab
  • Hlau
  • Plywood
  • Duab los qhia

Kauj Ruam 3: Daim Duab Fritzing

Fritzing Daim duab
Fritzing Daim duab

Kauj Ruam 4: Txhim Kho Qhov System

Txhim Kho Cov Txheej Txheem
Txhim Kho Cov Txheej Txheem
Txhim Kho Cov Txheej Txheem
Txhim Kho Cov Txheej Txheem
Txhim Kho Cov Txheej Txheem
Txhim Kho Cov Txheej Txheem

Cov kauj ruam kuv tau ua raws los tsim cov kab ke yog cov hauv qab no:

  • Qhib ntau qhov ntawm plywood los teeb tsa lub ntsuas hluav taws xob ultrasonic, lub tshuab micro servo, ARDUINO LCD thiab peb lub leds.
  • Hlau tag nrho cov khoom siv thiab txuas rau lub microcontroller zoo li koj tuaj yeem pom hauv cov duab.

Kauj ruam 5: Txoj Cai

Ob peb lub ntsiab lus los coj mus rau hauv tus account:

Txoj hlua sib txawv tsis tu ncua "accessequence" khaws tus nqi ntawm tus yuam sij nkag

const Txoj hlua accessequence = "234";

  • Tus nqi nyob deb uas koj tuaj yeem pom ntawm ARDUINO LCD tsis yog qhov ntsuas nrug deb ntsuas ntawm ntiv tes lossis centimeters tab sis tus nqi ntawm "pab pawg nrug". Kuv txhais tau tias yog qhov kev ntsuas nrug los ntawm lub sensor mus los ntawm 0, 78 "mus rau (0, 78" + step_distance) tus "pab pawg nrug deb" tus nqi yog 1 thiab ntxiv rau.
  • Koj tuaj yeem hloov kho qhov tas mus tas li "step_distance", "min_distance" thiab "max_distance" los kho qhov system kom raug.

Pom zoo: