I have been repairing these buggers for some time now and I'm constantly surprised at the causes for "gimbal dance". The best way to check for your particular problem is to have a perfect working test camera. Unfortunately, not everybody does. I have found the "pitch" circuit board to be the main offender. Not sure exactly what is wrong with it, (doesn't really matter), but I know when I put a good circuit board in, it works fine. I have over a dozen bad pitch boards. The "roll" circuit boards are the most robust. Every bad camera I have parted out has a good roll circuit board. The pitch shaft and motor are pretty robust, except for the obvious broken shaft. I did, however, recently replace a camera module and the "dance" went away. That was a new one for me. The other culprit is the "roll" motor separation from its bracket. If it is the slight bit loose, it will cause problems. If they are separated, inspect the condition of the black magnetic ring in the bracket. I have been able to use ones with slight scratches, but not with deep gouges. Fragments of this ring, getting into the windings, can also cause problems. Use an air hose to blow out particles and then use silly putty to pick up left over filings.
I posted the complete procedure for re-attaching the motor to the bracket, but I can't place where I posted it. Having been a machinist, I came up with a mechanical means of firmly reattaching the motor, WITHOUT super glue or epoxy.
The other culprit is the main circuit board where the "yaw" arm enters the upper housing. I have seen tiny chip resistors wiped off the board because the yaw arm dug into the cover plate, from a hard crash. You'll need to buy a used/damaged camera, and take a chance that the main circuit board is OK, IF you know that is the problem. Also, be very careful when "unlocking" any of the circuit board cable locks. Those tiny black plastic bars that when flipped down, secure the ribbon tightly in their connectors. I recently received a used camera that had EVERY lock removed with a screwdriver. :{
AND, believe it or not, I have had, what looks to be good, ribbon cables that caused the problem. Here again, having a perfect, working camera, can solve these issues. BEWARE of some of the Chinese ribbon cables. They are counterfeit and the seller realizes, that when installed, and the camera still doesn't work, that you will think it is another component that is the culprit. I bought 10 from amethyst.e, tested 3, they didn't work, put the old one back in, and it worked fine. Most people won't go to the trouble of sending one ribbon cable back to China.
Here is yet another problem with a fussy gimbal. The reason I came to this site today. Two perfectly good, working cameras started doing the same thing. Poor roll gimbal response. When I tilt the quad, the gimbal starts to work like a gimbal, but then it freezes and moves with the quad. Not a gimbal at this point. I believe it has something to do with my test quad, either internally, (Naza), or the wiring/connectors. I WILL find out what is wrong, TODAY.
Hope this helps.
Cheers,
Jim