Cov txheej txheem:

DC Tsav thiab Encoder rau Txoj Haujlwm thiab Kev Tswj Ceev: 6 Kauj Ruam
DC Tsav thiab Encoder rau Txoj Haujlwm thiab Kev Tswj Ceev: 6 Kauj Ruam

Video: DC Tsav thiab Encoder rau Txoj Haujlwm thiab Kev Tswj Ceev: 6 Kauj Ruam

Video: DC Tsav thiab Encoder rau Txoj Haujlwm thiab Kev Tswj Ceev: 6 Kauj Ruam
Video: Лучшие часы Casio G Shock Master of G-Топ 5 лучших часов Casio G Shock дл... 2024, Hlis ntuj nqeg
Anonim
DC Tsav thiab Encoder rau Txoj Haujlwm thiab Kev Tswj Ceev
DC Tsav thiab Encoder rau Txoj Haujlwm thiab Kev Tswj Ceev

Taw qhia

Peb yog pab pawg UQD10801 (Robocon I) cov tub ntxhais kawm los ntawm Universiti Tun Hussei Onn Malaysia (UTHM). Peb muaj 9 pab pawg hauv chav kawm no. Kuv pab pawg yog pab pawg 2. Our pab pawg ua haujlwm yog DC lub cev muaj zog thiab tus lej nkag mus rau txoj haujlwm thiab tswj nrawm. Peb pab pawg lub hom phiaj yog tswj DC lub cav tig nrog qhov nrawm peb xav tau.

Nqe lus piav qhia

Tsav tsheb electromotors xav tau lub siab tam sim no. Ib qho ntxiv, kev taw qhia tig thiab nrawm yog ob yam tseem ceeb uas yuav tsum tau tswj. Cov kev xav tau no tuaj yeem ua tiav los ntawm kev siv lub microcontroller (lossis pawg tswj hwm kev txhim kho zoo li Arduino). Tab sis muaj teeb meem; Microcontrollers tsis tuaj yeem muab tam sim no txaus los ua lub cav thiab yog tias koj txuas lub tshuab rau lub microcontroller ncaj qha, koj yuav ua rau lub microcontroller puas tsuaj. Ua piv txwv, Arduino UNO pins raug txwv rau 40mA ntawm qhov tam sim no uas tsawg dua 100-200mA tam sim no tsim nyog tswj lub zog me me. Txhawm rau daws qhov no, peb yuav tsum siv tus tsav tsheb. Tsav tsheb tuaj yeem txuas nrog lub microcontroller kom tau txais cov lus txib thiab khiav lub cav nrog lub siab tam sim no.

Kauj Ruam 1: Kev Npaj Khoom

Kev Npaj Khoom
Kev Npaj Khoom

Cov Khoom Siv Tau

Txhawm rau ua qhov haujlwm no, peb yuav tsum npaj:

-Arduino UNO R3

-2 Potentiometer nrog 10kOhm

-2 DC tsav nrog encoder

-Power mov nrog 12V thiab 5A

-H-choj tsav tsheb

-2 laub khawm

-8 resistor nrog 10kOhm

-Jumper xov hlau

-Breadvroad me me

Kauj ruam 2: Tus Pin Txuas

Tus Pin Txuas
Tus Pin Txuas

1. For sab laug lub cev txuas mus rau Arduino UNO 3:

-Channel A rau tus pin 2

-Channel B rau tus pin 4

2. For txoj cai tsav txuas rau Arduino UNO 3:

-Channel A rau tus pin 3

-Channel B rau tus pin 7

3. For cov potentiometer 1 txuas rau Arduino UNO 3:

-Wiper rau A4 analog

4. For potentiometer 2 txuas rau Arduino UNO 3:

-Wiper rau A5 analog

5. For laub khawm 1 txuas rau Arduino UNO 3:

-Terminal 1a rau tus pin 8

6. For laub khawm 2 txuas rau Arduino UNO 3:

-Terminal 1a rau tus pin 9

7. For H-Choj Tsav Tsav txuas rau Arduino UNO 3:

-Pab 1 rau tus pin 11

-Pab tswv yim 2 rau tus pin 6

Kauj ruam 3: Coding

Coding
Coding

Koj tuaj yeem rub lub coding los ntsuas DC lub cav uas tuaj yeem tig tau. Qhov coding no tuaj yeem pab koj ua kom DC lub cav tig thiab ua haujlwm. Koj yuav tsum rub tawm qhov coding no rau koj lub PC rau qib tom ntej.

Kauj Ruam 4: Xeem DC Tsav

Xeem DC Tsav
Xeem DC Tsav

Yog li, ua ntej koj rub tawm cov lej los ntawm cov kauj ruam dhau los, koj yuav tsum qhib nws hauv koj li Arduino IDE uas twb tau teeb tsa hauv koj lub PC lossis siv Tinkercad hauv online. Tinkercad hauv online, koj tsuas yog tso qhov coding no mus rau "Code" uas tau qhia hauv daim duab. pib qhov system no.

Kauj ruam 5: Qhov tshwm sim

Qhov tshwm sim
Qhov tshwm sim
Qhov tshwm sim
Qhov tshwm sim

Tom qab peb pib qhov kev sim, peb tuaj yeem pom ob qho ntawm DC lub cev muaj zog tig tab sis cov lus qhia sib txawv. Thaum peb pom "Serial Monitor", M1 kev taw qhia yog clockwise thiab M2 qhov kev taw qhia yog anti-clockwise.

Pom zoo: