Gyroscope to 3-Axis Gimbal Programming

Status
Not open for further replies.

siredward

Member
Greetings Friends,

I am looking to map the positional readout of a Gyroscope sensor to the position of an object on a 3-Axis gimbal which is controlled by 3 servo motors.

From a hardware perspective, things are lookin good. I vet datasheets for a living so...

Now for the crazy task of trying to map the Gyroscope readouts to the servo commands of 3 motors :cool:

I'm not sure where to start. I am an intermediate Arduino coder and know some basic Ras-Pi. I have heard of software for this sort of computation such as Open CV. I know very little about software dev and if possible would want to code in Arduino. I am working with a Teensy 4.1 since there will later be audio incorporated into this project.

Anybody care to chime in?

Thank you!!
 
Accelerometer included. Its an MPU9250/6500. Didn't think the rate of change would be necessary since the servos can only update position so often... is there something else I should be considering here?
 
Accelerometer included. Its an MPU9250/6500. Didn't think the rate of change would be necessary since the servos can only update position so often... is there something else I should be considering here?

Normally you need a full IMU to capture orientation - just a gyro will drift, just an accelerometer is confused during motion.
Without a magnetometer you'll still have yaw-drift

With 6 or 9 DoF you'd normally use an IMU library to maintain the orientation (as a quarternion or a DCM). If you are good at
3D vector algebra you could roll your own, but its not easy for the non-mathematical, and you really want a feeling for control
theory too for combining the various sensors.

Finally you map the orientation into Euler angles specific to the gimbal system. You cannot work internally with Euler angles
due to gimbal lock-up (and they are even more complicated algebra anyway).

There a lot of ways to get confused, in particular getting your frames of reference mixed up, or handling Euler angles in the
wrong order, so it can be quite tricksy.
 
Now we're talkin! There is a 9DoF MPU9250 which costs under $10. Same I2C protocol.
Thank you for the tips.
And so begins my journey.
 
Status
Not open for further replies.
Back
Top