Cov txheej txheem:

TrigonoDuino - Yuav Ua Li Cas Txheeb Ze Li Cas Tsis Muaj Sensor: 5 Kauj Ruam
TrigonoDuino - Yuav Ua Li Cas Txheeb Ze Li Cas Tsis Muaj Sensor: 5 Kauj Ruam

Video: TrigonoDuino - Yuav Ua Li Cas Txheeb Ze Li Cas Tsis Muaj Sensor: 5 Kauj Ruam

Video: TrigonoDuino - Yuav Ua Li Cas Txheeb Ze Li Cas Tsis Muaj Sensor: 5 Kauj Ruam
Video: Tshuaj theem vim li cas thiaj tau nqi ?/ Siv kho mob dab tsi?/paris polyphylla использовать для? 2024, Hlis ntuj nqeg
Anonim
TrigonoDuino - Yuav Ua Li Cas Ntsuas Qhov Siab Tsis Muaj Sensor
TrigonoDuino - Yuav Ua Li Cas Ntsuas Qhov Siab Tsis Muaj Sensor
TrigonoDuino - Yuav Ua Li Cas Txheeb Ze Li Cas Tsis Muaj Sensor
TrigonoDuino - Yuav Ua Li Cas Txheeb Ze Li Cas Tsis Muaj Sensor
TrigonoDuino - Yuav Ua Li Cas Ntsuas Qhov Siab Tsis Muaj Sensor
TrigonoDuino - Yuav Ua Li Cas Ntsuas Qhov Siab Tsis Muaj Sensor

Txoj haujlwm no yog tsim los ntsuas kev nrug deb yam tsis muaj kev lag luam. Nws yog txoj haujlwm kom nkag siab cov cai trigonometric nrog kev daws teeb meem. Nws tuaj yeem hloov pauv tau rau qee qhov kev xam trigonometric. Cos Kev txhaum thiab lwm yam ua haujlwm nrog Math.h.

Nws yog thawj qhov qauv ntawm qhov ntsuas no nrog cov kab teeb laser, txhua cov lus qhia lossis cov lus qhia tau txais tos.

Nws siv lej rau kev ntsuas nrug nrog Trigonometry cov cai.

Nws ua haujlwm nrog ob lub laser diodes, servo motor SG90, ib lub zog 10k thiab Arduino Uno.

Qhov tseeb yog nyob ib puag ncig +- 2 hli rau <1 meter nrug, qhov kev ncua deb yog tso tawm ntawm centimeter. Yog tias koj xav hloov pauv ntawm nti, 1cm = 0, 393701 nti, koj yuav tsum faib los ntawm 2, 54. Koj yuav poob qhov tseeb nrog qhov loj dua, ua rau me ntsis offset kaum ntawm A (hloov 90 ° koj yuav muaj 90.05 °).

Piav qhia:

Potentiometer txav lub laser C ntawm lub cav servo, qhov no muab lub kaum C rau Arduino. Laser A point muab lub kaum sab xis. Tsiv lub laser (C) taw tes nrog lub hwj chim ntsuas mus rau qhov ua kom pom ob lub kab teeb laser, qhov no muab taw tes B.

Cov Lus Qhia: Kho cov kab teeb laser nrog lub tshuab ntsia hlau laser kom tau txais cov ntsiab lus zoo meej laser.

Kauj Ruam 1: Tshooj Npe

Daim Ntawv Teev Npe
Daim Ntawv Teev Npe
Daim Ntawv Teev Npe
Daim Ntawv Teev Npe
Daim Ntawv Teev Npe
Daim Ntawv Teev Npe
Daim Ntawv Teev Npe
Daim Ntawv Teev Npe

Lub ntsiab:

-Ob lub lasers: https://fr.aliexpress.com/popular/650nm-laser-diod …

- Arduino Uno:

-Servo motor: https://fr.aliexpress.com/popular/sg90-servo-motor …

-10k Potentimeter: https://www.aliexpress.com/w/wh Wholesale-10k-potenti …

-Dupont Hlau:

Tuam:

-Solder Iron:

(Kuv muaj qhov no thiab nws yog cov hlau zoo heev, tom haujlwm kuv siv Weller tab sis rau kuv tus kheej kuv siv nws)

Kev xaiv:

-Cov tiv thaiv:

Kauj Ruam 2: Txuas Hluav Taws Xob

Hluav taws xob Electronics
Hluav taws xob Electronics
Hluav taws xob Electronics
Hluav taws xob Electronics
Hluav taws xob Electronics
Hluav taws xob Electronics
Hluav taws xob Electronics
Hluav taws xob Electronics

Txuas cov diode emitters, 5V rau xaim liab thiab GND rau xaim xaim.

Txuas Servo Liab mus rau 5V, Dub rau GND thiab Txiv kab ntxwv rau Arduino Digital Pin 3.

Txuas Potentiometer sab laug tus pin rau Digital Pin 8, sab xis rau Digital Pin 9 thiab tus pin nruab nrab rau Analog Pin A0. Sab laug tus pin yog violet rau kuv.

Saib schematic ua ntej fais fab tuag. Ceev faj nrog kab teeb laser, nws tuaj yeem ua rau koj lub qhov muag puas. Koj tuaj yeem ntxiv cov tshuaj tiv thaiv nruab nrab ntawm cov xaim liab ntawm diodes thiab arduino, 10k yog siv ntawm module KY008.

