diff --git a/README.md b/README.md index 6ae3f99..f561d1c 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,14 @@ # DJI Gimbal FOC -The aim of this project is to be able to use the 3-axis DJI gimbal with a custom open source controller. This high quality gimbal is very tiny and easy to find as replacement part which makes it very suitable for DIY projects. +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 -todo +![](docs/overview.jpg) ## 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. - - +![Setup](docs/setup.jpg) 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 @@ -97,3 +96,9 @@ float dist_angle(float newAngle, float prevAngle) // return the difference modul ``` +## Tuning the PIDs +To achive position control it is necessary to have first, a velocity controller well tuned, as they are in cascade. (SimpleFOC implementation and diagram) +![Closed loop position diagram from SimpleFOC](docs/angle_loop_v.png) + +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. +![Drilling](docs/drilling.jpg) \ No newline at end of file diff --git a/docs/angle_loop_v.png b/docs/angle_loop_v.png new file mode 100644 index 0000000..137481a Binary files /dev/null and b/docs/angle_loop_v.png differ diff --git a/docs/drilling.jpg b/docs/drilling.jpg new file mode 100644 index 0000000..02dd4c1 Binary files /dev/null and b/docs/drilling.jpg differ diff --git a/docs/overview.jpg b/docs/overview.jpg new file mode 100644 index 0000000..864ca53 Binary files /dev/null and b/docs/overview.jpg differ diff --git a/docs/setup.jpg b/docs/setup.jpg new file mode 100644 index 0000000..0918385 Binary files /dev/null and b/docs/setup.jpg differ