For a school project, I have designed and assembled a bipedal humanoid robot. The robot is roughly $54$cm tall, with the width(distance between two legs) at $20$cm. The parts that make up the robot are 3D-printed. It has $12$ degrees of freedom, $2$ for each foot, $1$ for the legs, and $3$ for each side of the hip.
Here is the link to the Github repository.
My goal for this project has been to get the robot to walk. As of currently, my robot is connected to a microcontroller via PWM wires, and I connected it to a computer. The robot is powered using a DC power supply. I use a simple robot control system on my computer, which sends specific PWM signals to each servo within the range $500-2500$, covering a full $180$ turn. For each PWM signal, I can control its duration as well.
My problem is the robot is failing to balance on one foot. I know my method of controlling it is extremely primitive, but I can't seem to get it to balance on one foot. I added an extra $DOF$ on the foot, to allow the foot to shift the centre of gravity.
Here is an image:
From the image shown, it seems like the centre of gravity indeed has shifted to a location directly above the foot. However, when trying to control it, the robot never manages to successfully balance on one foot. It usually falls towards the right and backwards(from the perspective of the image). The PLA material from the 3D-prints also seems to bend a little, causing the robot to lean towards the left. I have tried many ways to fix it, but it is to no avail.
This is my first question on the Robotics Stack Exchange page. Sorry for possible bad/inaccurate terminology. Any help or suggestions will be greatly appreciated.