Thread Tools
This thread is privately moderated by Jack Crossfire, who may elect to delete unwanted replies.
Nov 25, 2016, 12:26 AM
Registered User
Jack Crossfire's Avatar
Thread OP
Discussion

Brushless gimbal enhancements


Managed to reconfigure it so the camera mounts the right way. That got it an inch higher & eliminated the need to rotate the video. Requiring any kind of processing just to preview the video was a disaster.

Optimized the UARTs so the feedback now goes at 1960Hz instead of 1830Hz. The trick was not doing anything else until the packet was transmitted. More speed came from setting the IMU sample rate divider to 0. It doesn't cause aliasing. It just reads the sample with lower latency. This might have reduced the bobbing slightly.

Another attempt to handle the UART transmitter using interrupts failed. It didn't matter since context switching would count as doing something else while the packet was transmitted. Tried delaying the feedback commands by 1 packet so the next IMU reading could be read before the previous readout's feedback calculations were done. While it would have increased the rate, it would have added latency. The increased latency was a failure.

Finally, extended the motor mixing to allow it to be used for selfies & near the ground. This took a bit of geometry.

Discovered the P & D feedback terms in their only working configuration don't fight each other. D actually adds to P, so fighting terms aren't the reason it undershoots. Tried maximizing P & D with no obvious improvement. Did confirm it slightly undershoots the feedback, leading to bobbing when running.

Tried replacing the traditional IMU blending algorithm, which averaged the most recent orientations with very small weights, with averaging the 2 orientations over the last 5 seconds with very small weights. It did nothing so was abandoned. The problem is the undershooting, not the orientation getting off.

The next step would be DMA for the UART & the SPI. The ultimate optimization is reading the IMU while simultaneously servicing the UART. This has never worked, for some reason. Even downclocking the UART to 115200 didn't work. It could be a hardware limitation for using the UART in full duplex. This could get the feedback to 3000Hz, but might have too much latency.
Sign up now
to remove ads between posts


Quick Reply
Message:
Thread Tools