Update readme: Add breakout board
This commit is contained in:
parent
fad3cf8f88
commit
695ed73150
BIN
Kicad/Breakout_DJI_Gimbal.png
Normal file
BIN
Kicad/Breakout_DJI_Gimbal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 369 KiB |
27
README.md
27
README.md
@ -2,19 +2,21 @@
|
||||
|
||||
The aim of this project is to be able to use the 3-axis DJI gimbal with a custom open source controller like [SimpleFOC](https://docs.simplefoc.com/). This high quality gimbal is very tiny and easy to find as a replacement part which makes it very suitable for DIY projects.
|
||||
|
||||
## Description
|
||||
|
||||

|
||||
<img src="docs/overview.jpg" height=250>
|
||||
<img src="docs/working.gif" height=250>
|
||||
|
||||
## Pinout identification
|
||||
The Gimbal is composed of a flex PCB with a main connector and 3 smaller for each motor. The main end connector is a 40-pin mezzanine board to board connectors. In order to work easily I have designed a breakout board which open to a 2.54" header.
|
||||

|
||||
|
||||
<img src="docs/setup.jpg" height=250>
|
||||
|
||||
Here is the strategy I followed to find the pinout:
|
||||
1. Find all equipotential pins with a multimeter set to continuity tests, and test all the combinations
|
||||
|
||||
2. Group remaining pins by motor With the multimeter find all the pins connected to the motor connector. (Reapeat 3 times for the other connectors)
|
||||
|
||||
<img src="Kicad/Breakout_DJI_Gimbal.png" height=500>
|
||||
|
||||
### Open-loop control
|
||||
|
||||
Each motor has its own drivers a MP6536. Which makes it easy as no additional hardware is necessary to drive the motors.
|
||||
@ -24,14 +26,14 @@ There are 4 pins from the MP6536:
|
||||
3. PWM3
|
||||
4. Fault : Output. When low, indicates overtemperature, over-current, or under-voltage.
|
||||
|
||||
Connected directly to a MCU and with the Simple FOC Library, open-loop control works quite well. However due to open-loop control, it cannot know when a "step" is missed so misalignment can occur. Also, the motor tends to become quite hot due to the continuous current sent to the coils.
|
||||
Connected directly to a MCU (here a STM32 Nucleo F401RE) and with the Simple FOC Library, open-loop control works quite well. However due to open-loop control, it cannot know when a "step" is missed so misalignment can occur. Also, the motor tends to become quite hot due to the continuous current sent to the coils.
|
||||
|
||||
## Position estimation with the integrated linear hall sensors
|
||||
|
||||
### 1. Setup
|
||||
Each motor is composed of two ratiometric linear hall sensors. (Texas Instrument DRV5053 Analog-Bipolar Hall Effect Sensor) They are placed at around 120º from each other (eyes measured) and measure the magnetic field of the rotor.
|
||||
|
||||

|
||||
<img src="docs/Hallmotor.jpg" height=300>
|
||||
|
||||
Ratiometric means that the output signal is proportional to the voltage supply to the sensor. In this setup, with 5V supply, the output measured is between 520mV and 1.5V, so a 1V amplitude.
|
||||
|
||||
@ -39,11 +41,12 @@ Ratiometric means that the output signal is proportional to the voltage supply t
|
||||
|
||||
These oscilloscope traces are the sensor output when rotating the rotor forth and back. (a bit less than 180º on the 3rd motor)
|
||||
The channel 0 (Yellow) is the Hall 1 and the Channel 1 (Green) is the Hall 2
|
||||

|
||||
<img src="docs/courbes.png" height=300>
|
||||
|
||||
We can see that in the first movement (positive rotation), the green is out of phase of π/2.`
|
||||
|
||||

|
||||
<img src="docs/cosSinEncoderDiagram.png" height=250>
|
||||
|
||||
### 3. Encoding the position
|
||||
1. Get the absolute angle within a period
|
||||
|
||||
@ -100,10 +103,8 @@ float dist_angle(float newAngle, float prevAngle) // return the difference modul
|
||||
To achive position control it is necessary to have first, a velocity controller well tuned, as they are in cascade. (SimpleFOC implementation and diagram)
|
||||

|
||||
|
||||
However, the motors of the gimbal have hard stop and can only rotate of around a half turn. It was so necessary to remove these mecanical stops. I drilled with a 1.6mm drill the two little holes to remove it. Then the motor was able to rotate freely.
|
||||

|
||||

|
||||
However, the motors of the gimbal have hard stop and can only rotate of around a half turn. It was so necessary to remove these mecanical stops. I drilled with a 1.6mm drill the two little holes to remove it. Then the motor was able to rotate freely and PID can be tuned.
|
||||
<img src="docs/drilling.jpg" height=250>
|
||||
<img src="docs/freeturn.gif" height=250>
|
||||
|
||||
## Working
|
||||
|
||||

|
Loading…
x
Reference in New Issue
Block a user