Cov txheej txheem:

Rangefinder rau Chaw Nres Tsheb Nrog Arduino: 4 Cov Kauj Ruam (nrog Duab)
Rangefinder rau Chaw Nres Tsheb Nrog Arduino: 4 Cov Kauj Ruam (nrog Duab)

Video: Rangefinder rau Chaw Nres Tsheb Nrog Arduino: 4 Cov Kauj Ruam (nrog Duab)

Video: Rangefinder rau Chaw Nres Tsheb Nrog Arduino: 4 Cov Kauj Ruam (nrog Duab)
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Hlis ntuj nqeg
Anonim
Image
Image

Txoj haujlwm yooj yim no yuav pab koj nres koj lub tsheb hauv lub nkas-las los ntawm kev pom qhov deb ntawm cov khoom nyob rau pem hauv ntej ntawm koj lub tsheb bumper. Parallax Ping))) (tm) ultrasonic rangefinders thiab Arduino board. Kuv siv Leonardo tab sis nws yuav tsum ua haujlwm ntawm lwm lub rooj tsav xwm qub lossis sib xws.

Rau cov zaub kuv tau xaiv cov qauv matrix rau nws qhov loj thiab rau qhov laj thawj zoo nkauj.

Kauj Ruam 1: Yam Koj Xav Tau…

Tsim qhov Project…
Tsim qhov Project…

Txhawm rau tsim txoj haujlwm no koj xav tau:

  1. Arduino board: Thawj lub rooj sib tham yuav tsum ua haujlwm raws li txoj cai tsis siv cov koob tshwj xeeb/kev ua haujlwm. Koj tuaj yeem pom nws nyob txhua qhov chaw hauv is taws nem lossis tej zaum koj muaj ib qho tsis siv hauv lub tub rau khoom hauv koj lub lab.
  2. HC-SR04 lossis Parallax Ping))) ultrasonic rangefinder: Lawv nquag siv nrog Arduino cov haujlwm yog li, tej zaum, koj twb muaj nws lawm. Txawm li cas los xij ntawm no yog qee qhov txuas:- Parallax Ping))) ntawm Parallax- HC-SR04 ntawm Sparkfun- Parallax Ping)) ntawm Pololu- HC-SR04 tshawb pom los ntawm Ebay
  3. Plaub daim duab matrix: Kuv yuav nws los ntawm IOTMODULES ntawm Ebay: 4 Txoj Kev MAX7219 DOT MATRIX Yog tias qhov txuas tsis ua haujlwm sim hu rau lawv ntawm lawv lub khw Ebay.
  4. Kev txawj Soldering, tau kawg:)

Kauj ruam 2: Tsim qhov Project…

Tsim qhov Project…
Tsim qhov Project…
Tsim qhov Project…
Tsim qhov Project…

Download the arduinorangefinder.pdf schematic diagram. Koj tuaj yeem pom txuas nrog HC-SR04 pdf thiab ping)))) pdf, tsuas yog rau koj siv xwb. Daim duab hluav taws xob yooj yim heev, ua raws nws raws nraim qhov kuv hais kom txuas qhov txuas rau tso saib thiab ntsuas txog 1 meter (saib duab 1) yog li koj tuaj yeem tso lawv yooj yim dua tom qab.

Hauv daim duab 2 koj tuaj yeem pom yuav ua li cas txhawm rau txuas lub hwj chim pins rau cov zaub thiab lub sensor: +5V los ntawm cov zaub thiab Vcc los ntawm lub ntsuas xav tau yuav tsum tau muab tso rau sabheter. Txhua lwm tus pin yuav tsum muaj nws lub davhlau ya nyob twg.

Image5 yog Ping))) version ntawm qhov haujlwm. Koj mus rau kauj ruam tom ntej thaum npaj txhij …

Kauj Ruam 3: Arduino Code…

Arduino Code… nyeem ntxiv
Arduino Code… nyeem ntxiv
Arduino Code… nyeem ntxiv
Arduino Code… nyeem ntxiv

Nws yog lub sijhawm los ua haujlwm ntawm sab Arduino.

Rub cov ntawv txuas MD_MAX72XX.zip thiab nruab nws los ntawm IDE (kos duab-> ntshuam tsev qiv ntawv).

Tam sim no unzip thiab thauj MeasureDistanceV200.ino kos duab thiab cia saib mus rau nws. Muaj ob peb kab koj tuaj yeem hloov kho:

1) Matrix zaub hom: lub tsev qiv ntawv muab kev txhawb nqa 4 matrix zaub hom yog li nws shuold ua haujlwm nrog feem ntau cov lus hauv khw. Tsuas yog tsis pom zoo ib qho txhais ntawm lub sijhawm thiab xa cov cai rau Arduino kom pom tias nws phim koj cov zaub.

2) Hom ntsuas: tsis pom zoo tsuas yog kab uas phim koj lub sensor.

3) Xaiv koj lub ntsuas ntsuas uas xav tau los ntawm centimeters lossis ntiv tes: tsis pom zoo tsuas yog ib qho uas raug, tau ceeb toom tau teev tseg hauv qhov kev suav sau ua ke, nws yuav qhia koj tias koj tau xaiv dab tsi.

Tam sim no teeb tsa qhov kev ncua deb raws li koj xav tau, koj tuaj yeem hloov kho lawv tom qab thaum txoj haujlwm yuav nyob hauv qhov chaw.

Upload cov cai thiab kos yog tias txhua yam ua haujlwm. Yog tias koj muaj teeb meem thov rov xyuas ob lub wirings thiab txuas.

Hloov tshiab 2019/03/30 - Cov cai tau hloov kho tshiab:> Lub tsev qiv ntawv tshiab matrix zaub, nws txhawb 4 hom zaub (ntau cov ntaub ntawv hauv lub tsev qiv ntawv) Khab nias rau majicdesigns

Hloov tshiab 2019/01/10 - Cov cai tau hloov kho tshiab:> Ntxiv qhov muaj peev xwm xaiv lub ntsuas ntsuas los ntawm centimeters lossis ntiv tes

Hloov tshiab 2017/12/30 - Cov cai tau hloov kho tshiab:> Tua cov duab thaum sawv ntawm STOP nrug deb dua 10 vib nas this!

Kauj Ruam 4: Txoj Haujlwm Ua Haujlwm…

Qhov Project ntawm Kev Ua Haujlwm…
Qhov Project ntawm Kev Ua Haujlwm…
Qhov Project ntawm Kev Ua Haujlwm…
Qhov Project ntawm Kev Ua Haujlwm…

Ntsuas qhov siab ntawm qhov tseem ceeb tshaj plaws ntawm lub tsheb ntawm koj lub tsheb los ntawm hauv pem teb.

Kuv siv cov ntawv ua npuas polystyrene uas kuv tau ua lub qhov rau lub ntsuas (saib duab).

Tam sim no tso cov zaub kom koj tuaj yeem pom nws los ntawm koj lub tsheb.

Sim nkag los ntawm lub tsheb thiab txheeb xyuas qhov kev ncua deb, kho lawv hauv Arduino code thiab rov ua dua yog tias xav tau.

Pom zoo: