Cov txheej txheem:

Tswj Koj Lub Computer Nrog Stepper Motor !: 9 Kauj Ruam (nrog Duab)
Tswj Koj Lub Computer Nrog Stepper Motor !: 9 Kauj Ruam (nrog Duab)

Video: Tswj Koj Lub Computer Nrog Stepper Motor !: 9 Kauj Ruam (nrog Duab)

Video: Tswj Koj Lub Computer Nrog Stepper Motor !: 9 Kauj Ruam (nrog Duab)
Video: Python! Extracting Text from PDFs 2024, Hlis ntuj nqeg
Anonim
Tswj koj lub Computer Nrog Stepper Motor!
Tswj koj lub Computer Nrog Stepper Motor!

Hauv ib qho ntawm kuv Cov Lus Qhia yav dhau los, Kuv tau qhia koj yuav ua li cas koj tuaj yeem siv Stepper lub cev muaj zog ua lub cav nkag teb chaws. Hauv Cov Lus Qhia no, cia peb kawm seb peb tuaj yeem siv nws li cas los tswj peb lub khoos phis tawj. Yog li tsis muaj ado ntxiv, cia peb pib!

Kauj ruam 1: Saib Video

Image
Image

Saib cov vis dis aus saum toj no kom tau txais lub tswv yim zoo ntawm nws yog dab tsi thiab yuav ua dab tsi.

Kauj ruam 2: Tau txais tag nrho cov khoom xav tau

Tau Txais Txhua Yam Yuav Tsum Muaj
Tau Txais Txhua Yam Yuav Tsum Muaj

Rau qhov haujlwm no, koj yuav xav tau:

  • USB HID (Tib Neeg Cov Khoom Siv Sib Txuas) ua raws Arduino microcontroller board (Leonardo, Micro, Pro Micro)
  • Stepper lub cev muaj zog*.
  • Stepper motor rau rotary encoder hloov.
  • Kev tsim nyog USB cable (Feem ntau micro USB rau A)
  • 2 khub ntawm txiv neej rau poj niam cov xov hlau (Rau txuas lub rooj sib tham hloov pauv lub rooj rau Arduino board)
  • Ib txheej ntawm 3 tus txiv neej rau poj niam cov xov hlau (Rau txuas lub stepper lub cev muaj zog rau lub rooj sib tham encoder teb)

*Txhua tus neeg tsav tsheb, unipolar lossis bipolar tuaj yeem siv hauv txoj haujlwm. Ib lub tshuab hluav taws xob tsis siv neeg tau pom zoo raws li nws muaj cov kab hluav taws xob ncaj qha tab sis bipolar stepper lub cev muaj zog kuj tseem tuaj yeem siv nrog kev hloov pauv me me hauv kev thaiv.

Kauj Ruam 3: Ua rau Lub Rooj Tsav Xwm Encoder Teb

Ua lub Rooj Tswjhwm Saib Rotary Encoder
Ua lub Rooj Tswjhwm Saib Rotary Encoder

Nyem rau ntawm daim duab saum toj no kom paub ntau ntxiv.

Ua raws li Cov Lus Qhia no kom ua rau lub cav hloov pauv. Koj tuaj yeem ua daim ntawv qhia zaub mov tab sis daim PCB txuas mus tas li yog qhov me dua, ruaj khov thiab tuaj yeem pab koj xyaum qee yam kev sib txuas. Koj tseem tuaj yeem ntxiv LED ntawm txhua qhov tso tawm ntawm pawg thawj coj saib lub zog, hauv koob nrog tus tiv thaiv (220 Ohm pom zoo) los saib xyuas cov xeev tso tawm ntawm lub tshuab hluav taws xob uas tuaj yeem ua pov thawj muaj txiaj ntsig thaum daws teeb meem.

Kauj Ruam 4: Program Arduino Microcontroller

Program Arduino Microcontroller
Program Arduino Microcontroller
Program Arduino Microcontroller
Program Arduino Microcontroller

Nws pom zoo kom hla Arduino code ua ntej rub tawm nws ntawm lub rooj tswj hwm microcontroller. Nws tuaj yeem pab koj nkag siab tias txhua yam tau tshwm sim sab hauv microcontroller thaum koj tig lub stepper lub cev muaj zog.

