JJRobots COMMUNITY

Full Version: PID for a modified B-Robot
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
My B-Robot is now working properly, since changing to a large LiFe battery. However, this has left me with a problem - the thing is a bit heavier, and the centre of mass is higher (I had to make spacers to add about 12 - 14mm between the electronics shelf and the motors). This has messed up the PID, as you can see in this video:
YouTube
I have tried playing with the PID values in the Android app, but nothing seems to resolve the problem.

Any bright ideas?
It is a tough challenge for even the best setup robot to balance complete still on a carpet, but still try adjusting your #define ANGLE_OFFSET in the BROBOT_EVO2_23_M0.ino
(04-26-2020 10:19 PM)justjason Wrote: [ -> ]It is a tough challenge for even the best setup robot to balance complete still on a carpet, but still try adjusting your #define ANGLE_OFFSET in the BROBOT_EVO2_23_M0.ino

I'll try that - but it also wobbles on a hard surface! Smile
As a matter of interest, can anyone give guidance for changing this value, or is it trial-and-error to see what happens? I'd be interested to know the range of valid values, for a start.
(04-30-2020 02:11 PM)David_J Wrote: [ -> ]As a matter of interest, can anyone give guidance for changing this value, or is it trial-and-error to see what happens? I'd be interested to know the range of valid values, for a start.
Try to not "overshot" first. That means: reduce the Proportional value as much as you can (you will be below a valid value when the robot can not respond and fall). Then go for the D value, that will prevent the robot to wobble too much but at the same time, it will limit its response. So, it is a "finding the balance" with a set of values. The I will prevent the robot to move by itself, keep moving fordward without any input from your control APP.

This is just a general idea, there are some minor "interferences" among the PID values not easy to isolate by themselves, but it may help.
Late update: It looks like this was due to a problem with my DEVIA board (one set of motor connector pins fell off the board!) - jjRobots promptly sent me a replacement and the B-Robot now only shows what I would call "acceptable wobble" (normal correction movement). Smile
Reference URL's