Cov txheej txheem:
- Kauj Ruam 1: Qhov Chaw
- Kauj Ruam 2: Txuas Qhov Chaw Ua Ke
- Kauj Ruam 3: Tshaj Tawm thiab Hloov Kho Txoj Cai rau Qhov Koj Nyiam
- Kauj Ruam 4: Txheeb Xyuas Yog Nws Ua Haujlwm
Video: Yooj Yim Tshaj Plaws Arduino VESC Saib: 4 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Nyob zoo, hauv txoj haujlwm no peb yuav ua tus saib xyuas VESC yooj yim. Qhov no yuav muaj txiaj ntsig thaum koj xav tshuaj xyuas koj qhov kub thiab nrhiav teeb meem zoo li kuv tau nrog kuv lub Vesc overheating (uas kuv pom tawm tsuas yog nrog lub ntsuas no) lossis koj tuaj yeem siv nws yooj yim rau txuas cov zaub rau koj lub rooj tsavxwm lossis tus tuav tes thiab saib koj qhov nrawm, mais, roj teeb feem pua thiab ntau ntxiv. Yog li cia peb mus rau hauv tsev!
Kauj Ruam 1: Qhov Chaw
1. - Arduino (Kuv tab tom siv UNO tab sis koj tseem tuaj yeem siv lwm lub rooj tsavxwm suav nrog esp8266 lossis esp32)
2. - qee qhov txuas rau txuas (sim nrhiav qhov txuas rau koj tus txuas rau vesc vim tias nws yuav yooj yim dua rau tshem tawm 1 qhov txuas loj vs. ntau ntawm cov kab me me)
3. - zaub (Kuv siv 124 x 32 Oled tab sis koj tuaj yeem siv lwm yam los ntawm kev hloov lub tsev qiv ntawv)
4. - xaiv tau - lub thawv ntawv (qhov no yog rau cov neeg uas tsis xav tau cov laug los yog rau cov uas xav ua nws ib ntus)
5. - USB cable rau koj arduino
Kauj Ruam 2: Txuas Qhov Chaw Ua Ke
zaub: Vcc rau 3.3V
Gnd rau Gnd
Sck (lossis scl) rau A5
S4 to AW
VESC: 5V los ntawm Vesc rau Vin ntawm Arduino
Gnd rau Gnd
RX ntawm VESC rau TX ntawm Arduino
TX ntawm VESC rau RX ntawm Arduino
Kauj Ruam 3: Tshaj Tawm thiab Hloov Kho Txoj Cai rau Qhov Koj Nyiam
CODE:
/** 2020 tus lej los ntawm Lukas Janky VESC saib nrog Oled zaub Yog tias koj xav tau nug kuv dab tsi, hu rau kuv ntawm [email protected] lossis ntawm kuv cov lus qhia. Kuv vam tias qhov no yuav pab koj.
*/
#include #include #include #include #include #include #include #define SCREEN_WIDTH 128 #define SCREEN_HEIGHT 64 #define OLED_RESET 4 Adafruit_SSD1306 zaub (SCREEN_WIDTH, SCREEN_HEIGHT, & Hlau, OLED_RESET);
VescUart UART;
ib rpm;. ntab voltage; ntab tam sim no; int zog; ntab amphour; ntab ntab; ntab nrug; ntab tshaj tawm; float koj; ntab batpercentage;
SimpleKalmanFilter Filter1 (2, 2, 0.01);
void teeb tsa () {
Serial.begin (115200); display.begin (SSD1306_SWITCHCAPVCC, 0x3C); display.fillScreen (0); display.display ();
/ ** Teeb UART chaw nres nkoj (Serial1 ntawm Atmega32u4)*/ // Serial1.begin (19200); thaum (! Serial) {;}
/ ** Txhais qhov chaw nres nkoj twg los siv ua UART*/ UART.setSerialPort (& Serial);
}
void voj () {
////////// Nyeem qhov tseem ceeb ////////// yog (UART.getVescValues ()) {
rpm = (UART.data.rpm)/7; // Tus '7' yog tus naj npawb ntawm tus ncej nyob hauv lub cav. Cov motors feem ntau muaj 14 tus ncej, yog li ntawd 7 tus ncej khub voltage = (UART.data.inpVoltage); tam sim no = (UART.data.avgInputCurrent); hwj chim = voltage*tam sim no; amphour = (UART.data.ampHours); watthour = amphour*qhov hluav taws xob; tach = (UART.data.tachometerAbs)/42; // Tus '42' yog tus naj npawb ntawm lub cev muaj zog ncej sib npaug 3 nrug = tach*3.142*(1/1609)*0.72*(16/185); // Motor RPM x Pi x (1/ meters in a mile or km) x Log diameter x (motor pulley/ wheelpulley) nrawm = rpm*3.142*(60/1609)*0.72*(16/185); // Tsav RPM x Pi x (vib nas this hauv ib feeb / meters hauv ib mais) x Log txoj kab x (lub cev muaj zog rub / lub log log) batpercentage = ((voltage-38.4) / 12)*100; // ((Roj teeb hluav taws xob - qhov tsawg kawg nkaus voltage) / tus naj npawb ntawm cov cell) x 100
}
////////// Lim ////////// // xam tus nqi kwv yees nrog Kalman Lim ntab powerfiltered = Filter1.updateEstimate (lub zog);
display.fillScreen (0); display.setCursor (10, 5); display.setTextColor (1); display.setTextSize (1); display.print (qhov hluav taws xob);
display.setCursor (10, 20); display.setTextColor (1); display.setTextSize (1); display.print (hwj chim);
display.setCursor (10, 40); display.setTextColor (1); display.setTextSize (1); display.print (rpm);
display.setCursor (10, 55); display.setTextColor (1); display.setTextSize (1); display.print (tam sim no); display.display ();
ncua (50);
}
Koj tuaj yeem hloov kho thiab tso tawm ib qho txiaj ntsig los ntawm cov cai uas koj xav tau
Kauj Ruam 4: Txheeb Xyuas Yog Nws Ua Haujlwm
Tam sim no thaum koj txheeb xyuas seb nws puas ua haujlwm yog lub sijhawm rau siv nws thiab ntxiv cov ntawv lo rau koj qhov txiaj ntsig zoo li Volts lossis Amps. Solder nws ntawm arduino nano yog li nws yuav me dua lossis koj tseem tuaj yeem xa nws nrog lwm cov arduino rau koj lub chaw taws teeb tswj. tab sis rau qhov ntawd muaj ntau lwm yam kev qhia (tshawb nrhiav qhov tseem ceeb nrog arduino). Kuv vam tias qhov no tau pab koj daws koj cov teeb meem lossis ua kom zoo me me vesc telemetry.
Pom zoo:
ZOO TSHAJ PLAWS USB JOYSTICK - YOOJ YIM ZOO TSHAJ PLAWS: 5 Kauj Ruam
ZOO TSHAJ PLAWS USB JOYSTICK - AUTO ANALOGUE MODIFICATION: Nov yog qhov haujlwm ntxiv rau Zero Delay USB Encoder True Analog Joystick Modification. Koj yuav tsum tau ua tiav hloov kho, sim thiab ntsuas ntsuas tus lej nkag rau hauv qhov haujlwm yav dhau los ua ntej ntxiv cov cuab yeej no. Thaum ua tiav thiab ua haujlwm nws
D.I.Y YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM LOS NTAWM SCRAPS: 4 Cov Kauj Ruam (nrog Duab)
D.I.Y YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM LOS NTAWM SCRAPS: Hnub no kuv xav qhia yuav ua li cas kom pom lub teeb pom kev zoo los ntawm lub zog xa hluav taws xob tsis siv hluav taws xob los ntawm tus txhuam txhuam hniav thiab lub tshuab solenoid valve coils uas tau khaws los ntawm scrapyard.Ua ntej pib, thov saib cov vis dis aus hauv qab no:
Txoj Kev Yooj Yim Tshaj Plaws Tshaj Plaws rau Microcontroller!: 9 Kauj Ruam
Txoj Kev Yooj Yim Tshaj Plaws rau Txoj Haujlwm Microcontroller!: Koj puas txaus siab hauv kev muaj lub microcontroller uas siv lub zog tsawg dua? Hnub no, Kuv yuav qhia koj paub txog STM32 Ultra Low Power - L476RG, uas siv 4 lub zog tsawg dua li Arduino Mega thiab muaj lub zog ua haujlwm Cortex. Kuv tseem yuav
YUAV UA LI CAS YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM TSHAJ PLAWS YOOJ YIM: 4 Cov Kauj Ruam
YUAV UA LI CAS YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM TSHAJ PLAWS: Nyob zoo txhua tus hauv cov lus qhia no kuv yuav qhia koj yuav ua li cas kom yooj yim " SOIL DRYNESS SENSOR ". Qhuav ntawm cov av tau txheeb xyuas siv qhov taw qhia coj. Lub teeb ci wi
YOOJ YIM YOOJ YIM TSHAJ PLAWS COMPACT LIGHT !! 3 KAUJ RUAM YOOJ YIM !!: 3 Kauj Ruam
YOOJ YIM YOOJ YIM TSHAJ PLAWS COMPACT LIGHT !! 3 KAUJ RUAM YOOJ YIM !!: Koj Yuav Tsum Tau Li Cas - Tin ntawv ci 1 AA roj teeb (qee lub roj teeb AAA yuav ua haujlwm) 1 Mini Lub Teeb Pom Kev (lub teeb siv rau feem ntau lub teeb nyem; xa mus rau daim duab) Tus Tswj (yog xav tau)