Self Balancing Robot - Using RemoteXY and Bluetooth to pass in PID and CG parameters

Update: added RemoteXY software and HC-05 Bluetooth module to update PID parameters with my phone. Software is easy to use but I need to buy the full version (only 8 bucks) to add more controls. Only problem is that it stopped communicating with the bluetooth module when it encountered a timer1 interrupt so had to change program to use a millisecond count loop and all was well.

After I buy the full version, will add a joystick control to make robot directional. Fun project as I learned how to use Bluetooth module and RemoteXY software for the phone which is really easy to implement.

Original Post: Here is my first real self balancing robot though I have done some simple bang-bang ones in the past. I used this instructable (not mine): https://www.instructables.com/id/Arduino-Self-Balancing-Robot-1/ which is about the simplest treatment of self-balancing I have ever seen. Downloaded the libraries, input my robot's calibration parameters, compiled the sketch and it worked. Needs work of course but am only using P of PID right now.

Mine is using mini L293D motor shield, Arduino Uno, MPU6090 acc/gyro and surprisingly everything is run with a 2S 800mah lipo, without any external voltage regulator - using only the one on the L293D shield to power MPU6090 and the Arduino Uno. Simple.

See his instructable for details as it is a great writeup about how to make one.

Need to tune mine but might try RemoteXY software and an ESP8266 to update PID parms and try a little steering.

 


This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/self-balancing-robot-using-remotexy-and-bluetooth-to-pass-in-pid-and-cg-parameters

Inverted pendulum

Nice design. The outer “tire” on the wheels used don’t provide a lot of grip, especially on tile, which might be causing some slip. Your algorithm looks well done. Any evolution planned for the design? Enclose the frame / electronics?

Balance Robot

Excellent job as usual. Interesting that CBenson replied on 3/5/2018 to your post of 3/4/2018. Hope it just the time zone, not his ESP level.

Not my algorithm - didn’t

Not my algorithm - didn’t make that  clear. Am going to use. No real mods but want to use this algorithm for another project.

Thanks. I need this program

Thanks. I need this program for another project and I always wanted to get a self-balancing robot working. Of course, now it opens a whole bag of worms because I want to pass the PID parms in with my phone, and then figure out how to control the robot, which is causing me to spend a lot of time looking around to see how others did it, and then using phone to control the robot - not stuff I really like to do. But am learning a lot - now I have to start using ESP8266 as not programming parameters in real-time is a time-killer.

CPU

Are you going to replace the Arduino with the ESP8266?

I was going to use the

I was going to use the Arduino with the ESP8266 with this pretty cool software REMOTEXY that hooks it up to your phone. But turns out when I hooked it up I find the the software on my ESP module is ancient (cheap china copy) and flashing a new one is just a huge hassle so I am buying a couple of bluetooth modules which makes it a bit easier. So short story, bluetooth module connected to Arduino Uno so I can update parameters in real-time with my phone.