Author Topic: Beginner self-balancing-robot struggling with build...  (Read 8889 times)

0 Members and 2 Guests are viewing this topic.

Offline davek0974Topic starter

  • Beginner
  • *
  • Posts: 1
  • Helpful? 1
Beginner self-balancing-robot struggling with build...
« on: June 21, 2021, 06:15:50 AM »
Hi all,

I'm looking for help on a 1st build self balancing robot, something that seemed pretty easy but not. I'm retired so have plenty of time but no real robot skills, electrical & mechanical yes.

I have been trying to get it working for weeks now, I have a chassis with two Nema17 motors, 65mm wheels, it's 300mm high and the battery is at the top - a pretty standard style i think. I am using a Pi Pico as MCU with an MPU6050 IMU and two A4988 drives.

A friend on another group was building a game controller using the MPU6050 and has written a whole new driver for it that gives out filtered data - Kalman or Complimentary and it also does calibration etc. So i can get angle data OK I think.

I have tried my own codes and failed but also today tried another's code that was written specifically to show how easy it was - and it still failed for me.!

This tells me maybe the motors are no good or the MPU is a bad choice, he used a BNO055 IMU but these are currently expensive and/or hard to get.

The effect i get is that the bot will just jump about , even when static. Video - https://youtu.be/nNxNHaKN5w0

The code has a PID loop, makes little difference so far.

Is there maybe a recommended motor for these 'bots?

I am at a complete loss now as it seems nothing works, even code that is proven to work! It must be hardware???

Thanks for any help

Offline mklrobo

  • Supreme Robot
  • *****
  • Posts: 558
  • Helpful? 15
  • From Dream to Design at the speed of Imagination!
Re: Beginner self-balancing-robot struggling with build...
« Reply #1 on: June 25, 2021, 09:11:43 AM »
 :) Hello!

  your robot is impressive, no doubt. In sofas troubleshooting, sensor connection is paramount; if connections are "noisy" (that is to say, not that secure or corroded) it may cause false triggering in the logic, that you may not see. These intermittent can give signals to the CPU that reacts before you can react to it. In that case, you may have to design your own basic diagnostic subprogram, to ferret out that problem. If you make a diagnostic signal logger, it will record signals that your CPU "saw" but you did not. That will solve that problem.
     On your breadboard, components MUST stay stable, or intermittent operation will occur. since your breadboard is vertical, it may intercept problems if not flat.
     If the PID is suspect, that would be a math problem, which is specific to the algorithm that you are using, and out of my purview.
     I would suggest, buying a good robotic python book that has the same type of project that you are building. They will have the code, motors, and other mechanical components will will help you in the same direction, and will serve as a model to find the issue with your current project.   8)  GOOD LUCK!   8)

 


data_list