A brief summary of my project: I am building the self-leveling part of my robot. For the inputs, I am detecting the balance with an accelerometer. If the accelerometer senses a tilt then it'll tell the actuator to move up or down.
When I discussed it with my professor, I said that I was going to use a relay and just hook up 12Volts to the relay and use the microcontroller as a switch to control the relay (on or off). However, my professor said that it won't be a stable system because it'll oscillate too much because it's a bang bang control. So, he told me to look into a PID control system. I thought my solution would work at first, but i'm just lost right now. Can anybody steer me into the right direction or give me some more pointers? Thank you in advance.