Cov txheej txheem:

AVR Microcontroller. Ultrasonic nrug Sensor. HC-SR04 ntawm LCD NOKIA 5110: 4 Cov Kauj Ruam
AVR Microcontroller. Ultrasonic nrug Sensor. HC-SR04 ntawm LCD NOKIA 5110: 4 Cov Kauj Ruam

Video: AVR Microcontroller. Ultrasonic nrug Sensor. HC-SR04 ntawm LCD NOKIA 5110: 4 Cov Kauj Ruam

Video: AVR Microcontroller. Ultrasonic nrug Sensor. HC-SR04 ntawm LCD NOKIA 5110: 4 Cov Kauj Ruam
Video: Interfacing HC-SR04 Ultrasonic Sensor with ATmega32 Microcontroller 2024, Hlis ntuj nqeg
Anonim
Image
Image

Nyob zoo sawv daws!

Hauv ntu no kuv ua cov cuab yeej siv hluav taws xob yooj yim txhawm rau ntsuas qhov nrug thiab cov ntsuas no tau muab tso rau ntawm LCD NOKIA 5110. Cov ntsuas tau muab tso ua daim duab thiab cov lej. Cov cuab yeej siv raws li lub microcontroller AVR ATMEGA328P. Cov cuab yeej tau nruab nrog lub ntsuas hluav taws xob ultrasonic nrug HC-SR04.

Kauj Ruam 1: Cov Txheej Txheem Qhia

Nqe Lus Qhia
Nqe Lus Qhia
Nqe Lus Qhia
Nqe Lus Qhia

Cov khoom siv yooj yim ntawm lub cuab yeej:

  • Microcontroller AVR «ATMEGA328P»
  • Monochrome Graphic LCD «NOKIA 5110»
  • Ultrasonic nrug sensor «HC-SR04»

Microcontroller AVR «ATMEGA328P»

Koom nrog cov yam ntxwv:

  1. 16-ntsis Timer/Counter cuam tshuam
  2. Kev cuam tshuam sab nrauv
  3. Tswv/qhev SPI serial interface

Monochrome Graphic LCD «NOKIA 5110»

Kev qhia tshwj xeeb:

  1. 48 x 84 Dot LCD Zaub
  2. Serial Bus Interface nrog qhov siab tshaj plaws ceev 4 Mbits/s
  3. Internal Controller/Driver «PCD8544»
  4. LED Back-Light
  5. Khiav ntawm Voltage 2.7V-5V, siv hluav taws xob tsawg, nws haum rau kev siv roj teeb
  6. Kub ntau ntawm -25˚C txog +70˚C
  7. Txhawb Kev Teeb Meem CMOS

Ultrasonic nrug sensor «HC-SR04»

Nta thiab specs:

  1. Lub Hwj Huam: +5V DC
  2. Quiescent tam sim no: <2mA, ua haujlwm tam sim no: 15mA
  3. Kev ncua deb: 2cm - 400cm / 1 " - 13 ft, kev daws teeb meem: 0.3cm
  4. Ntsuas lub kaum sab xis: 30 degree
  5. Ua kom cov tswv yim mem tes dav: 10uS
  6. Loj: 45mm x 20mm x 15mm

Kauj Ruam 2: Nws Ua Haujlwm Li Cas?

Nws Ua Haujlwm Li Cas?
Nws Ua Haujlwm Li Cas?
Nws Ua Haujlwm Li Cas?
Nws Ua Haujlwm Li Cas?

Lub ntsuas hluav taws xob ultrasonic ua haujlwm ntawm lub hauv paus ntsiab lus ntawm SONAR thiab RADAR system uas yog siv los txiav txim siab qhov nrug mus rau ib qho khoom.

Lub tshuab ntsuas hluav taws xob ultrasonic tsim lub suab nrov (ultrasound) nthwv dej. Thaum qhov ultrasound no tsoo cov khoom, nws cuam tshuam raws li ncha uas tau hnov los ntawm tus txais raws li qhia hauv daim duab hauv qab no.

Los ntawm kev ntsuas lub sijhawm xav tau rau lub ncha mus cuag tus txais, peb tuaj yeem suav qhov deb.

Nov yog lub hauv paus ntsiab lus ua haujlwm ntawm Ultrasonic module ntsuas qhov nrug.

Hauv ultrasonic module HCSR04, peb yuav tsum muab lub plawv dhia, yog li nws yuav tsim hluav taws xob ntau zaus 40 kHz.

Tom qab tsim hluav taws xob piv txwv li 8 mem tes ntawm 40 kHz, nws ua rau tus ncha pin siab. Echo tus pin tseem nyob siab kom txog thaum nws tsis tau txais lub suab ncha rov qab. Yog li qhov dav ntawm tus ncho tus pin yuav yog lub sijhawm rau lub suab mus rau qhov khoom thiab rov qab los. Thaum peb tau txais lub sijhawm peb tuaj yeem suav nrug, raws li peb paub lub suab nrawm.

HC -SR04 tuaj yeem ntsuas txog li ntawm 2 cm - 400 cm

Tam sim no yuav xam li cas: nrug deb = Ceev x Sijhawm

Qhov nrawm ntawm lub suab tsis yog 343 m/s

Tag Nrho Ze = 343 x Lub Sijhawm Siab (Echo) 2

Tag nrho qhov nrug tau muab faib ua 2 vim tias teeb liab txav los ntawm HC-SR04 mus rau qhov khoom thiab rov qab mus rau tus qauv HC-SR04

Kauj ruam 3: Microcontroller Firmware Programming

Rub tawm С-code program ntawm firmware microcontroller nrog cov lus pom.

Tom qab ntawv suav nws rau HEX cov ntaub ntawv thiab xa mus rau lub cim xeeb nyem ntawm microcontroller.

Flashing Firmware rau Microcontroller:

Kev xa cov ntaub ntawv HEX rau hauv microcontroller flash nco. Saib cov vis dis aus nrog cov lus piav qhia ntxaws txog lub microcontroller flash memory burning: Microcontroller flash memory burning…

Kauj Ruam 4: Ultrasonic Distance Sensor Circuit Circuit Assembly

Ultrasonic Distance Sensor Circuit Circuit Assembly
Ultrasonic Distance Sensor Circuit Circuit Assembly
Ultrasonic Distance Sensor Circuit Circuit Assembly
Ultrasonic Distance Sensor Circuit Circuit Assembly

Txuas cov khoom siv raws li daim duab qhia chaw.

Plug lub zog thiab nws ua haujlwm!

Pom zoo: