I finished up my gimbal testing rig by adding a battery holder to the top. It'll hold 4 rechargeable AAA batteries, supplying just a little over the 5V needed (rechargeable AAA's typically supply between 1.2-1.3V). Rechargeable batteries are important, because eventually they will be used to deploy the parachute. Because of that, I'll definitely want to top them off them before every launch. I left room in the middle of the batteries so I could eventually put hand warmers in order to keep them running at the low temperatures of the stratosphere, as J. Hopkins pointed out. They won't be needed for this test, but I've learned in this project that thinking ahead a few steps can usually save a good amount of time.
There's a piece of bent coat hanger running through the middle. I bent it ahead of time and stuck it in there as the part was printing. It rotates quite nicely. Eventually this battery holder will become the nose cone.
For anybody new following this project, I'm currently focusing on stabilizing a rocket with thrust vectoring, by tilting the engine using a gimbal. It should eventually look something like this.
I finished up the this iteration of the arduino code. Here's a clip of the gimbal actuating in reaction to the tilt of the rocket.
I also conducted the first tethered test of the gimbal with a live motor tonight! Here's a clip of that:
I went into this test not expecting it to work. In fact, it would have been a miracle if it did. My main goal was to learn more about the behavior of the gimbal in its current state. With that goal, it was a success.
Looking at the slo-mo, it seems like the rocket reacted quite badly to the initial yank of the rope after the engine ignited. It almost tilted to a full right angle. It corrected itself after that, but I'm not sure how much of that might have been due to gravity. It swung to the right, and again corrected itself. It swung to the left, and again corrected itself. There seems to be a pattern here. It's oscilating back and forth, with an increasing amplitude each time. In the next oscillation, it toppled over itself, but as it swung back to the starting position, it corrected itself quite nicely. It swung to the left, corrected itself, and then did a full circle again before the engine burnt out.
Overall, I was really happy with this test. My intuition tells me that the gimbal is severely over correcting.
I think that there are probably 5 ways (or combos of these ways) to fix this:
1) Decrease the angle of activation the gyro must read before the gimbal activates.
2) Decrease the angle that the gimbal tilts the motor
3) Increase the refresh rate of the gyro (right now, its at 10ms)
4) Use some clever programming that would figure out how to tilt the motor to correct instability, and then tilt in the opposite direction to stop any spin caused by the correction as the rocket straightens out.
I'm not very knowledgeable or experienced in analyzing something like this, and I'm basing these conclusions off of intuition. Any recommendations or advice on to how to tackle this problem would be much appreciated.