Cov txheej txheem:

ESC Programming ntawm Arduino (Hobbyking ESC): 4 Cov Kauj Ruam
ESC Programming ntawm Arduino (Hobbyking ESC): 4 Cov Kauj Ruam

Video: ESC Programming ntawm Arduino (Hobbyking ESC): 4 Cov Kauj Ruam

Video: ESC Programming ntawm Arduino (Hobbyking ESC): 4 Cov Kauj Ruam
Video: Blue Robotics Tutorial: Controlling an ESC with an Arduino and a Potentiometer 2024, Hlis ntuj nqeg
Anonim
ESC Programming ntawm Arduino (Hobbyking ESC)
ESC Programming ntawm Arduino (Hobbyking ESC)

Nyob Zoo Zej Zog, Kuv yuav qhia koj, yuav ua li cas rau phiaj xwm thiab siv Hobbyking ESC. Kuv nyuam qhuav pom ob peb cov ntaub ntawv thiab cov lus qhia, uas tsis tau pab kuv ntau heev, yog li kuv txiav txim siab los teeb tsa tus kheej daim duab, uas yooj yim heev rau nkag siab. Ib qho tseem ceeb kom paub: * ESC txhais tau tias Kev Tswj Hluav Taws Xob * ESC muaj 5v (tsis siv), GND thiab teeb liab Pin zoo li Servo * Koj tswj nws zoo li Servo nrog sau () https://arduino.cc/de/Reference /ServoWrite * lossis writeMicroseconds https://arduino.cc/de/Reference/ServoWriteMicroseconds Hauv kuv qhov piv txwv kuv siv writeMicroseconds, vim nws nkag siab yooj yim dua. Yog li cia peb mus …

Kauj Ruam 1: Tau ESC Cov Ntaub Ntawv

Tau Txais Cov Ntaub Ntawv ESC
Tau Txais Cov Ntaub Ntawv ESC

Koj yuav tsum tau hais tiag Amperevalue ntawm koj li ESC. Cov ntawv qhia no tsuas yog sim ntawm 20 AMP ESC: https://www.hobbyking.com/hobbyking/store/_15202_hobby_king_20a_esc_3a_ubec.html Kuv tsis tuaj yeem cog lus tiag tiag, tias qhov no ua haujlwm nrog lwm ESC tab sis kuv xav li ntawd, vim tias hauv phau ntawv txhais lus Askiv yog 20 thiab 30 Amp ESC qhov tau piav qhia. Hauv German version yog qhov dav dav ntawm 10 txog 120 Amp, yog vim li cas kuv xav tias qhov no tuaj yeem ua haujlwm rau txhua ESC. Tau qhov twg los: German: https://tom-620.bplaced.net/rc_modelle/zubehoer/regler/hobby_king/hk_80A_regler_deutsch.pdf Lus Askiv:

Kauj ruam 2: Kev sib txuas rau Arduino

Kev sib txuas rau Arduino
Kev sib txuas rau Arduino

Kuv sim nws nrog arduino uno R3. Kuv xav tias nws tseem ua tau nrog tus piv txwv arduino Duemilanove lossis Mega. Ua ntej koj yuav tsum txuas ESC rau koj lipo lossis NiMH. Thaum koj tau ua tiav uas koj txuas ESC zoo li no: * Dub rau GND * Dawb/Daj rau PIN 9 Vim tias koj txuas ESC rau koj lub roj teeb, ESC raug tso rau hauv qhov hluav taws xob. Tias yog vim li cas nws yog qhov tseem ceeb, uas koj TSIS TXAUS SIAB txuas lub xov tooj liab rau koj 5v Port, vim tias nws tuaj yeem rhuav tshem koj lub computer USB Port. Ntawm daim duab no koj tuaj yeem pom qhov kev sib txuas raug ntawm ESC thiab Arduino (Mega). Daim duab qhov chaw:

Kauj ruam 3: Upload Sketch

Rub tawm Sketch
Rub tawm Sketch

Tsuas yog theej thiab muab cov Cai no tso rau hauv koj li IDE: /* Coded los ntawm Marjan Olesch Sketch los ntawm Insctructables.com Qhib qhov chaw - ua qhov koj xav tau nrog tus lej no! */ #include int tus nqi = 0; // teeb tsa qhov tseem ceeb koj xav tau xoom Servo firstESC, secondESC; // Tsim kom ntau li Servoobject koj xav tau. Koj tuaj yeem tswj 2 lossis ntau dua Servos tib lub sijhawm tsis muaj teeb tsa () {firstESC.attach (9); // txuas rau tus pin 9 Kuv tsuas yog ua qhov no nrog 1 Servo Serial.begin (9600); // pib ua ntu zus ntawm 9600 baud} void loop () {// Ua ntej txuas koj li ESC yam tsis muaj caj npab. Tom qab ntawd Qhib Serial thiab cov lus qhia ua ntej EESC.writeMicroseconds (tus nqi); yog (Serial.available ()) tus nqi = Serial.parseInt (); // Txheeb cais tus lej ntawm Serial}

Kauj Ruam 4: Nkag Siab thiab Ua Haujlwm ESC

Nkag siab thiab Ua Haujlwm ESC
Nkag siab thiab Ua Haujlwm ESC

ESC yog programable zoo li IC's lossis txawm tias koj li Arduino. Koj tsuas yog tsis muaj lus rau program, tab sis cov ntawv qhia ua suab. Txhawm rau los hauv cov ntawv qhia zaub mov no, uas ua haujlwm tsis tu ncua btw koj tsuas yog yuav tsum ua raws cov kauj ruam hauv qab no: * Txuas koj li ESC * Kho tus lej (ntau npaum li ESC koj muaj thiab Pin-teeb tsa) * Koj yuav tsum tsis hnov dab tsi, vim tias Arduino xa xoom * Qhib koj li Serial Monitor thiab xa '2000'. nws txhais tau tias Qhov Siab Tshaj Plaws ESC tuaj yeem tau txais * Koj yuav hnov lub suab uas tau piav qhia hauv daim duab (Source: Manual: https://www.hobbyking.com/hobbyking/store/uploads/811103388X7478X20.pdf) Hobbyking ESC tuaj yeem ua tau tau txais Qhov Teeb Meem ntawm 700 thiab 2000 peb (microseconds). 700 txhais tau tias kaw qhov chaw ntawm qis tshaj thiab 2000 ntawm Txoj Haujlwm Siab Tshaj. Yog tias koj xav paub dab tsi raws nraim koj li, thaum koj xaiv cov ntawv qhia zaub mov mus ntsib phau ntawv qhia. Piv txwv: - Sau 2000 peb - Tos kom txog thaum DDDD xaiv lipo li roj teeb - Thaum nws tshwm sim, sau ntawm qhov thib peb 'D' 700 hauv koj li Serial (ncua sijhawm luv, yog vim li cas koj thiaj li yuav tsum xa nws mus rau qhov thib peb 'D') - ESC yuav ua suab nrov, thiab Kev Xaiv raug xaiv. Kuv vam tias kuv tuaj yeem pab koj nrog qhov kev qhia no.

Pom zoo: