Cov txheej txheem:

Arduino Resolver Module: 4 Kauj Ruam
Arduino Resolver Module: 4 Kauj Ruam

Video: Arduino Resolver Module: 4 Kauj Ruam

Video: Arduino Resolver Module: 4 Kauj Ruam
Video: Контрольная лампа переменного тока с диммером Arduino AC 2024, Kaum ib hlis
Anonim
Arduino Resolver Module
Arduino Resolver Module

Tinee9 tau rov qab los nrog tus qauv tshiab. Cov qauv no hu ua Resolver module.

Hauv ntiaj teb kev tswj lub cev muaj ntau hom lossis cov hau kev txhawm rau txheeb xyuas txoj haujlwm. Cov txheej txheem no suav nrog cov cuab yeej ntsuas ntsuas, XY lub ntsuas hluav taws xob, tus daws teeb meem, RVDT, LVDT, tus thawj coj ua haujlwm, lub zog ntsuas hluav taws xob, thiab lwm yam..

Tus qauv kuv tab tom siv tuaj yeem siv los rhuav tshem RVDT, LVDT, thiab Resolver tab sis rau lub hom phiaj niaj hnub no yuav tsum tshem tus neeg daws teeb meem.

Kev nkag siab: Cov kws tshaj lij

Tutorial Plug and Play: Qib Nruab Nrab

Khoom siv

1: Arduino Nano

2: Resolver Module

3: Pawg Thawj Tswj Hwm

4: 9.0 Volt Roj teeb lossis NScope

5: Resolver

6: 10x Cov mov ci board Jumper Wires

Kauj ruam 1: Resolver Module

Resolver Module
Resolver Module

Muaj ob peb yam uas koj tuaj yeem ua nrog tus daws teeb meem koj tuaj yeem tshem lub cav rau kev hloov pauv lub cev muaj zog, koj tuaj yeem tau txais txoj haujlwm tshwj xeeb yog tias koj tsis mus dhau qhov tsis muaj qhov taw tes, thiab koj tuaj yeem khaws qhov nrawm los ntawm lub cav.

Qhov twg kuv tau pom lawv siv feem ntau yog siv hauv kev siv dav hlau ntawm aileron, rudder, foob pob hluav taws, lossis tswj lub koob yees duab.

Lawv zoo li yuav kim me ntsis ntau dua li lub lauj kaub lossis cov cuab yeej ntsuas tab sis lawv muab rau koj qhov kev daws teeb meem zoo kawg.

Kauj ruam 2: Teeb

Teeb
Teeb
Teeb
Teeb
Teeb
Teeb
Teeb
Teeb

1: Ua ntej koj yuav tsum tso koj lub arduino nano rau ntawm lub khob cij

2: Koj yuav tsum tau sib txuas 5V Pin ntawm Arduino mus rau +3V3 Pin thiab 5V tus pin ntawm Resolver Module (Tus qauv tuaj yeem muaj cov khoom siv ntawm 3.3V thaum muab 5V qhov zoo siab ntawm tus daws teeb meem)

3: Txuas RTN ntawm Arduino mus rau RTN ntawm Resolver Module

4: Txuas D9 ntawm Arduino mus rau PWM ntawm Resolver Module

5: Txuas A0 ntawm Arduino mus rau MCU_COS+ ntawm Tus Qauv Daws Teeb Meem

6: Txuas A1 ntawm Arduino mus rau MCU_SIN+ ntawm Tus Qauv Daws Teeb Meem

7: Txuas tus Resolver EX+ xaim rau EX+ ntawm Resolver Module

8: Txuas tus Resolver EX-xaim mus rau EX- ntawm Resolver Module

9: Txuas tus Resolver COS+ xaim mus rau COS+ ntawm Tus Qauv Daws Teeb Meem

10: Txuas 2 Txoj Kev Ruaj Ntseg RCOM cov xov hlau mus rau RCOM ntawm Tus Qauv Daws Teeb Meem

11: Txuas tus Resolver SIN+ xaim mus rau SIN+ ntawm Tus Qauv Daws Teeb Meem

12: Nqa 9V Roj Teeb rau RTN (-) thiab VIN (+)

