Connecting the hardware
Connecting the SimpleFOCMini to the microcontroller, BLDC motor and power-supply is very straight forward.
- SimpleFOCMini is designed as a standalone BLDC driver, which will basically work with any microcontroller.
- This board has 10 pins exposed for the connection to the microcontroller
There are 5 pins that are required to be connected
|GND||Ground (common ground)|
|IN1||PWM input phase 1|
|IN2||PWM input phase 2|
|IN3||PWM input phase 3|
These pins need to ba connected whenever using the SimpleFOCMini. The 3 pwm pins and the enable pin are used to control the DRV8313 driver and in terms of the SimpleFOClibrary they correspond to the entries of the
BLDCDriver3PWM class. The common ground pin is very important as well in order to make sure that all the PWM and Enable pins are read properly by the driver chip. Once you decide which pins you will be using for
EN pins you will be able to porvide them to the
BLDCDriver3PWM class in your Arduino sketch.
BLDCDriver3PWM driver = BLDCDriver3PWM(IN1, IN2, IN3, EN);
In addition to these pins there are 5 pins that are optional.
|3.3V||3.3V output - NOT INPUT|
|nRT||Reset (active LOW)|
|nSP||Sleep (active LOW)|
|nFT||Fault output (active LOW)|
SimpleFOCMini is based on the DRV8313 driver which has integrated 3.3V regulator which might be useful in some applications to power a sensor or similar. The 3.3v pin of the SimpleFOCMini can therefore be used as a 3.3v source pin with the maximum current output of 10mA. Both GND pins exposed in the SimpleFOCMini’s header are connected to the same ground, so you can choose the one which is more convenient to your application.
BEWARE: 3.3V LDO Power limitationsDRV8313 comes with the 3.3V voltage regulator and it is connected to the SimpleFOCMini's 3.3V pin. However it has a limitation of 10mA, which is in general not enough to power a microcontroller. But it might be enough to power a LED light or some position sensors.
nFT (fault) is an active LOW output of the SimpleFOCMini which can be read to verify if the DRV8313 driver is working properly. If this pin is in LOW it means the DRV8313 is its fault state and it cannot drive the motor. Then the pin
nRT (reset), which is also active LOW, can be used to reset the DRV8313 driver to reinitialise its internal state and exit the fault state, this cannot be done by simply toggling the enable pin. Finally the pin
nSP (sleep) is an active LOW pin that puts the DRV8313 in the low-power sleep mode, consuming the current of under 1uA.
- Motor phases
care connected directly the motor terminal connector
BEWARE: Power limitationsSimpleFOCMini is designed for gimbal motors with internal resistance higher than R>10Ohm. The absolute maximal current of this board is 5A. Please make sure when using this board in your projects that the BLDC motor used does comply with these limits.
If you still want to use this driver with the BLDC motors with very low resistance R < 1Ohm make sure to limit the voltage set to the board.
For a bit more information about the choice of motors visit BLDC motor docs
- Power supply cables are connected directly to the terminal pins
- Required power supply voltage is from 8V to 24V.
Examples of connection schematics
SimpleFOCMini can be connected to any microcontroller (MCU) pin combination that can ensure that the mini’s
GND pin is connected to the MCU’s
GND pin, MCU’s 3 pwm capable pins are connected to the
IN3 pins, and one MCU’s digital pin is connected to the
An example connection of the SimpleFOCMini and Nucleo board is shown on the image below.
SimpleFOCMini can be directly plugged into the Arduino headers of teh Nucleo board from the pin
10 to the
GND pin and in that way reduce the amount of wires necessary. For more information on this example connection see this library example.
BLDCDriver3PWM driver = BLDCDriver3PWM(13, 12, 11, 10);
An example connection of the SimpleFOCMini and Arduino UNO is shown on the image below.
SimpleFOCMini can be directly plugged into the Arduino headers of the UNO board from the pin
8 to the
12 pin (pin 12 can act as a GND pin) and in that way reduce the amount of wires necessary. For more information on this example connection see this library example.
BLDCDriver3PWM driver = BLDCDriver3PWM(11, 10, 9, 8);
Another example of connecting the Arduino UNO with SimpleFOCMini is shown below
BLDCDriver3PWM driver = BLDCDriver3PWM(9, 6, 5, 4);
An example connection of the SimpleFOCMini and stm32 Bluepill is shown on the image below.
BLDCDriver3PWM driver = BLDCDriver3PWM(PA10, PA9, PA8, PB15);