On this page
Connecting the hardware to SimpleFOCMini v1
Connecting the SimpleFOCMini to the microcontroller, BLDC motor and power-supply is very straight forward.
Microcontroller
- 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
Pin Name | Description |
---|---|
GND | Ground (common ground) |
IN1 | PWM input phase 1 |
IN2 | PWM input phase 2 |
IN3 | PWM input phase 3 |
EN | Driver Enable |
BEWARE: pin order
Version v1.1 of the SimpleFOCMini has the order of the IN1,IN2,IN3 and EN changed with respect to the v1.0.
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 INx
and 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.
Pin Name | Description |
---|---|
3.3V | 3.3V output - NOT INPUT |
GND | Ground |
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 limitations
DRV8313 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.
Pin 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.
BLDC motor
- Motor phases
a
,b
andc
are connected directly the motor terminal connectorM1
,M2
andM3
BEWARE: Power limitations
SimpleFOCMini 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
- Power supply cables are connected directly to the terminal pins
+
and-
- Required power supply voltage is from 8V to 35V.
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 IN1
,IN2
and IN3
pins, and one MCU’s digital pin is connected to the EN
pin.
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.
Mini Pin | EN | IN3 | IN2 | IN1 | GND |
Nucleo Pin | 10 | 11 | 12 | 13 | GND |
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.
Mini Pin | EN | IN3 | IN2 | IN1 | GND |
UNO Pin | 8 | 9 | 10 | 11 | 12 |
BLDCDriver3PWM driver = BLDCDriver3PWM(11, 10, 9, 8);
Another example of connecting the Arduino UNO with SimpleFOCMini is shown below
Mini Pin | EN | IN3 | IN2 | IN1 | GND |
UNO Pin | 4 | 5 | 6 | 9 | GND |
BLDCDriver3PWM driver = BLDCDriver3PWM(9, 6, 5, 4);
An example connection of the SimpleFOCMini and stm32 Bluepill is shown on the image below.
Mini Pin | EN | IN3 | IN2 | IN1 | GND |
Bluepill Pin | PB15 | PA8 | PA9 | PA10 | GND |
BLDCDriver3PWM driver = BLDCDriver3PWM(PA10, PA9, PA8, PB15);