How to limit rotation without gimbal lock?

I am very sorry, it seems that there is still a misunderstanding between what we discussed above. I find some gif pictures for a camera gimbal in web and the gimbal should be work like this:
arculus-launches-a-kickstarter-for-onyx-a-protective-three-axis-camera-gimbal_2

kumbacam

In our case, the box/drone is the handle in the picture while the input is the orientation controlled by a motor in the second pic. The pic for limit range is not easy to find but I think it is not difficult to imagine with my vid uploaded before.