Hi everyone,
Excellent documentation and community going on here.
I though I would share my testing of the cheap 2208 80kv gimbal motors from Ali and some details getting a AS5048A magnetic encoder to play ball.
Firstly testing the stall torque of the motor. My testing scales and setup for this was quite awful so please take it as a loose guide. The setup was a simplefoc mini v1.0, arduino nano and bench power supply
22v supply, driver volt limit 22, 6s lipo nominal, V in each line is motor voltage limit
20mm arm, hold and return weight, quite approximate
V A Weight @ 2cm kg/cm Nm
4v 0.13A 40g 0.08 0.007845
5v 0.18A 90g 0.18 0.01765
6v 0.26A 100g 0.2 0.0196 700ish rpm no load - Gets warm but probs ok
8v 0.45A 150g 0.3 0.0294
10v 0.7A 220g 0.44 0.04315
12.7v 1.1A 250g 0.5 0.049 1000ish rpm - 5 second burst, gets hot quick
30v supply, driver volt limit 30
20mm arm, hold and return weight, quite approximate
V A Weight @ 2cm kg/cm
17.4v 1.4A 400g 0.8 very much not sustainable
I couldn’t find any resources with actual motor testing like this so it could be a cool website feature.
For setting up the AS5048A with SPI interface I required the following Config:
MagneticSensorSPIConfig_s AS5048A_SPI = {
.spi_mode = SPI_MODE1,
.clock_speed = 3000000,
.bit_resolution = 14,
.angle_register = 0xFFFF,
.data_start_bit = 13,
.command_rw_bit = 0,
.command_parity_bit = 0
};
This involved having to change the angle_register to Uint. By the looks of it you might be able to avoid this with the rw and parity bits but ill leave that up to someone who knows what theyre doing.
As I had to use the nanos SPI pins it took longer than it should have to realize I had to use PWM pins for the mini PWM inputs and then more confusion when trying to debug with millis() was broken and I needed to use _micros() after using pins that required timer 0.
Maybe having hookup guides with different encoder types would be helpful, A/B, i2c and SPI connections.
Hopefully this is helpful for someone in future as the forum has been for myself getting started.