The Simple Field Oriented Control (FOC) Shield is a versatile circuit board designed to drive brushless DC (BLDC) motors with high efficiency and precision. It leverages Field Oriented Control (FOC) algorithms to achieve smooth and accurate motor control, making it ideal for applications requiring precise motion, such as robotics, drones, and industrial automation.
This shield is compatible with popular microcontrollers, such as the Arduino UNO, and provides features like current sensing, PWM control, and communication interfaces for seamless integration. Its compact design and ease of use make it a popular choice for both hobbyists and professionals.
The Simple FOC Shield is designed to work with a wide range of BLDC motors and microcontrollers. Below are its key technical details:
Parameter | Value |
---|---|
Input Voltage Range | 6V to 24V |
Maximum Current | 10A per motor phase |
Supported Motors | 3-phase BLDC motors |
Communication Interfaces | I2C, UART, SPI |
PWM Frequency | Up to 20 kHz |
Current Sensing | 2-phase inline sensing |
Microcontroller Support | Arduino UNO, STM32, ESP32 |
The Simple FOC Shield features a standard pinout for easy connection to microcontrollers. Below is the pin configuration:
Pin Name | Description |
---|---|
VIN | Input voltage (6V to 24V) |
GND | Ground |
PWM1 | PWM signal for motor phase 1 |
PWM2 | PWM signal for motor phase 2 |
PWM3 | PWM signal for motor phase 3 |
CS1 | Current sense for motor phase 1 |
CS2 | Current sense for motor phase 2 |
EN | Enable pin to activate the motor driver |
SDA | I2C data line |
SCL | I2C clock line |
TX | UART transmit |
RX | UART receive |
Connect the Shield to a Microcontroller:
Connect the BLDC Motor:
Power the Shield:
Program the Microcontroller:
Test the Setup:
Below is an example of how to use the Simple FOC Shield with an Arduino UNO to control a BLDC motor:
#include <SimpleFOC.h> // Include the SimpleFOC library
// Define motor and driver objects
BLDCMotor motor = BLDCMotor(7); // Motor with 7 pole pairs
BLDCDriver3PWM driver = BLDCDriver3PWM(9, 10, 11); // PWM pins for motor phases
void setup() {
// Initialize the driver
driver.voltage_power_supply = 12; // Set power supply voltage
driver.init();
// Link the driver to the motor
motor.linkDriver(&driver);
// Set motor parameters
motor.voltage_limit = 6; // Limit motor voltage to 6V
motor.controller = ControlType::velocity; // Velocity control mode
// Initialize the motor
motor.init();
// Set initial target velocity
motor.target = 2; // Target velocity in rad/s
}
void loop() {
// Run the motor control loop
motor.loopFOC(); // Field Oriented Control algorithm
motor.move(); // Move the motor to the target velocity
}
SimpleFOC
library is installed in your Arduino IDE.voltage_power_supply
and target
values based on your motor and application.Motor Not Spinning:
Overheating:
Erratic Motor Behavior:
Communication Issues:
Q: Can I use the Simple FOC Shield with a stepper motor?
A: No, the Simple FOC Shield is designed specifically for 3-phase BLDC motors. For stepper motors, use a dedicated stepper motor driver.
Q: What is the maximum motor speed supported?
A: The maximum speed depends on the motor's specifications and the PWM frequency. Ensure the motor's voltage and current ratings are not exceeded.
Q: Can I use a 5V power supply with the shield?
A: No, the minimum input voltage for the shield is 6V. Using a lower voltage may result in unstable operation or damage.
Q: Is the shield compatible with Raspberry Pi?
A: Yes, the shield can be used with Raspberry Pi, but additional wiring and configuration may be required to interface the GPIO pins.
By following this documentation, you can effectively use the Simple FOC Shield to control BLDC motors with precision and efficiency.