Good evening and sorry ahead of time for my lengthy post! I have been "trolling" and reading as much as I can so far!
I am relatively new to Arduino and C programming. I have worked with SQL and VBA before, though have never had any official training/education on anything programming. I have always been a tinkerer and also into woodworking and such. One of my hobbies/side income is photography, more specifically automotive photography. The basis of this contraption is to use it to take "rolling shots" of friends/clients cars while driving. Usually, people have another person drive them and then hang out the window or whatever to then take a shot of the car next to you. That requires a third person to be free and available. With my camera rig, I can take pictures via a remote trigger while I am driving myself. I made a first version that does not have any motors/servos and relies solely on physics and the weight of the camera and rig with RC shocks for dampening. It worked pretty darn well, though I wanted to see if I could get better stabilization via a servo and Arduino.
I know basically every project I have come across for camera stabilization relates to gyro and rotational stabilization for shooting video, but I am looking for vertical stabilization of the camera in order to get a long enough shutter speed to get the motion blur of the environment while the car is crisp and sharp. I will post pictures of the first rig, example photos from that rig and then the current version 2 with a panning motor and high torque servo for the vertical stabilization. This rig is currently mounting right to my trailer hitch.
I wanted to give all that background in order to try and give as much info as I can ahead of time. I am sure there will still be other questions you guys will have though. Currently, I am using the Uno board with the Adafruit Motor Shield and a GY-521 6DOF (MPU-6050). I have wired up a remote for the panning of the top "plate" that holds the camera. That is working perfectly! I have tried using a mix-mash of a few things I have read and code I have stumbled across. A good portion of my sketch consists of code from the MPU6050_DMP example in the MPU6050 library, as well as IC2dev library.
My current issues are that the camera is to jittery and is not able to get clear shots. I have tried using the Accel Z values but have a ripple effect (not sure if that is a good way to describe it) going on due to the readings. I have tried using the gyro values thinking that if the back of the car hits a bump there would be a slight rotate on the horizontal plane. That however does not seem to be sensitive enough. So I am seemingly too sensitive, or not sensitive enough in my values. I was thinking about trying to add some sort of Easing code to try and make things a little less jittery, but am not sure if that will work.
I will post my code too, but I have just commented out a lot of things that are not neccesary or that I have not fully implemented yet (easing), so please be nice for its un-clean presentation. I guess I am trying to see in what direction I should be heading with the code. I feel like it should be doable and my testing today with it on the car and taking some pictures it isnt horribly far off what I was hoping for, just not there yet.
Thanks ahead of time for any help, pointers, tidbits, and just for taking the time to read this!