Cov txheej txheem:

Siv Stepper Motor Ua Tus Kheej Encoder: 9 Kauj Ruam (nrog Duab)
Siv Stepper Motor Ua Tus Kheej Encoder: 9 Kauj Ruam (nrog Duab)

Video: Siv Stepper Motor Ua Tus Kheej Encoder: 9 Kauj Ruam (nrog Duab)

Video: Siv Stepper Motor Ua Tus Kheej Encoder: 9 Kauj Ruam (nrog Duab)
Video: Python! Extracting Text from PDFs 2024, Hlis ntuj nqeg
Anonim
Siv Stepper Motor Ua Tus Kheej Encoder
Siv Stepper Motor Ua Tus Kheej Encoder

Cov encoders teb yog qhov zoo rau siv hauv microcontroller cov phiaj xwm ua cov khoom siv tab sis lawv cov kev ua tau zoo tsis du thiab txaus siab. Tsis tas li ntawd, muaj ntau qhov chaw seem stepper motors ncig, Kuv txiav txim siab muab lawv lub hom phiaj. Yog li yog tias muaj qee tus neeg tsav tsheb qis nyob ib puag ncig thiab xav ua qee yam, tau txais cov khoom siv thiab cia peb pib!

Kauj ruam 1: Saib Video

Image
Image

Kauj Ruam 2: Tau Txais Txhua Yam

Kawm Tshawb Fawb Daim Duab
Kawm Tshawb Fawb Daim Duab

Rau qhov haujlwm no, koj yuav xav tau:

  • Stepper lub cev muaj zog (Unipolar lossis bipolar).
  • LM358P op-amp nti.
  • Ib qho 1k Ohm resistor.
  • 2x 100k Ohm resistors.
  • 2x 4.7k Ohm resistors.
  • 2x 47k Ohm resistors.
  • Ib LED.
  • Txuas xov hlau.

Yeem cheebtsam:

  • 2 x LEDs
  • 2x 330 Ohm resistors

Kauj Ruam 3: Kawm Daim Duab Circuit

Ua tsaug, Andriyf1!

Xyuas kom tseeb tias koj mus hla cov phiaj xwm hluav taws xob ua ntej mus.

Txij li ob tus pin nyob hauv nruab nrab ntawm lub taub hau kom txuas nrog lub tshuab hluav taws xob sib txuas tau txuas rau tib lub ntsiab lus hauv Circuit (Hais, ib txwm muaj), koj tuaj yeem siv 1x3 lub taub hau hloov ntawm 1x4 lub taub hau hauv qhov ua haujlwm tas mus li, tab sis tom qab ntawd rau txuas lub bipolar stepper lub cev muaj zog, koj yuav tsum txuas ib lub xov hlau ntawm ob txoj hlua sib txuas txhua qhov ua ke thiab txuas lawv mus rau qhov chaw sib txuas ntawm Circuit Court nrog ob seem xov hlau txuas mus txuas rau tus pin P thiab S feem.

Kauj Ruam 4: Sib dhos Circuit Court ntawm Breadboard thiab Kuaj Nws

Sib dhos Circuit Court ntawm Breadboard thiab Xeem Nws
Sib dhos Circuit Court ntawm Breadboard thiab Xeem Nws

Pib los ntawm kev tso lub nkoj op-amp rau ntawm lub rooj tsavxwm thiab txuas ntxiv los ntawm kev txuas cov tiv thaiv mus rau qhov chaw tsim nyog. Sim siv cov xov hlau luv thiab tsis txhob cuam tshuam cov xov hlau. Nco ntsoov tias tsis muaj kev sib txuas xoob thiab ua raws li cov txheej txheem hauv Circuit Court.

Txuas lub tshuab hluav taws xob stepper mus rau lub tshuab hluav taws xob thiab ua kom nws nrog lub zog 5-volt.

Yog tias koj tab tom siv cov kev xaiv LEDs, txuas rau txhua qhov LED anode rau txhua qhov kev tawm los ntawm 330 Ohm resistor thiab txuas lawv cov cathodes rau 'GND'.

Kauj Ruam 5: Ua Daim Ntawv Cuam Tshuam

Ua Ib Daim Ntawv Cuam Tshuam
Ua Ib Daim Ntawv Cuam Tshuam

Nyem rau ntawm daim duab kom paub ntau ntxiv.

Ib qho qauv tas mus li ntawm lub tshuab raj yuav raug pom zoo kom ua raws li nws yuav ua tau ntau dua thiab siv tau los siv hauv cov phiaj xwm.

Kauj Ruam 6: Xeem Nws Nrog Microcontroller, Upload Arduino Code

Ntsuas Nws Nrog Microcontroller, Upload Arduino Code
Ntsuas Nws Nrog Microcontroller, Upload Arduino Code
Ntsuas Nws Nrog Microcontroller, Upload Arduino Code
Ntsuas Nws Nrog Microcontroller, Upload Arduino Code

Qhov piv txwv no tswj hwm qhov ci ci ntawm LED txuas nrog tus pin 'D13' los ntawm kev kho lub voj voog ua haujlwm ntawm tus pin tso tawm, tswj los ntawm tus lej nkag teb chaws.

Kauj Ruam 7: Ua Kev Txuas Hluav Taws Xob

Ua Kev Txuas Hluav Taws Xob
Ua Kev Txuas Hluav Taws Xob

Txuas lub tshuab hluav taws xob lub zog rau *'+5-V tus pin,' -ve 'rau' GND 'tus pin, thiab cov pins tso tawm rau tus pin' D6 'thiab' D7 'ntawm Arduino board. Qhov sib txuas ntawm kev sib txuas ntawm cov pins tso tawm ntawm lub tshuab hluav taws xob mus rau cov tswv yim ntawm Arduino txiav txim siab seb qhov tshwj xeeb kev taw qhia ntawm kev txav ntawm lub tshuab hluav taws xob stepper yuav raug sau npe raws lub moos lossis lub moos.

*Yog tias koj siv lub microcontroller uas ua haujlwm ntawm qib 3.3-V logic, xyuas kom tseeb tias koj siv lub zog txuas nrog 3.3-V DC nkaus xwb

Kauj Ruam 8: Fais fab Kev Teeb

Fais fab Kev Teeb
Fais fab Kev Teeb
Fais fab Kev Teeb
Fais fab Kev Teeb
Fais fab Kev Teeb
Fais fab Kev Teeb

Txuas qhov teeb tsa mus rau lub zog tsim nyog tsim nyog (5-12 volt DC) thiab txhawb nws.

Kauj Ruam 9: Nthuav Nws Furthur

Tam sim no koj tau txais nws ua haujlwm, koj tuaj yeem ua txhua hom phiaj xwm uas tuaj yeem ua tiav nrog tus lej nkag teb chaws. Yog tias koj ua qee yam nrog nws, sim qhia qee cov duab ntawm koj txoj haujlwm nrog zej zog los ntawm txhaj rau 'Kuv Ua Nws!'.

Pom zoo: