Homemade 2-axis gimbal using Arduino


 

I present to you the cheapest camera or object stabilizer in the whole world !
A 2-axis gimbal that keeps an object steady in a certain position despite the movement of the base on which it is mounted. This means when the base keeps changing its position constantly, the object will remain stable and there won’t be any change in its position.

It all started with my new ADXL345 and I thought to myself why not try and build a hand-held gimbal at home since these things are rather costly out there.
So, I fired up max and as usual started working on the digital prototype or the blueprint. I had a few servos left from the previous project that I worked on and two of them were enough for this simple stabilizer. And I have learnt from my mistakes ! Knowing that these servos won't be able to put up with so much, I designed the frame in a way that would fairly distribute the load away from the motor. With all this in mind, I roughly designed the whole thing and tried to make it somewhat visually appealing ! Here are some of the final renders. 


 


With the prototype done, it was time to build the actual thing !
This project, I'm upgrading from the whole cardboard thing. I'm going to use some industry grade lamination fiber as the building blocks to make this.
It was a nightmare to cut these things using the carbon knife. it's a whole lot more effort than cardboard but at least it's lightweight and not as fragile !
I started by cutting out the different pieces of the frame individually, later I would seal them altogether. Meanwhile, I got myself some extra tools to make my life a bit more easy !

I spent the next few days putting all the pieces together using different kinds of strong household adhesive. I tried the glue gun previously but it didn't work.
Anyway, I build the basic frame, sealed the servo in place and screwed the hands together ! Worked on the pivot points a lot to make the motions more smooth and to make sure the loads were properly distributed !

I took a little bit of time to wire it up and test it. And there seemed to be some problem with the joints ! It was finally time to deviate from the whole blueprint !
I changed the design a bit to solve the problem and make it more strong and efficient !
With this problem solved, I kept building and testing. Testing and building for the next few days ! It took surprisingly longer to get the whole thing done.

It was looking so good ! But that's not all - I needed to connect the sensors, program the Arduino and do all the wiring and stuffs.

Step 1. The coding part !

I connected everything up in the prototype board and wrote a draft program. When I started up everything for the first time, it did work well but it was so rough that I barely could hold it in my hand ! I played a but with the sensitivity and things were looked kinda bright.
So, I moved on with the wiring part.

I used a small breadboard for the sensor and the power distribution and shoved it in one of the shelf I made. And the Arduino went underneath that !
And then I tested it ! It was horrible.

I couldn't understand. I thought maybe it's because some of the wires are loose since I'm shoving it in ? So, I made a shelf outside and put the sensor there. But I had no luck.
Then it occurred to me, the janky motion and the reaction force was moving the whole base structure along with the sensor which was in turn Trying to stabilize it repeating the whole cycle again. So, I needed some kind of a error reduction mechanism and along with that I needed to work on an algorithm which can smooth out the motion like butter !
That's when I realized, This was on a whole another level.

I spend days to work out the math and code this part !
But after all of this tedious and fun stuff, my gimbal was finally ready ! And it looked fine.

 


 

Comments

Popular posts from this blog

Ball Game using Accelerometer & Arduino

Crypto Trading Bot Development using Python, Multithreading, and PyTorch

Search and Rescue Deployable Assistant