R2D2 - Arduino BLDC Motor Controller Wiring Guide
https://gemini.google.com/share/0786982a41ea
This is a common project for robotics and EV builds. Based on the specs ("6-60V 400W"), you likely have the ZS-X11D1 (or a generic clone), which is the standard driver for this voltage range.
Here is how to connect it to a hoverboard motor and an Arduino.
1. The Hardware Layout
First, identify the pin groups on your driver board. They are usually grouped into three terminal blocks/headers:
-
Power Input:
VCC(+),GND(-) -
Motor Phases:
MA,MB,MC(or U, V, W) -
Hall Sensors:
Ha,Hb,Hc,5V,GND -
Control Pins:
5V,GND,VR(Speed),ZF(Direction),EL(Enable/Stop),Signal(Tachometer)
2. Wiring Diagram
A. Motor to Driver Board
Hoverboard motors have 3 thick phase wires and 5 thin Hall sensor wires. The color coding is usually standard but can vary. Start with "color-to-color" matching.
| Motor Wire | Driver Terminal | Function |
| Thick Yellow | MA (or U) | Phase A |
| Thick Green | MB (or V) | Phase B |
| Thick Blue | MC (or W) | Phase C |
| Thin Red | 5V | Hall Power |
| Thin Black | GND | Hall Ground |
| Thin Yellow | Ha | Hall A |
| Thin Green | Hb | Hall B |
| Thin Blue | Hc | Hall C |
Critical Note: If the motor vibrates, makes a grinding noise, or gets hot without spinning, the Phase Sequence is wrong. You must swap the phase wires (MA/MB/MC) until you find the combination that runs smoothly. There are 6 possible combinations; only one works perfectly.
B. Driver Board to Arduino
You need to share a common Ground (GND) between the Arduino and the driver, or signals won't work.
| Driver Pin | Arduino Pin | Notes |
| GND | GND | Essential. Must connect Arduino GND to Driver GND. |
| VR | Pin 9 (PWM) | Speed Control. |
| ZF (or DIR) | Pin 8 | Direction (High = CW, Low = CCW). |
| EL (or STOP) | Pin 7 | Enable (Low = Run, High = Stop/Brake). |
| 5V | Do Not Connect | The driver generates its own 5V. Don't feed 5V back to Arduino. |
C. Power Supply
-
Connect your battery (e.g., 24V or 36V) to the driver's VCC and GND terminals.
-
Warning: Double-check polarity. Reversing VCC/GND will instantly destroy the board.
3. Setup Requirements
Before running code, you must configure the board to accept Arduino control instead of using the onboard knob:
-
Potentiometer: If your board has a built-in blue potentiometer, turn it all the way to the minimum (usually counter-clockwise). If you leave it halfway, it interferes with the Arduino signal.
-
Jumper: Some versions of this board have a jumper labeled "PWM/Analog." If present, move it to the PWM position. If there is no jumper, the
VRpin usually accepts 0-5V analog voltage automatically.
4. Arduino Code
This sketch allows you to control speed via the Serial Monitor (0-255) and direction.
C++
// Pin Definitions
const int speedPin = 9; // Connect to VR
const int dirPin = 8; // Connect to ZF
const int enablePin = 7; // Connect to EL (optional, some boards invert this)
void setup() {
Serial.begin(9600);
pinMode(speedPin, OUTPUT);
pinMode(dirPin, OUTPUT);
pinMode(enablePin, OUTPUT);
// Initial State
digitalWrite(enablePin, LOW); // LOW usually enables the motor on these boards
digitalWrite(dirPin, LOW); // Set initial direction
analogWrite(speedPin, 0); // Stop motor
Serial.println("System Ready. Enter speed (0-255):");
}
void loop() {
if (Serial.available() > 0) {
int speed = Serial.parseInt(); // Read number from Serial Monitor
// Safety constraint
if (speed >= 0 && speed <= 255) {
Serial.print("Setting speed to: ");
Serial.println(speed);
analogWrite(speedPin, speed);
}
}
}
5. Troubleshooting
-
Motor Jitters/Stalls: As mentioned, this is almost always incorrect Phase wiring. Swap the Green and Blue thick wires on the
MBandMCterminals and try again. -
Motor doesn't move: Check the EL (Enable) pin logic. Some boards need this pin grounded to run; others need 5V. Try connecting EL directly to GND.
-
Speed is 100% instantly: Ensure the onboard potentiometer is turned to zero.
Next Step
Would you like me to help you map out the specific color combinations for the phase wires if the standard color-matching doesn't work?
RioRand 400W Brushless Motor Controller Demo
This video demonstrates the specific ZS-X11D1 driver board you likely have, showing the physical connections for the Hall sensors and phase wires which can be tricky to identify on generic boards.

redclip 님의 최근 댓글