

A hub motor is an electric motor integrated directly into the wheel hub of a vehicle, enabling direct drive to the wheel. This design eliminates the need for complex drivetrain components such as chains or belts, making it a highly efficient and compact solution. Hub motors are widely used in electric bicycles, scooters, and other lightweight electric vehicles due to their simplicity, reliability, and ease of installation.








Below are the general technical specifications for a typical hub motor. Note that specific values may vary depending on the model and manufacturer.
| Parameter | Description |
|---|---|
| Voltage Range | 24V - 72V (varies by model) |
| Power Rating | 250W - 2000W (common range) |
| Motor Type | Brushless DC (BLDC) or Brushed DC |
| Torque Output | 10 Nm - 50 Nm (depending on size) |
| Speed | 20 km/h - 60 km/h (varies by application) |
| Efficiency | Up to 90% |
| Weight | 3 kg - 10 kg (depending on size) |
Most hub motors, especially brushless DC (BLDC) motors, come with multiple wires for power, control, and feedback. Below is a typical pin configuration:
| Wire Color | Function | Description |
|---|---|---|
| Red | Power (+) | Positive terminal for motor power supply |
| Black | Power (-) | Negative terminal for motor power supply |
| Yellow | Phase A | Motor phase wire A |
| Green | Phase B | Motor phase wire B |
| Blue | Phase C | Motor phase wire C |
| White | Hall Sensor Signal 1 | Feedback signal from Hall sensor 1 |
| Yellow | Hall Sensor Signal 2 | Feedback signal from Hall sensor 2 |
| Green | Hall Sensor Signal 3 | Feedback signal from Hall sensor 3 |
| Black | Hall Sensor Ground | Ground for Hall sensors |
| Red | Hall Sensor Power (+5V) | Power supply for Hall sensors |
Note: The exact wire colors and functions may vary by manufacturer. Always refer to the datasheet or user manual for your specific hub motor.
Below is an example of controlling a hub motor using an Arduino UNO and a motor controller.
// Example code to control a hub motor using Arduino UNO
// This code assumes the motor controller uses a PWM signal for speed control
const int pwmPin = 9; // PWM pin connected to motor controller
const int dirPin = 8; // Direction pin connected to motor controller
void setup() {
pinMode(pwmPin, OUTPUT); // Set PWM pin as output
pinMode(dirPin, OUTPUT); // Set direction pin as output
// Initialize motor direction and speed
digitalWrite(dirPin, HIGH); // Set direction (HIGH = forward, LOW = reverse)
analogWrite(pwmPin, 0); // Start with motor off (0% duty cycle)
}
void loop() {
// Gradually increase motor speed
for (int speed = 0; speed <= 255; speed += 5) {
analogWrite(pwmPin, speed); // Set motor speed (0-255)
delay(100); // Wait 100ms
}
// Gradually decrease motor speed
for (int speed = 255; speed >= 0; speed -= 5) {
analogWrite(pwmPin, speed); // Set motor speed (0-255)
delay(100); // Wait 100ms
}
// Reverse motor direction
digitalWrite(dirPin, LOW); // Change direction to reverse
delay(1000); // Wait 1 second before repeating
}
Note: Ensure the motor controller is compatible with PWM signals and the Arduino's voltage levels.
Motor Does Not Spin
Motor Vibrates or Jerks
Overheating
No Response to Throttle
Can I use a hub motor without a controller?
What type of battery is best for a hub motor?
How do I determine the correct motor size for my application?
Can I use a hub motor for robotics projects?
By following this documentation, you can effectively integrate and operate a hub motor in your project.