JJRobots COMMUNITY

Full Version: Help with EVO2 debug
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I built an EVO2 with a Leonardo, A4988 drivers, 3S LiPo pack (above steppers), MPU6050, with a Brainshield V3.1 and steppers from JJRobots.
Assembly check out ok (sent pictures to JJRobots) loaded GitHub latest and then the problems began.
Basically, same/similar problem as reported in several posts (I believe[/size])
http://forums.jjrobots.com/showthread.php?tid=1387
http://forums.jjrobots.com/showthread.php?tid=1529
http://forums.jjrobots.com/showthread.php?tid=1255
Will not balance, motors just spin at max speed(noisy), manually moving robot it will slowly correct and reverse wheels then back to max speed. App works fine and displays a tilt angle turns off when flat.
Tried OEM and Clone Leonardos, swapped out IMUs(MPU6050) from different suppliers. No change.
I’ve tried to debug with print statements, code seems to do what is asked, but it is hard to analyze the data without knowing what “Good” values look like.
If anyone has a few moments, I’ve attached the controller code with several print statements (remove .txt). Could someone run this on their working EVO2 and send/post the results??

Any help or guidance would be appreciated.
The fast spinning wheels is normal (two both directions when tilting the robot) if they are not touching the floor. Just place the B-robot on the floor and be sure they have the O-rings on the wheels (or any other rubber surface so there is enough grip)
Thanks for the response.

Unfortunately, I have tried what you suggested several times. The fast spinning wheels are because the controller is commanding the max (500) wheel speed because the controller thinks the bot is moving (even though it is not).

I've commented out the speed portion, setting it to zero, setting the target angle to zero but still no luck in creating a balanced bot.

I've replaced all the parts, several times (except the motors/brainshield) but the results are the same. I was hoping to get the data from a working bot to isolate where the problem is.
(02-07-2019 01:12 AM)atb Wrote: [ -> ]Thanks for the response.

Unfortunately, I have tried what you suggested several times. The fast spinning wheels are because the controller is commanding the max (500) wheel speed because the controller thinks the bot is moving (even though it is not).

I've commented out the speed portion, setting it to zero, setting the target angle to zero but still no luck in creating a balanced bot.

I've replaced all the parts, several times (except the motors/brainshield) but the results are the same. I was hoping to get the data from a working bot to isolate where the problem is.
If I were you I would start from scratch with the code. Upload the original code without modifications and try again and double check the motor connections! If they are swapped the brobot will misbehave
Thanks for the reply.

I have been working this problem for some time now, I have loaded the (unmodified) gitHub code several times on different Leonardo boards with the same result.
This behavior has been reported before in other posts however the solutions (when posted) do not seem to help my situation.
I'm hoping for the data from a working EVO2 to shed light on the situation and, hopefully, provide that "aha" moment.
(02-07-2019 04:54 PM)atb Wrote: [ -> ]Thanks for the reply.

I have been working this problem for some time now, I have loaded the (unmodified) gitHub code several times on different Leonardo boards with the same result.
This behavior has been reported before in other posts however the solutions (when posted) do not seem to help my situation.
I'm hoping for the data from a working EVO2 to shed light on the situation and, hopefully, provide that "aha" moment.

The other problems were related with the MPU but I am 99% sure that yours has to be with the wheels/motors. So, you have checked the motors are properly connected to the right motors ports?
Thanks for the reply.
Regarding the motor connections (motors and cables bought from JJRobots) on the motor side the connection is keyed so only one way in. On the driver output connection both cables are oriented per installation diagrams (motor swap should only be a factor when turning).

If you ignore the motors, raise the bot, and hold so angle is 0ish (i.e. a sorta balanced bot) the motors are still set to a commanded speed of 500 each. I would expect then to be responsive to the bot angle and not at max speed. (they are responsive to the computed target angle of 14 which is the constrained value)

Could you explain why you think the other referenced posts were related to a MPU issue and mine is not?

Thanks
(02-11-2019 11:06 PM)atb Wrote: [ -> ]Thanks for the reply.
Regarding the motor connections (motors and cables bought from JJRobots) on the motor side the connection is keyed so only one way in. On the driver output connection both cables are oriented per installation diagrams (motor swap should only be a factor when turning).

If you ignore the motors, raise the bot, and hold so angle is 0ish (i.e. a sorta balanced bot) the motors are still set to a commanded speed of 500 each. I would expect then to be responsive to the bot angle and not at max speed. (they are responsive to the computed target angle of 14 which is the constrained value)

Could you explain why you think the other referenced posts were related to a MPU issue and mine is not?

Thanks
The Brobot makes micro movements of the motors to keep the balance not just turning. It takes that acceleration as a value to control the balance (400 Khz per second) Just give it a try and swap the motors LEFT<-> RIGHT on the Brain shield ( labeled as MOTOR1 <> MOTOR2 connectors). If you Brobot spins the wheels in different direction once the tilt angle goes through "Angle 0" value, that means the MPU is sending values. Can you try to check the MPU values sent using the debug mode? (Info at the very end of this page: https://www.jjrobots.com/b-robot-evo-2-assembly-guide/)
Thank you for the replies!

Boy was I WRONG! What was I thinking!

I swapped the l/r motor wires and now the BOT is able to stay upright. It's a little unstable but I believe it's workable.

Thanks again for the support!

p.s. I can't wait to plot this new data to figure out why I was sooo far off base in my logic.
(02-13-2019 03:23 AM)atb Wrote: [ -> ]Thank you for the replies!

Boy was I WRONG! What was I thinking!

I swapped the l/r motor wires and now the BOT is able to stay upright. It's a little unstable but I believe it's workable.

Thanks again for the support!

p.s. I can't wait to plot this new data to figure out why I was sooo far off base in my logic.
:-DD Good to know you found the source of the problem!
Reference URL's