13: lossis Nqis Nscope +5V txog 5V Pin ntawm Arduino thiab RTN ntawm Nscope rau RTN ntawm Arduino

14: Sib Nqis Mus Rau USB ntawm PC

15: Nqis Arduino rau USB ntawm PC

Kauj Ruam 3: Thauj Txoj Cai

Thauj cov Code
Thauj cov Code
Thauj cov Code
Thauj cov Code

Luam Paste Arduino Code hauv qab no rau koj daim Sketch hauv Arduino IDE

Yuav ua li cas tus lej no yuav ua yog mus rau PWM lub Resolver Module. Tus Qauv ntawd yuav ua rau tus neeg daws teeb meem thiab ua rau muaj suab nrov nrov ntawm cov coils thib ob ntawm tus daws teeb meem. Cov cim qhia uas tawm los ntawm Kev Txom Nyem+ thiab Cos+ tom qab ntawd tau pub rau OPAMP uas yuav ua rau nruab nrab Wave thiab txo qhov tso tawm kom nws mus ntawm 0-5Volts.

Kev txhaum+ thiab Cos+ yog raws li lawv xav tau. Kev txhaum yog 90 degrees tawm ntawm theem nrog Cos yoj.

Txij li lawv yog 90 degrees tawm ntawm theem peb yuav tsum siv Atan2 (Cos, Sin) ua haujlwm kom tau txais kev sib koom tes raug ntawm txoj haujlwm daws teeb meem.

Tom qab ntawd Arduino yuav ntuav tawm, tom qab nws tau txais 4 qhov piv txwv, tus nqi nruab nrab ntawm -3.14 thiab 3.14 uas sawv cev rau -180 degrees thiab +180 degrees feem. Qhov no yog vim li cas yog tias koj xav siv tus neeg daws teeb meem rau txoj haujlwm tsis meej koj yuav tsum tsuas yog siv ntawm -180 txog 180 nrog rau qhov tig dua lossis lwm yam koj yuav yob dua thiab xav tias koj rov qab los thaum pib lossis thaum kawg ntawm koj lub tshuab ua haujlwm. Qhov no yuav yog teeb meem yog tias koj txiav txim siab siv tus daws teeb meem rau x lossis y axis ntawm lub tshuab luam ntawv 3D thiab dov hla ua rau lub tshuab luam ntawv 3D cuam tshuam.

Kuv tuaj yeem ua tus lej me ntsis zoo dua nrog cuam tshuam kom muaj PWM txuas ntxiv tab sis qhov no yuav txaus rau daim ntawv thov no.int A = A0;

int B = A1; pwm = 9; int c1 = 0; int c2 = 0; int c3 = 0; int c4 = 0; sib c5 = 0; int c6 = 0; int s1 = 0; int s2 = 0; int s3 = 0; int s4 = 0; int s5 = 0; int s6 = 0; ntab tawm = 0.00; int sin1 = 0; int cos1 = 0; int position_state = 1; int tau_position = 0; void teeb () {// muab koj cov cai teeb tsa ntawm no, kom khiav ib zaug: pinMode (pwm, OUTPUT); Serial.begin (115200); }

void voj () {

yog (get_position = 5) {cos1 = (c1+c2)-(c3+c4); sin1 = (s1+s2)-(s3+s4); cov zis = atan2 (cos1, sin1); c1 = 0; c2 = 0; c3 = 0; c4 = 0; s1 = 0; s2 = 0; s3 = 0; s4 = 0; Serial.print ("Txoj hauj lwm:"); Serial.println (tso tawm); tau_position = 1; }

// muab koj cov cai tseem ceeb ntawm no, kom rov ua dua:

}

Kauj Ruam 4: Kauj Ruam 3: Muaj Kev Lom Zem

Kauj Ruam 3: Muaj Kev Lom Zem
Kauj Ruam 3: Muaj Kev Lom Zem
Kauj Ruam 3: Muaj Kev Lom Zem
Kauj Ruam 3: Muaj Kev Lom Zem

Txaus siab rau tig tus neeg daws teeb meem thiab kawm paub tias tus daws teeb meem ua haujlwm li cas thiab daim ntawv thov twg koj tuaj yeem siv tus qauv daws teeb meem no.

Pom zoo: