|
| 1 | +--- |
| 2 | +layout: default |
| 3 | +title: Mini v1.1 |
| 4 | +description: "Connecting SimpleFOCMini with your hardware." |
| 5 | +nav_order: 2 |
| 6 | +permalink: /mini_v11_connect_hardware |
| 7 | +parent: Connecting the hardware |
| 8 | +grand_parent: Starting with Mini |
| 9 | +grand_grand_parent: <span class="simple">Simple<span class="foc">FOC</span>Mini</span> |
| 10 | +grand_grand_grand_parent: <span class="simple">Simple<span class="foc">FOC</span> Boards</span> |
| 11 | +--- |
| 12 | + |
| 13 | +# Connecting the hardware to <span class="simple">Simple<span class="foc">FOC</span>Mini</span> v1.1 |
| 14 | + |
| 15 | +Connecting the <span class="simple">Simple<span class="foc">FOC</span>Mini</span> v1.1 to the microcontroller, BLDC motor and power-supply is very straight forward. |
| 16 | + |
| 17 | +<p> |
| 18 | +<img src="extras/Images/miniv11_where.png" class="width40"> |
| 19 | +</p> |
| 20 | + |
| 21 | +## Microcontroller |
| 22 | +- <span class="simple">Simple<span class="foc">FOC</span>Mini</span> v1.1 is designed as a standalone BLDC driver, which will basically work with any microcontroller. |
| 23 | +- This board has 11 pins exposed for the connection to the microcontroller |
| 24 | + |
| 25 | +<p> |
| 26 | +<img src="extras/Images/miniv11_req_opt.png" class="width30"> |
| 27 | +</p> |
| 28 | + |
| 29 | +There are 4 pins that are required to be connected: IN1, IN2, IN3 and EN. Additionally, the GND pin is required to be connected to the microcontroller's GND pin. <span class="simple">Simple<span class="foc">FOC</span>Mini</span> v1.1 has two GND pins exposed in first line of the header to make it easier to connect to the microcontroller. You can choose the one which is more convenient to your application. |
| 30 | + |
| 31 | +Pin Name | Description |
| 32 | +--- | --- |
| 33 | +GND | Ground (common ground) |
| 34 | +GND | Ground (common ground) |
| 35 | +EN | Driver Enable |
| 36 | +IN3 | PWM input phase 3 |
| 37 | +IN2 | PWM input phase 2 |
| 38 | +IN1 | PWM input phase 1 |
| 39 | + |
| 40 | +<blockquote class="warning"><p class="heading">BEWARE: pin order</p> |
| 41 | +Version v1.1 of the <span class="simple">Simple<span class="foc">FOC</span>Mini</span> has the order of the IN1,IN2,IN3 and EN changed with respect to the v1.0. |
| 42 | +</blockquote> |
| 43 | + |
| 44 | +These pins need to be connected whenever using the <span class="simple">Simple<span class="foc">FOC</span>Mini</span>. The 3 pwm pins and the enable pin are used to control the DRV8313 driver and in terms of the <span class="simple">Simple<span class="foc">FOC</span>library</span> 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 provide them to the `BLDCDriver3PWM` class in your Arduino sketch. |
| 45 | + |
| 46 | +```cpp |
| 47 | +BLDCDriver3PWM driver = BLDCDriver3PWM(IN1, IN2, IN3, EN); |
| 48 | +``` |
| 49 | + |
| 50 | +In addition to these pins there are 5 pins that are optional. |
| 51 | + |
| 52 | +Pin Name | Description |
| 53 | +--- | --- |
| 54 | +3.3V | 3.3V output - **NOT INPUT** |
| 55 | +GND | Ground |
| 56 | +nRT | Reset (active LOW) |
| 57 | +nSP | Sleep (active LOW) |
| 58 | +nFT | Fault output (active LOW) |
| 59 | + |
| 60 | +<span class="simple">Simple<span class="foc">FOC</span>Mini</span> 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 <span class="simple">Simple<span class="foc">FOC</span>Mini</span> can therefore be used as a 3.3v source pin with the maximum current output of 10mA. Both GND pins exposed in the <span class="simple">Simple<span class="foc">FOC</span>Mini</span>'s header are connected to the same ground, so you can choose the one which is more convenient to your application. |
| 61 | +<blockquote class="warning"><p class="heading">BEWARE: 3.3V LDO Power limitations</p> |
| 62 | +DRV8313 comes with the 3.3V voltage regulator and it is connected to the <span class="simple">Simple<span class="foc">FOC</span>Mini</span>'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. |
| 63 | +</blockquote> |
| 64 | + |
| 65 | +Pin `nFT` (fault) is an active LOW output of the <span class="simple">Simple<span class="foc">FOC</span>Mini</span> 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. |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | +## BLDC motor |
| 72 | +- Motor phases `a`, `b` and `c` are connected directly the motor terminal connector `M1`,`M2` and `M3` |
| 73 | + |
| 74 | +<blockquote class="warning"><p class="heading">BEWARE: Power limitations</p> |
| 75 | +<span class="simple">Simple<span class="foc">FOC</span>Mini</span> 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. <br> |
| 76 | +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. <br> |
| 77 | +For a bit more information about the choice of motors visit <a href="bldc_motors"> BLDC motor docs</a> |
| 78 | +</blockquote> |
| 79 | + |
| 80 | +## Power supply |
| 81 | +- Power supply cables are connected directly to the terminal pins `+` and `-` |
| 82 | +- Required power supply voltage is from 8V to 35V. |
| 83 | + |
| 84 | + |
| 85 | +## Examples of connection schematics |
| 86 | + |
| 87 | +<span class="simple">Simple<span class="foc">FOC</span>Mini</span> 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. |
| 88 | + |
| 89 | +### Nucleo board |
| 90 | +An example connection of the <span class="simple">Simple<span class="foc">FOC</span>Mini</span> and Nucleo board is shown on the image below. |
| 91 | + |
| 92 | +<img src="extras/Images/miniv11_connection_mucleo.png" class="width60"> |
| 93 | + |
| 94 | +<span class="simple">Simple<span class="foc">FOC</span>Mini</span> 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_example_nucleo). |
| 95 | + |
| 96 | +--- | --- | --- | ---| --- | --- |
| 97 | +Mini Pin | IN1 | IN2 | IN3 | EN | GND |
| 98 | +Nucleo Pin | 10 | 11 | 12 | 13 | GND |
| 99 | + |
| 100 | +```cpp |
| 101 | +BLDCDriver3PWM driver = BLDCDriver3PWM(10, 11, 12, 13); |
| 102 | +``` |
| 103 | + |
| 104 | +### Arduino UNO board |
| 105 | + |
| 106 | +An example connection of the <span class="simple">Simple<span class="foc">FOC</span>Mini</span> and Arduino UNO is shown on the image below. |
| 107 | +<img src="extras/Images/miniv11_connection_uno.png" class="width60"> |
| 108 | + |
| 109 | +<span class="simple">Simple<span class="foc">FOC</span>Mini</span> can be directly plugged into the Arduino headers of the UNO board from the pin `9` to the `12` pin and the GND pin connected to the Arduino's GND pin (skipping the pin 13). This stacking capability allows to reduce reduce the amount of wires necessary. For more information on this example connection see [this library example](mini_example). |
| 110 | + |
| 111 | +--- | --- | --- | ---| --- | --- |
| 112 | +Mini Pin | IN1 | IN2 | IN3 | EN | GND |
| 113 | +UNO Pin | 9 | 10 | 11 | 12 | GND |
| 114 | + |
| 115 | +```cpp |
| 116 | +BLDCDriver3PWM driver = BLDCDriver3PWM(9, 10, 11, 12); |
| 117 | +``` |
| 118 | + |
| 119 | +Another example of connecting the Arduino UNO with <span class="simple">Simple<span class="foc">FOC</span>Mini</span> is shown below |
| 120 | +<img src="extras/Images/miniv11_connection_uno2.png" class="width60"> |
| 121 | + |
| 122 | +--- | --- | --- | ---| --- | --- |
| 123 | +Mini Pin | IN1 | IN2 | IN3 | EN | GND |
| 124 | +UNO Pin | 5 | 6 | 9 | 12 | GND |
| 125 | + |
| 126 | +```cpp |
| 127 | +BLDCDriver3PWM driver = BLDCDriver3PWM(5, 6, 9, 12); |
| 128 | +``` |
| 129 | + |
| 130 | +### Bluepill board |
| 131 | + |
| 132 | +An example connection of the <span class="simple">Simple<span class="foc">FOC</span>Mini</span> and stm32 Bluepill is shown on the image below. The mini can be stacked on the bluepill headers directly from pin `PB6` to `PB9`, skipping the 5V pin and the GND pin connected to the Bluepill's GND pin. |
| 133 | +<img src="extras/Images/miniv11_connection_bluepill.png" class="width60"> |
| 134 | + |
| 135 | + |
| 136 | +--- | --- | --- | ---| --- | --- |
| 137 | +Mini Pin | IN1 | IN2 | IN3 | EN | GND |
| 138 | +Bluepill Pin | PB6 | PB7 | PB8 | PB9 | GND |
| 139 | + |
| 140 | +```cpp |
| 141 | +BLDCDriver3PWM driver = BLDCDriver3PWM(PB6, PB7, PB8, PB9); |
| 142 | +``` |
| 143 | + |
| 144 | +### Qtpy or Seed Xiao boards |
| 145 | + |
| 146 | +The simplest way of connecting the <span class="simple">Simple<span class="foc">FOC</span>Mini</span> to the Qtpy or Seed Xiao boards is as shown in the image below. The mini can be stacked on the Qtpy headers directly from pin `8` to `10`, using 3.3V pin for EN and the GND pin connected to the Qtpy's GND pin. |
| 147 | + |
| 148 | +<img src="extras/Images/miniv11_connection_qtpy.png" class="width60"> |
| 149 | + |
| 150 | +--- | --- | --- | ---| --- | --- |
| 151 | +Mini Pin | IN1 | IN2 | IN3 | EN | GND |
| 152 | +Qtpy Pin | 8 | 9 | 10 | 3.3V | GND |
| 153 | + |
| 154 | +```cpp |
| 155 | +BLDCDriver3PWM driver = BLDCDriver3PWM(8, 9, 10); |
| 156 | +``` |
| 157 | + |
| 158 | +<blockquote class="warning"><p class="heading">Note: Enable pin always high</p> |
| 159 | +With this connection setup there is no possibility to disable the driver using the `EN` pin. The driver will be always enabled. |
| 160 | +</blockquote> |
0 commit comments