Let's Make Robots!

How to start picking PID gain constants?

I want to implement PID to my balancing robot but I have totally no clue where to start with: picking the gain constants.

My only goal is to make it balance by itself, no time for making it move for now.

With gizduino w/ AtMega328 and GY-52 MPU6050, I was able to use the Kalman Filter to fetch the pitch angle without any problem. I tried to process it with just a simple forward-backward motion without PID, and it falls eventually. Seems like the PID is a necessity, as what I have seen in almost all  references.

Can I use PWM to control the motor speed driven by a L293D?

Has the L293d the potential to do the job of balancing a 2-wheeled robot? PID control is necessary for a balancing robot that ends up setting a PWM value to control motor rotation at it's appropriate speed. Can I implement it with this kind of motor driver? If so, where should the PWM values be landed on the L293D pins (enable?, inputs?. . .)