I'm at the stage where I assembled a balancing robot and it's not maintaining a stable position. This is not a surprise I just started testing last night.
My code is here, views of the device are here.
Briefly, it's based on a teensy 3.2, a brushless motor controller that receives I2C commands that drives brushless gimbal motors. It uses an MPU9250 for angle measurement. I'm using PID control, and I made a tkinter-based interface that allows me to send it P/I/D values for realtime testing. I plan on implementing a bluetooth based serial to reduce wires going to the device.
At this stage I'm not asking people for specific help on debugging what's going wrong, I'm asking about a general strategy for testing. I have used the RAM on the teensy before to record PID response time and then send that data to pyplot, which was very informative before. I was wondering if it would be a good idea to detach my wheels and mount the motors to a rigid pedestal - and to do some PID tuning using that system to tweak the wobbliness/stability. My reasoning being "hey if I can't get this thing to stay upright when it's rigidly mounted to the bench, why would it work when it's got wheels on it?"
Are there any comments on this strategy, and would anyone want to offer other ways to go at the problem at this point? Yes, I've read the many posts on PID tuning, I'll follow them as best I can.
I can post pictures and other code examples but newbies only get to put two links into the OP.