The firmware provides an Arduino compatible, or specifically the ATMEGA32u4 AVR micro controller, trapezoidal control of brushless DC (BLDC) motors using Hall Effect sensors. Most important it's all open-source.
Specific features are discussed below:
Motor Configuration
- Configurable motor poles (MOTOR_POLES).
- Configurable switching frequency for MOSFET gate signals (TIM4_FREQ).
- Adjustable dead time between switching actions (DEAD_TIME).
- Option to enable or disable internal pull-up resistors on hall sensor inputs (HALL_PULLUP_ENABLE).
- Motor emulation capability by generating hall effect sensor inputs (EMULATE_HALL).
- Configurable electrical rotational frequency for emulated motor (TIM3_FREQ).
- Threshold for determining when the motor is considered stopped (COMMUTATION_TICKS_STOPPED).
- Selectable turn-off mode (coast or brake) (TURN_OFF_MODE).
Drive Controls
- Slow ramp up or down when turning on the motor or changing the speed reference input. (Not when turning it off as this depends on the turn-off mode.)
- Set the direction of rotation of the motor using input buttons.
- Enable/disable the motor using input buttons.
- Easily set a duty cycle or speed based on choice of speed control.
Current Monitor
Speed Control
SCPI Implementation
- Implementation of SCPI protocol for remote control and communication.
- Definable SCPI input buffer length, error queue size, and command strings.
- Implementation of SCPI commands for motor control, error handling, and system information.
- SCPI commands for measuring motor speed, current, direction, and gate voltage.
- Commands for querying motor enable state, direction, and configuration.
Error Handling and Reporting
- Flags to store motor state and error reporting (motorFlags, faultFlags).
- Fault LEDs to indicate faults.
- Detect if inverter board is attached or not.
- SCPI command for retrieving errors from the error queue ( SYSTem:ERRor[:NEXT]?).
Documentation and Support
- Complete documentation of project.
- Links to external SCPI parser library and support page.
- User manual for board level documentation.