Loading...
Pages: 1 ... 6 7 [8]   Go Down
Author Topic: Balancing robot for dummies  (Read 17867 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Found your code - that is what I was hoping for.

Thanks, Peter
Logged

Denmark
Offline Offline
Full Member
***
Karma: 7
Posts: 246
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Good. Note that if you are looking for the PS3 version, have a look at the PS3 branch: https://github.com/TKJElectronics/BalancingRobotArduino/tree/PS3
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey guys! I am building self-balancing robot too and I would be grateful if you could help me a little bit to understand the following concepts:

1. Integral term (i_term). This term always grows in the existance of the error. Many of you use the ceiling values for this term. The first question is - if my max val for the torque is 255 what are appropriate ceiling values for the i_term and how to determine them?

2. If my robot overshoots, the error sign will change. How to go about the i_term in this case, which might be quite big causing lag? Should I just zero integral term every time my error change in sign?

3. I am using self-made optical rotary encoder. You guys are adding terms to the PID and I cannot get my head around it. So it's sort of a method of providing a feedback to the controller in terms of velocity? But in this case our set-point = zero error is in terms of the angle. How you relate both?

Patricks code:
pTerm_Wheel = Kp_Wheel * count;           //  -(Kxp/100) * count;
dTerm_Wheel = Kd_Wheel * (count - last_count);

4. Somebody wrote about using a potentiometer in order to determine values for PID coefficients. Can you provide some information how it's done?

5. Also can you give some ideas how could I save a stream of data (my error) into external memory? The purpose is to analyze the responce.

Thank you for your help!                  
« Last Edit: March 19, 2013, 01:30:29 pm by john_john » Logged

Denmark
Offline Offline
Full Member
***
Karma: 7
Posts: 246
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I just released a balancing robot kit on Kickstarter: http://www.kickstarter.com/projects/tkjelectronics/balanduino-balancing-robot-kit and I thought you guys might be interested.

Here is a video of it as well:
Logged

Long beach CA
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello everyone.

       i have been trying to build my own bot for a few months now and i have come quite far in building it, just havent got it to balance yet. but this forum is been of great help. so i finally decided to consult the experts.

    I am using a 9DOF pololu IMU but as shown on previous threads i only use 2axis  accel and 1axis gyro readings which via the kalman filter give an actual angle. i use a dfrobot motor driver and dc motorrs (without encoders).

    the things that i think are causing problems are

 1.  The delay caused by the Kalman algorithm. this leads to a backlash since by the time the kalman output reaches zero the real bot angle already crosses vertical zero.
 
2.  Motor Stiction, there is no movement of the wheels at low speeds, the PWM input has to be atleast 50 (in a 0 - 255 range) for the motors to move.

3. I also started to wonder if the size of the wheels and the structural dimentions of the bot have any effect on the final balancing. most importantly does the weight distribution of the bot have to be perfect.

        Please do let me know what you think. if anyone else has experienced such problems, how did you overcome them.
Logged

Denmark
Offline Offline
Full Member
***
Karma: 7
Posts: 246
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@john_john
You should checkout my source code for my Balancing robot: https://github.com/TKJElectronics/BalancingRobotArduino

@susheel
1. Do you mean there is a problem when the angle change from 0 to 360? This can easily be fixed by making the angle 180 when the robot is upright.

2. I don't do anything to prevent that, but I have seen other people do that, but I really don't think it's necessary.

3. Try to make the robot as symmetric as possible, so one of the sides doesn't weigh more than the other - my robot can almost balance by itself. Also remember to put some weight at the top in order to raise the center of gravity. Remember that the better the mechanical structure is the better the end result will be!
Logged

Pages: 1 ... 6 7 [8]   Go Up
Print
 
Jump to: