Hi @Kusana , welcome to SimpleFOC!
This sounds like a nice project! If you search in our forums for “gimbal” or “3-axis” you will find some other projects in this direction, you may find them useful.
We’ll get you sorted out no worries!
Do I understand correctly from this that the gimbal and camera are shielded from the air resistance forces by the pod? So the gimbal doesn’t have to hold the camera in place against the passing air during flight?
I think balance is very important, otherwise the motor will be continuously “lifting” the camera to hold it in place - this will make the gimbal use far more power, with accompanying heat generation problems.
It will also be subject to “uneven” forces as it rotates if the camera is not balanced, which won’t make control easier.
This will require a few iterations and lots of testing to get to the final version… to start with, just put each motor in angle mode, and use the IMUs to command the angle to the motor.
(To be clear, don’t actually start in angle mode - get each motor running and well-tuned individually first by following our documentation and checking the modes starting with the simplest (torque-voltage) and proceding through them until you get to the angle mode. Then once each motor is working individually, put them together into the gimbal system and start on your outer control layers).
So angle mode directly controlled by the IMU as the initial gimbal control code, and from there we can look into more complex control loops, filters and other ideas to improve performance.
In this design the motors are “carrying” the full weight of the camera (and even a lot more for the first motor), regardless of whether it is balanced for the rotation or not.
Personally I would design it in a way where the weight is carried by structural parts and bearings, and the motors are only driving the gimbal in its bearings.
In this design the motors (especially the first one) are subject to very unfortunate shearing forces which will affect the performance and control (I am making assumptions here)
If you only need 45deg rotation in either direction on 2 axes, this makes your life much easier! You don’t even necessarily need to use the motor hollow shafts in this situation.
I would order 2-3 different sizes of gimbal motors. The iPower series gimbal motors from iFlight RC seem suitable, also the gimbal motors from emax or T-Motor. I would order ones sized 5010 and upwards for a 1kg camera, but you could also set up some physics equations and work out the required torque some of the vendors might help you out by giving the maximum camera weight the motor can deal with - that will be an optimistic-approximate value on the one hand, and would certainly assume the camera is well balanced on the other hand.
I would order magnetic sensor evaluation kits like the AS5047P - these little PCBs aren’t too expensive, come with the right magnet and are fairly easy to interface via SPI or ABZ. You will need one per motor.
I would order some STM32 Nucleo boards. Nucleo-64 boards are a bit bulky but don’t cost much and the G431 or G474 boards are excellent for motor control.
Alternatively you can also use various boards from Arduino (the Nano ESP32 might be nice), from Adafruit or Sparkfun, as well as many others. Keep in mind you will need quite a few pins for motor driver and sensor, and a way for all the boards to communicate.
Can you run 2 motors on one MCU? Yes, but it’s not ideal as you will only have half the MCU power for each motor, and the code is much more complicated to set up. But if you want to go this route then definately choose a fast STM32 MCU, or an ESP32.
Finally the driver boards - the SimpleFOC shield or SimpleFOC mini generally have enough power for gimbal applications, but if you need more, perhaps the newly introduced SimpleFOC driveshield would be suitable for your needs?
Are you intending to make PCBs for it in the end, or assemble it from stock components?