Ok, so now the robot kind of works. It can stabilize for anytime when on some "helpful" ground, such as thick carpet or on my bed. When on the ground, it only last some seconds and then it fell to one side or the other, or start swinging badly.
Tonight i'm going to drill some more holes on the case to attach 3 potentiometer. One will control the center, that is, the value that indicates "up". It will be usefult to carefully tune which is the stable position.