Using a Baud rate of 9600 is no longer feasible. Kp and Ki values that gave the motor stable operation (6 and 3) are now causing sustained oscillations for certain step inputs.
I was able to change the baud rate of the HC-06 Bluetooth module to 19200, will be using the value to communicate over Bluetooth and USB from now on. May test how increasing baud rate affects stability of the system. Also adjusted to PID constants to give "smoother response".
I have also implemented a switch that will allow me to switch control of the robot from the phone app via Bluetooth and using a Serial port via Bluetooth or serial. For the phone case I am still printing the speed values to the phone and pc so that I can graph the values on the pc.

Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.