Tswv yim: Xav tau cov laug hlau los npaj Dupont xov hlau rau lasers thiab potentiometer.

Kauj Ruam 3: 3D Luam Phaj

3D Luam Plate
3D Luam Plate
3D Luam Plate
3D Luam Plate
3D Luam Plate
3D Luam Plate
3D Luam Plate
3D Luam Plate

Tsim nrog Autocad thiab xa tawm ntawm STL hom.

www.autodesk.fr/products/autocad/overview

Luam cov ntawv yooj yim dua yog qhov zoo rau koj, siv cov ntsia hlau tam sim no nrog SG90 txhawm rau kho nws. Qhov chaw ntawm servo xav tau ntawm sab xis ntawm kev txhawb nqa zoo li cov duab.

Tseem ceeb:

Teem servo rau (0) qib ua ntej muab daim thib ob rau servo motor. Muab cov lasers taw qhia rau ntawm txoj haujlwm sib luag nrog Servo ntawm (0), hloov pauv nrog 0: monServomoteur.write (0);.

Tsis txhob muab tshuaj txhuam, tos qhov kawg ntawm cov kauj ruam tom ntej.

Kauj ruam 4: Arduino Code

Arduino Txoj Cai
Arduino Txoj Cai
Arduino Txoj Cai
Arduino Txoj Cai
Arduino Txoj Cai
Arduino Txoj Cai

Koj tuaj yeem pom cov cai siv nws.

Rub tawm thiab Nruab Arduino IDE:

Nws yuav tsum tau ntxiv lub tsev qiv ntawv Math.h ntawm qhov haujlwm.

Daim duab peb sab yog duab plaub ntawm A kaum, peb paub AC li 14cm, thiab servo motor muab lub kaum C, peb kuj xam lub kaum B rau ntsuas nrug AB nrog Tan (B), B yog kev sib tshuam ntawm 2 cov ntsiab lus laser. Tag nrho lub kaum ntawm daim duab peb sab yog qhov sib npaug rau 180 °, nrog 90 ° kaum ntawm A.

Kev ntsuas ntsuas nrug deb ze ntawm lub laser ntawm Ib ces kaum.

Yog tias koj tsis muaj OLED npo, siv TrigonoDuinoSerial.ino. Kuv siv SSD1306 Oled screen rau siv qhov no yam tsis muaj computer.

Nb: Thov koj hloov 4064 los ntawm 1028 nws nyob ntawm Arduino pawg thawj coj. Rau kuv Wavgat R3 analog pin rov qab tus nqi nruab nrab ntawm 0 thiab 4064, tab sis rau qee qhov lwm tus nws yog 0 thiab 1028.

Kho kom raug: daim ntawv qhia ua haujlwm tsis tsim nyog rau qhov tseeb, hom kev suav tau hloov pauv hauv cov cai tshiab rau siv ob npaug es tsis siv hom ntev sib txawv. "Rau" Loop tau nce ntxiv rau tus nqi ruaj khov dua ntawm servo motor.

Mounting lasers ntawm lawv qhov chaw teeb tsa servo.write rau 0 thiab muab cov ntaub ntawv tuav laser tso rau hauv nruab nrab ntawm servo. Lasers yuav tsum sib npaug. Kho cov kab teeb laser mus rau qhov siab tib yam thiab cov taw qhia yuav tsum yog nyob deb ib yam li cov lasers lawv tus kheej.

Kauj Ruam 5: Ntsuas Kev Ntsuas

Ntsuas Kev Ntsuas
Ntsuas Kev Ntsuas
Ntsuas Kev Ntsuas
Ntsuas Kev Ntsuas
Ntsuas Kev Ntsuas
Ntsuas Kev Ntsuas

Tam sim no mus rau qhov ntsuas ntsuas. Kho koj lub AC ntev mus rau qhov nruab nrab rau nruab nrab ntawm cov teeb meem lasers yog xav tau.

Tig potentiometer maj mam nrog cov kauj ruam me me. Koj tuaj yeem hloov kho lub ntsej muag laser (tig lub taub hau ntsia hlau laser) kom pom tseeb qhov deb loj.

Koj tuaj yeem ntsuas qee qhov ntsuas nrog chav no tab sis qhov tseeb yuav tsis meej dua. Kev ntsuas qis dua 1 meter yog qhov zoo heev.

Tom ntej:

Piv txwv li, koj tuaj yeem tso lub servo thib ob nyob rau hauv thawj lub laser rau kev ntsuas tab sis nws xav tau kev suav ntau dua. Nws tuaj yeem yog qhov zoo tshaj plaws rau cov tub ntxhais hluas kawm paub trigonometry, nws tau muab daim ntawv thov ua lej tiag.

Koj tuaj yeem tso lub cav servo zoo dua thiab ntxiv qee lub zog ntsuas kom nce qhov tseeb (1 lub zog ntsuas rau 15 ° piv txwv) thiab nrug deb ntawm kev ntsuas.

Yuav ntxiv qhov txav chaw ntawm qhov kev pabcuam rau kev hloov pauv sai AC ntev.

Pom zoo: