Cov txheej txheem:

Yuav Ua Li Cas Siv Industrial Encoders Nrog Arduino: 6 Cov Kauj Ruam
Yuav Ua Li Cas Siv Industrial Encoders Nrog Arduino: 6 Cov Kauj Ruam

Video: Yuav Ua Li Cas Siv Industrial Encoders Nrog Arduino: 6 Cov Kauj Ruam

Video: Yuav Ua Li Cas Siv Industrial Encoders Nrog Arduino: 6 Cov Kauj Ruam
Video: Customized Adhesive daim kab xev, cov khoom siv rau cov khoom siv hauv qab, tiv thaiv plua plav dai 2024, Kaum ib hlis
Anonim
Yuav Ua Li Cas Siv Industrial Encoders Nrog Arduino
Yuav Ua Li Cas Siv Industrial Encoders Nrog Arduino

Cov lej nkag mus ntau ntxiv feem ntau siv rau cov ntawv thov kev lag luam xws li neeg hlau lossis kev nrhiav chaw. Encoders rau daim ntawv thov kev lag luam los feem ntau nrog qhov sib txawv RS422 interface.

Kuv yuav qhia hauv qhov haujlwm me me no yuav siv lub tshuab tsim khoom ntxiv li cas - hauv peb qhov xwm txheej SICK DFS60 - nrog Arduino UNO.

Kauj Ruam 1: Cov Cuab Yeej thiab Cov Khoom

Cov Cuab Yeej thiab Cov Khoom
Cov Cuab Yeej thiab Cov Khoom
Cov Cuab Yeej thiab Cov Khoom
Cov Cuab Yeej thiab Cov Khoom

Khoom siv

  • Arduino UAS
  • 3x RS422 Shield rau Arduino
  • nce tus lej nkag mus (Mob DFS60)

Cov cuab yeej

  • Ntsia Hlau
  • kuaj fais fab

Kauj Ruam 2: Qee Qhov Tseem Ceeb

Ib co hauv paus
Ib co hauv paus
Ib co hauv paus
Ib co hauv paus

RS422 cov zis ntawm tus lej nkag tsuas yog siv rau txheej txheej kho vajtse xwb. Tsis muaj cov txheej txheem sib txuas yuav raug xa hla RS422. Tsuas yog cov mem tes ntawm tus encoder nws tus kheej tau hloov ncaj qha los ntawm 3 qhov sib txawv RS422 raws: SIN, COS thiab Z (xoom txoj haujlwm).

Vim tias 3 txoj kev ywj pheej RS422 raws peb xav tau 3 RS422 cov tswv yim rau Arduino. Rau lub hom phiaj no kuv tau siv 3 pcs ntawm kuv Arduino RS422/RS485 cov ntaub thaiv npog - teeb ntawm ib qho Arduino.

Kauj Ruam 3: Dip Hloov Chaw ntawm RS422 Shields

Dip Hloov Chaw ntawm RS422 Shields
Dip Hloov Chaw ntawm RS422 Shields

Lub teeb hloov chaw rau txhua daim ntaub thaiv yog tib yam:

  • S1: ON, OFF, OFF, OFF (txais ib txwm nyob ntawm / xa tawm ib txwm tawm)
  • S2: OFF, OFF, ON, ON
  • S3: ON, OFF, OFF, OFF (txiav tawm resistor rau)

Kauj Ruam 4: Jumper Settings ntawm RS422 Shields

Jumper Chaw ntawm RS422 Shields
Jumper Chaw ntawm RS422 Shields
Jumper Chaw ntawm RS422 Shields
Jumper Chaw ntawm RS422 Shields
Jumper Chaw ntawm RS422 Shields
Jumper Chaw ntawm RS422 Shields

Jumper teeb tsa rau ib qho thaiv yog txawv. Nyob ntawm qhov sib txuas channel RX tus pin tau teeb tsa rau:

  • Z: D2 yog
  • Qauv: D3
  • SIB: D4

Qhov hluav taws xob jumper JP1 yuav tsum tau teeb tsa rau 5V.

Kauj Ruam 5: Kev thaiv kab

Thaiv
Thaiv

Tus lej nkag tuaj yeem siv tau los ntawm lub chaw kuaj hluav taws xob lossis ncaj qha los ntawm 5V ntawm Arduino UNO

Kauj Ruam 6: Software thiab Xeem

Thov sau cov ntawv INO txuas hauv qab Arduino IDE. Tom qab rub tawm txoj haujlwm mus rau Arduino koj yuav tsum qhib qhov ntsuas nrog 115200 baud.

Koj yuav pom tus nqi nce tam sim no (hloov kho tag nrho 0, 5s) thiab qhov xwm txheej tam sim no ntawm Encoder muaj….

Pom zoo: