Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use Hub Motor: Examples, Pinouts, and Specs

Image of Hub MotorDesign with Hub Motor in Cirkit Designer

Introduction

A hub motor is an electric motor integrated directly into the wheel hub of a vehicle, eliminating the need for external transmission systems. This design allows the motor to provide direct drive to the wheel, resulting in a compact and efficient solution for electric propulsion. Hub motors are widely used in electric bicycles, scooters, and other electric vehicles due to their simplicity, reliability, and ease of installation.

Explore Projects Built with Hub Motor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ESP32-Controlled Robotics Interface with AC Synchronous Motor and L298N H-Bridge: A project utilizing Hub Motor in a practical application
ESP32-Controlled Robotics Interface with AC Synchronous Motor and L298N H-Bridge

This circuit controls a set of MRB Planetary gearbox motors and an AC synchronous motor using an ESP32 microcontroller. The ESP32 interfaces with an L298N Dual H Bridge for motor control and a 1-Channel Relay to switch an AC bulb and the AC synchronous motor. A Mini AC-DC module provides 5V power to the ESP32, the relay, and the servo motor (MG996R), while the main power supply drives the L298N and the gearbox motors.

Open Project in Cirkit Designer
Image of Arduino and ESP32 Controlled Dual Motor Driver System: A project utilizing Hub Motor in a practical application
Arduino and ESP32 Controlled Dual Motor Driver System

This circuit features an Arduino UNO microcontroller interfaced with an H-bridge (ponte h) to control two MRB Planetary gearbox motors, allowing for bidirectional motor control. The Arduino is also connected to an ESP32 microcontroller for potential communication or additional processing capabilities. Power is supplied by a 12V battery connected to the H-bridge, which in turn powers the motors and the Arduino's 5V pin.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Below are the general technical specifications for a typical hub motor. Note that specific values may vary depending on the manufacturer and model.

General Specifications

Parameter Value
Motor Type Brushless DC (BLDC) or Brushed
Voltage Range 24V, 36V, 48V, or higher
Power Output 250W to 2000W (or more)
Torque 10 Nm to 100 Nm
Speed 200 RPM to 1000 RPM
Efficiency Up to 90%
Weight 2 kg to 10 kg (depending on size)

Pin Configuration and Descriptions

For a brushless hub motor, the wiring typically includes the following connections:

Pin/Wire Color Function Description
Yellow Phase A One of the three motor phase wires
Green Phase B One of the three motor phase wires
Blue Phase C One of the three motor phase wires
Red Hall Sensor Power (+5V) Supplies power to the Hall sensors
Black Hall Sensor Ground Ground connection for the Hall sensors
Yellow (thin) Hall Sensor A Outputs position feedback from Hall sensor A
Green (thin) Hall Sensor B Outputs position feedback from Hall sensor B
Blue (thin) Hall Sensor C Outputs position feedback from Hall sensor C

Note: Some hub motors may include additional wires for features like temperature sensors or electronic braking.

Usage Instructions

How to Use the Hub Motor in a Circuit

  1. Power Supply: Ensure the motor is connected to a power supply that matches its voltage and current requirements. For example, a 36V hub motor should be powered by a 36V battery pack.
  2. Motor Controller: Use a compatible motor controller to drive the hub motor. The controller manages the power delivery and interprets signals from the Hall sensors for smooth operation.
  3. Wiring: Connect the motor phase wires (Yellow, Green, Blue) to the corresponding outputs on the motor controller. Similarly, connect the Hall sensor wires to the controller's Hall sensor inputs.
  4. Throttle/Control Input: Attach a throttle or control input (e.g., potentiometer or Arduino) to the motor controller to regulate speed and direction.
  5. Testing: Before full operation, test the motor at low speeds to ensure proper wiring and functionality.

Important Considerations and Best Practices

Example: Controlling a Hub Motor with Arduino UNO

Below is an example of how to control a hub motor using an Arduino UNO and a motor controller.

// Example: Controlling a hub motor with Arduino UNO
// This code uses PWM to control motor speed via a motor controller.

// Define the PWM pin for motor speed control
const int motorPWM = 9; // Connect to the motor controller's PWM input

// Define the direction control pin
const int motorDir = 8; // Connect to the motor controller's direction input

void setup() {
  // Set the motor control pins as outputs
  pinMode(motorPWM, OUTPUT);
  pinMode(motorDir, OUTPUT);

  // Initialize motor direction to forward
  digitalWrite(motorDir, HIGH);
}

void loop() {
  // Gradually increase motor speed
  for (int speed = 0; speed <= 255; speed++) {
    analogWrite(motorPWM, speed); // Set motor speed (0-255)
    delay(20); // Wait for 20ms
  }

  // Gradually decrease motor speed
  for (int speed = 255; speed >= 0; speed--) {
    analogWrite(motorPWM, speed); // Set motor speed (0-255)
    delay(20); // Wait for 20ms
  }

  // Reverse motor direction
  digitalWrite(motorDir, LOW);
  delay(1000); // Wait for 1 second before repeating
}

Note: Ensure the motor controller supports PWM input and is compatible with the Arduino's 5V logic level.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Motor Does Not Spin

    • Cause: Incorrect wiring or loose connections.
    • Solution: Double-check all connections, especially the phase wires and Hall sensor wires.
  2. Motor Spins in the Wrong Direction

    • Cause: Phase wires are connected in the wrong order.
    • Solution: Swap any two of the three phase wires to reverse the motor's direction.
  3. Motor Overheats

    • Cause: Prolonged operation at high power or insufficient cooling.
    • Solution: Reduce the load on the motor or add external cooling (e.g., a fan).
  4. Jerky or Noisy Operation

    • Cause: Faulty Hall sensors or incorrect controller settings.
    • Solution: Test the Hall sensors and ensure the controller is configured for the correct motor type.
  5. Controller Does Not Respond

    • Cause: Incorrect throttle input or damaged controller.
    • Solution: Verify the throttle wiring and test the controller with a known working input.

FAQs