Balancing Robot (Balance1)

 

HI guys,

This is Balance1, my balancing robot, I built balance1 to demonstrate that a digital controller I had designed in MatLab actually worked in the real world. 

The controller i ended up using for Balance1 is a digital LQR controller to balance and also stay in the same position. The LQR controller works really well because it uses a weigthing matrix to let you make balancing more important than staying in the same position. This means that if Balance1 is going to fall over then it doesn't worry much about its position it just consentrates on balancing, then when its more balanced it tries to get back to its starting position.

Robot Body:

  • The frame is made from 15mm aluminium angle amd 3mm clear perspex
  • Most of the hardware is held inside black plastic project boxes

Hardware Used:

  • Propeller Platform USB from gadgetgangster.com
  • CHR-6d Inertial Measurement Unit from pololu.com
  • Dual MC33926 Motor Driver Carrier from pololu.com
  • 2 X 12v 30:1 gearhead motor and encoders from maxon.com
  • 2 X 11.1v lipo batteries
  • 2 X Xbee modules and carrier boards from sparkfun.com
  • uM-FPU V3.1 chip from sparkfun.com
  • TextStar serial LCD from cats-whisker.com
  • 40mm 12v cooling fan from ebay.com

Further Work:

  • remote control using Xbee
  • navigate autonomously using sonar or maybe even a camera

Remote Control:

I've been doing a few test on remote controlling Balance1 and there's a new video showing the results so far. I need to do a lot more tests and tuning but it looks promising. Turning is done by adding a value to the PWM for one of the motors and taking the same value away from the PWM of the other motor. At the moment I make it drive back and forward by putting an offset on the balance point. So far I've noticed that it's quite wobblely at low speeds and it seems to get more stable the faster it's moving, I also want to try putting an offset on the velocity the see if it is smoother and more stable that way or maybe even a combination of the two types of offset. Also at the moment I'm using viewport and a USB connection to change the different values which is far from ideal as the USB connection effects how the robot balances so I need to make wireless using Xbee as soon as possible.

Remote Control Using IR Remote working:

Well putting the offset on the velocity instead of the angle worked pretty well and now Balance1 can roam arround controlled by an IR remote, I've uploaded some new videos so you can have a look, the second one shows a possible use for Balance1 what do ye think. Next comes some autonomous roaming and maybe some line following.


Balances on 2 wheels, Remote Controlled

  • Actuators / output devices: 1:30 maxon gearhead motors
  • Control method: autonomous, RC
  • CPU: Parallax Propeller
  • Power source: 2 X 11.1 V/2200 mAh Li-Po
  • Programming language: Spin
  • Sensors / input devices: wheel encoders, CHR-6d Inertial Measurement Unit
  • Target environment: indoor

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/balancing-robot-balance1

Cool, nice work and great to

Cool, nice work and great to see a video.  Would be great to hear more about it (h-bridges used, custom frame?, etc).  I’m also curious how you intend to use it when completed, will it be remote control, autonomous, both?  Also interested in any good online tutorials on making a balancing robot. 

Cheers

Nice

Nice. What university do you attend?

university

Hi dent, I’m in my final year studying Mechatronic Engineering at ITSligo Ireland (http://www.itsligo.ie/)

Hi rogue,the project is more

Hi rogue,the project is more to do with deriving a statespace model of the system, similar to this tutorial http://www.engin.umich.edu/group/ctm/examples/pend/invpen.html, and then designing the best controller for it. I didn’t really have to build the model but I did it just to demo the controller really so its a bit rough. I’m using the duel MC33926 motor driver carrier from pololu, http://www.pololu.com/catalog/product/1213, the frame is made from aluminium angle and 3mm clear perspexs, I’ll put up some picsture soon.

 

 

 

Weird stuff

Does any one know why all that stuff appears at the top of the post or how to stop it happening. Is it because I typed it in a word document first and then copied it in?

Yes, Word adds MS formatting

Yes, Word adds MS formatting that is also pasted along ;/

Code

Is it possible view the source code?

Yeah, its still very much a

Yeah, its still very much a work in progress so its a bit rough and ready but i’ll upload it as soon as i get a chance.  

Signal filter

What kind of signal filter are you using to retrieve attitude?. Complementary?, Kalman?.

 

Good work and very clean build!

FIR and EKF

The CHR-6d unit that I’m using has an onboard ARM Cortex processor which filters each of the accelerometer and gyro readings with a configurable FIR filter and uses an Extended Kalman Filter for pitch and roll angles. All of the values a then available over a TTL UART.

 

Nice balancing robot. Get it

Nice balancing robot. Get it to serve folk drinks when they come round!

I’m curious how much you

I’m curious how much you played with the CHR-6d IMU configuration options to get things working smoothly, such as the process variance, broadcast frequency, etc.  These are pretty sweet little IMUs, its surprising they are being discontinued.

I’m sure you should be able

I’m sure you should be able to buy them for some time to come if they are in fact discontinued.

very nice work and good

very nice work and good control algorithm. good Job.

I will start to build my 2 wheel balance Robot right now.

here is my Balance

here is my Balance Robot

https://www.robotshop.com/letsmakerobots/node/29232

what motors did you usewhat

what motors did you use

what is the price of these motors?

what is the required RPM and tourque?