Home > other >  Non-inductive BLDC simple experimental motors
Non-inductive BLDC simple experimental motors

Time:04-30

the BLDC drive motors to see at ordinary times on the hardware and software is complex, is not conducive to the small white hands-on experiments, in order to simplify the non-inductive BLDC drive motors test, also in order to reduce costs, made a non-inductive BLDC experimental motors, welcome advice or clap brick!
Hardware:
ESP32 DEV - MODULE (CPU should use STM32F103C8T6, lower cost)
MX1508
Camera platform with brushless motor (non-inductive)
Power
A software program is as follows:
//testBldcEsp32. Ino
//ESP32 connection GPIO13 GPIO2 the feet
#include
ESP32PWM PWM.
Byte ledPin=2, sequence=0, plusPin=13, tri1=17, 18, tri2=tri3=19;
Int pwmFreq=120;//start pulse frequency, on-demand adjustment
Float dutyRatio=0.5;//pulse duty ratio

Void bldcRun () {
Sequence++;//three-phase coil electricity order
PwmFreq++;//run the pulse frequency
If (pwmFreq & gt; PwmFreq - 165);//run the pulse frequency, on-demand adjustment
}

Void switchRun (byte I) {
If (sequence & gt; 6) sequence=1;
The switch (I) {//1 h, 2 l, 3 h, 1 l, 2 h, 3 l
Case 1: digitalWrite (tri1, HIGH); break;
Case 2: digitalWrite (tri2, LOW); break;
Case 3: digitalWrite (tri3, HIGH); break;
Case 4: digitalWrite (tri1, LOW); break;
Case 5: digitalWrite (tri2, HIGH); break;
Case 6: digitalWrite (tri3, LOW); break;
}
PWM. AdjustFrequency (pwmFreq);
}

Void setup () {
PinMode (tri1, the OUTPUT);//MX1508 - A1
PinMode (tri2, the OUTPUT);//MX1508 - A2
PinMode (tri3, the OUTPUT);//MX1508 - B1
PWM. AttachPin (ledPin pwmFreq, 10);//PWM generator
PWM. WriteScaled (dutyRatio);
AttachInterrupt (plusPin bldcRun, CHANGE);//caused by PWM pulse external interrupt
}

Void loop () {switchRun (sequence); }
//pwmFreq (Max)=25 KHZ to 8.333 KHZ/trix

CodePudding user response:

How to determine the initial position?

CodePudding user response:

Non-inductive, so do not judge, also need not judgment, have simple boot slow start function, need according to the power supply voltage and debugging motor characteristics such as actual situation decision, see "starting pulse frequency, according to the need to adjust,"
  • Related