Kauj Ruam 5: Txuas Stepper Motor mus rau Lub Rooj Tsav Xwm Encoder

Txuas Stepper Motor mus rau Lub Rooj Tsav Xwm Encoder
Txuas Stepper Motor mus rau Lub Rooj Tsav Xwm Encoder
Txuas lub Stepper Motor mus rau Lub Rooj Tsav Xwm Encoder
Txuas lub Stepper Motor mus rau Lub Rooj Tsav Xwm Encoder
Txuas lub Stepper Motor mus rau Lub Rooj Tsav Xwm Encoder
Txuas lub Stepper Motor mus rau Lub Rooj Tsav Xwm Encoder

Xyuas kom koj hla txoj kab hluav taws xob ua tib zoo.

Yog tias siv lub tshuab hluav taws xob unipolar siv lub tshuab txuas txuas nruab nrab ntawm lub cav mus rau ib qho ntawm tus pin 'Q' lossis 'R'. Tom qab ntawd, txuas ib qho ntawm ob ntawm plaub qhov xov hlau uas tseem tshuav ntawm tus tsav tsheb mus rau tus pin 'P' thiab 'S' feem. Ntawm no, Kuv tau siv 1x3 lub taub hau hloov pauv ntawm 1x4 qhia hauv cov phiaj xwm.

Yog tias siv lub tshuab hluav taws xob bipolar stepper, xub txiav txim siab cov kauj hlau txuas ntawm lub cav. Tom qab ntawd nqa cov xaim los ntawm txhua lub kauj thiab txuas lawv ua ke rau ib qho ntawm tus pin 'Q' lossis 'R'. Tom qab ntawd, txuas ob seem xov tooj ntawm tus tsav tsheb mus rau tus pin 'P' thiab 'S' feem.

Kauj Ruam 6: Txuas Lub Rooj Sib Tham Rotary Encoder rau Arduino Board

Txuas lub Rooj Sib Tham Rotary Encoder rau Arduino Board
Txuas lub Rooj Sib Tham Rotary Encoder rau Arduino Board
Txuas lub Rooj Sib Tham Rotary Encoder rau Arduino Board
Txuas lub Rooj Sib Tham Rotary Encoder rau Arduino Board
  • Txuas tus +ve thiab -ve tus pin ntawm lub rooj sib tham hloov pauv hloov mus rau +5 -volt thiab 'GND' tus pin ntawm Arduino pawg thawj coj saib.
  • Txuas cov pins tso tawm ntawm pawg thawj coj saib teb rau cov pins digital 'D5' thiab 'D6' ntawm Arduino board.

Kauj Ruam 7: Txuas Lub Teeb rau Koj Lub Khoos Phis Tawj thiab Kuaj Nws

Txuas qhov teeb tsa rau koj lub khoos phis tawj thiab sim nws
Txuas qhov teeb tsa rau koj lub khoos phis tawj thiab sim nws
Txuas qhov teeb tsa rau koj lub khoos phis tawj thiab sim nws
Txuas qhov teeb tsa rau koj lub khoos phis tawj thiab sim nws

Txuas qhov teeb tsa mus rau koj lub khoos phis tawj thiab qhib ib qho program twg uas tso cai rau tus neeg siv mus rau qhov nce thiab nqis siv xub tuav lossis ib qhov haujlwm uas cov ntawv cursor tuaj yeem txav tau siv cov xub xub.

Kauj Ruam 8: Qhia Koj Txoj Haujlwm Nrog Peb

Yog tias koj txoj haujlwm tau ua tiav, vim li cas ho tsis qhia koj qhov kev tsim rau lwm tus kom txhawb nqa lawv. Nyem rau ntawm 'Kuv Ua Nws' thiab qhia ib daim duab lossis ob ntawm koj qhov kev tsim, Kuv xav pom nws.

Kauj Ruam 9: Mus Furthur

Mus Furthur
Mus Furthur

Sim hloov kho Arduino code los ua lwm yam ntxiv, ntxiv lwm tus lej nkag teb chaws lossis lwm yam kev tawm tswv yim, muaj ntau yam koj tuaj yeem ua tau. Txawm koj ua dab tsi, txhua qhov zoo tshaj plaws!

Pom zoo: