Finding PIDs and Losing Them Again (Video)
I haven’t posted any updates in a while, but I kept working on the quad every chance I had.
Last weekend, I kept using my wooden test platform to see if I can get this thing to stabalize. Things were going okay, until there was a software multifunction, engines revved all the way up, props cut through two of the ropes, copter flipped, lost all 4 props, battery flew out of it’s harness and wifi dongle with antenna fell apart.
I looked at the dongle and thought that only the plastic case was broken, so I can super-glue it together. I performed a surgery, but the dongle is dead. I guess something shorted inside. I had to get a new one.
I decided that I need a more controlled test environment where I can tune one axis at a time. I spent some time building a wooden stand with a round bar at the top where quad can rotate on one axis only. After I built it I didn’t feel it was stable enough, so I modified my idea. I attached the bar to my test platform (as you can see in the video).
Now I was able to test things without hurting anyone or destroying the quad.
I also found and fixed multiple bugs in my code that contributed to instability. I felt like was in a good place and I spent couple of days trying different PID values. This was very frustrating, because no matter what I tried, I couldn’t get the copter to behave.
Today, after much trial and error I was able to find the PID values that resulted in much more stable and controlled behavior for both pitch and roll. The video above is of me tuning the PIDs on pitch axis.
I felt pretty good about my progress and decided to take it outside to see if it will be able to hover a bit. No such luck. It’s as if PIDs I tuned on the test platform were completely irrelevant. Many small crashes resulted. I kept trying to adjust the numbers and was making some progress when one of the props got stuck in the grass, the copter flipped again and I lost another wifi dongle. Don’t know if anything else is broken yet. Hopefully, motors survived.
I need to figure out a way to secure the dongle with antenna in such a way that when the device flips it doesn’t break. I also need to figure out a way to turn the motors off automatically if the connection to remote control is lost.
Back to the drawing board, for me.