Cov txheej txheem:

Tswj Dynamixel 12A los ntawm Kev Xa Pob Ntuas: 5 Cov Kauj Ruam
Tswj Dynamixel 12A los ntawm Kev Xa Pob Ntuas: 5 Cov Kauj Ruam

Video: Tswj Dynamixel 12A los ntawm Kev Xa Pob Ntuas: 5 Cov Kauj Ruam

Video: Tswj Dynamixel 12A los ntawm Kev Xa Pob Ntuas: 5 Cov Kauj Ruam
Video: ? Что такое многополосный 6 атомный хронометраж ? То 2024, Kaum ib hlis
Anonim
Tswj Dynamixel 12A los ntawm Kev Xa Pob Pob
Tswj Dynamixel 12A los ntawm Kev Xa Pob Pob

DYNAMIXEL 12A

Kauj Ruam 1: Cov Cheeb Tsam Yuav Tsum Tau

HARDWARE:

1. Dynamixel 12A lossis Dynamixel lub cev muaj zog

2. USB rau Dynamixel.

SOFTWARE:

1. Robotis Dynamixel wizard

2. Python --- Serial pob ntsia

Kauj Ruam 2: Qhia rau Dynamixel 12A

Dynamixel motors yog qhov tseeb thiab feem ntau siv hauv Robotics. Txhua lub tshuab Dynamixel muaj STM microcontroller sab hauv. Koj tuaj yeem nyeem lub zog tam sim no, qhov hluav taws xob, kos tam sim no, ntsuas kub, txoj haujlwm, thiab lwm yam.., Los ntawm Dynamixels Motors.

Cov lus qhia tshwj xeeb ntawm Dynamixel 12A:

Ua haujlwm Voltage -12v

Qhov hnyav-55g

Max tam sim no -900mA

Stall Torque-15.3 Kg.cm

Kauj Ruam 3: Sib Tham/tswj Dynamixel 12A

  • Dynamixel 12A tsis zoo li lub cav servo uas muaj 3pin GND, PWM, VCC, muab lub zog hluav taws xob thiab PWM teeb liab thiab tswj lub cav.
  • Peb tuaj yeem tswj hwm Dynamixel cov tshuab siv Half Duplex UART kev sib txuas lus raws tu qauv.

Half Duplex Communication Protocol yog dab tsi?

Ib nrab-duplex cov ntaub ntawv xa mus txhais tau tias cov ntaub ntawv tuaj yeem xa mus rau ob qho kev qhia ntawm lub teeb liab, tab sis tsis yog tib lub sijhawm.

Tam sim no peb kawm txog Protocol 1.0 rau Dynamixels los ntawm Robotis los tswj Dynamixel cov motors.

  • Koj tuaj yeem sib txuas lus nrog Dynamixel lub cev muaj zog los ntawm kev xa pob ntawv los ntawm koj lub laptop/microcontroller zoo li Arduino, r-pi, thiab lwm yam.., mus rau lub microcontroller uas muaj tam sim no hauv Dynamixel motors.
  • Txhua Dynamixels muaj ID uas tuaj yeem hloov kho.
  • Ib pob ntawv tsis muaj dab tsi tab sis Teeb ntawm bytes.

Incase of Dynamixel raws tu qauv 1.0 koj yuav muaj ob hom pob ntawv

  • Cov ntawv qhia
  • Cov xwm txheej pob ntawv

Pob ntawv qhia yog cov ntaub ntawv hais kom ua xa mus rau Ntaus Ntawv.

Cov ntawv qhia zoo li no:

Header1, Header2, ID, Ntev, Qhia, Param 1… Param, NChecksum

0xFF, 0xFF, ID, Length, Instruction Param 1… Param, NCHKSUM

Cov lus qhia byte qhia yuav ua li cas, seb puas yuav nyeem cov ntaub ntawv lossis sau rau Dynamixel lub cev muaj zog.

TABLE CONTROL NTAWM DYNAMIXEL MOTOR.-Lub Rooj Tswjhwm yog cov qauv uas muaj ntau yam Cov Ntaub Ntawv los khaws xwm txheej lossis tswj lub cuab yeej.

Nyeem ntxiv txog Tswj rooj Ntawm noControl Table Robotis.

Peb tuaj yeem nkag mus saib cov ntaub ntawv hauv lub rooj tswj hwm los ntawm nws qhov chaw nyob thiab peb kuj tuaj yeem sau.

Kauj Ruam 4: Sau Lub Hom Phiaj Txoj Haujlwm rau Dynamixel Motor

Cov Ntawv Qhia Qhia Kom Sau Lub Hom Phiaj txoj haujlwm

txhua pob ntawv pib nrog lub taub hau

H1 H2 ID LEN INST P1 P2 P3 CKSM

0xFF, 0xFF, 0x01, 0x05, 0x04, 0x1E, 0xF4, 0x01, 0xE2

LEN-kev qhia byte+p1+p2+p3+chk sum = 5 bytes

ID = Dynamixel lub cev ID 1-koj tuaj yeem teeb tsa dynamixel id siv neeg hlau dynamixel wizard software

INST = reg sau-qhia meej tias koj tau sau rau lub tshuab.

P1 = Pib qhov chaw nyob ntawm Cov Ntaub Ntawv-Hauv lub rooj tswj lub hom phiaj Txoj haujlwm muaj qhov chaw nyob 30 (0x1E hauv hexadecimal).

P2 = qis dua byte ntawm cov ntaub ntawv

P3 = ntau dua byte ntawm cov ntaub ntawv

Checksum xam yuav piav sai sai ………………….

Yog tias koj xa cov pob ntawv saum toj no mus rau Dynamixel Ua ntu zus siv USB2Dynamixel, Dynamixel lub hom phiaj lub hom phiaj yuav teeb tsa rau 500.

Kauj Ruam 5: PYTHON CODE

#Developed los ntawm Madhu. Qhov hloov tshiab kawg ntawm 2019-07-19

ntshuam Serial

lub sij hawm ntshuam

ser = serial. Serial ('com36', '57142')

#hloov com chaw nres nkoj raws li, kuv lub tshuab dynamixel baud tus nqi yog 57142, koj tuaj yeem teeb nws siv Dynamixel wizard software.

thaum (1):

gp1 = input ('nkag mus ID1 txoj haujlwm lub hom phiaj (0-1023)')

l = gp1 & 255 #low byte

h = (gp1 >> 8) & 255 #high byte

li = [0xff, 0xff, 0x01, 0x05, 0x04, 0x1e, l1, h1]

#txheeb xyuas cov lej suav

crc = sum (li [2:])

tsawg1 = crc & 255

txq = 255-low1

li.append (chksum) #adding check sum

a = bytearray (li) #hloov pauv cov npe rau hauv bytearray

ser.write (a) #Serially xa siv usb2dynamixels.

sijhawm.s pw (0.5)

#Luam theej code muab tso rau hauv nab nab IDE. Nruab pob pyserial. txuas usb2dynamixel sab USB rau lub laptop USB chaw nres nkoj thiab lwm qhov kawg rau Dynamixel lub cev muaj zog. Muab lwm 12v muab rau USB2DYNAMIXEL.

RUN cov cai, nkag mus rau lub hom phiaj txoj haujlwm tus nqi. Saib lub cav khiav.

Pom zoo: