Show Posts
Pages: [1] 2
1  Topics / Robotics / Re: Balancing robot for dummies on: May 23, 2011, 03:14:01 am
@IanJohnson
I think that a lot of frustration for those that canno't balance their bot using The Kas/Patrik guide came from the confusion between torque and velocity..

If You use a PID where the Pterm (the one that drives all the balancing) is related to the tilt angle (P=k*error), You'll produce a Torque and not a velocity.

The torque will fight against the tilt and make it zero..

Please read carefully the SnakeLT thread http://arduino.cc/forum/index.php/topic,8871.msg74116.html#msg74116.

He says exactly what I am saying..and his bot is balancing perfectly (like mine... http://www.youtube.com/user/minormelodic#p/a/u/0/BaGc2IHJu40)

My bot started to balance when I started:

*)to use wheel heavier (the motor work produces more torque and less velocity);
*)to make the bot less high (the torque will compensate better the tilt producing);
 
...stay tuned, I'll post a video with my bot balancing, avoiding obstacles and following ad infrared source..

bye,

danilo
2  Topics / Robotics / Re: Balancing robot for dummies on: May 09, 2011, 07:49:14 am
@ IanJohnston

why don't You try to put the battery (that should be heavy) as close as possible to the ground?
Make the Bot lower as you can...
3  Topics / Robotics / Re: Balancing robot for dummies on: May 09, 2011, 02:40:21 am
@ MarkB:

i posted the links of my motors and my wheels, you should read all the tech. specifications...please tell me if you need something else..


Here is a link without music:



4  Topics / Robotics / Re: Balancing robot for dummies on: May 08, 2011, 11:20:46 am
Hi all,

this is my bot...made using as a "trace" the Kas guide.. and spending a lot of time (more ore less 6 months).

on the third month the bot was running, then an inverse current from the motor driver burned Imu, Arduino and the sonar..

I am now using the 5dof Sparkfun analog Imu..anyway I also tried the Fabio Varesano digital FreeImu.





The last version uses a sonar that make the bot turn when an obstacle is <=25 cm close....

Motors are the Pololu 29:1 Metal Gearmotor 37Dx52L mm with 64 CPR Encoder (http://www.pololu.com/catalog/product/1443);


It works because:


1) the new wheel ( http://www.robot-italy.com/product_info.php?cPath=7_158&products_id=1525) are much more heavvy than the previous (http://www.pololu.com/catalog/product/1435);

2) the bot is much smoller than previous version (now 25 cm).


With our motors the bot has to be small and "not high" other wise you'll never correct a tilt with a K*velocity of motors, velocity of motors will only generate a translation of the bot that will compensate only partially the tilt.

With heavy wheel and a toll bot K*velocity will compensate the tilt.


My way:


1) I did find (making 10 tries and then evaluating an average) the "zero" values of the 2 Acc and the Gyro. Then You have to use always this 3 zero values..your tuning will not depend any more on the starting position.

2) I manually found the "real" setPoint (the one that makes the mass center cross the motor line).

3) I used a potentiometer to find the right set of PID values;

4)You'll find Kp working with the  potentiometer as the values that make the bot oscillating (it will jitter because of backslash...)

5) Then I used a low Pi and found Kd using the  potentiometer as the values that make the stop oscillating...be careful if you use a bigger Kd the bot will be "nervous"..

6) Kpwheel will be set as enough to make to bot turn back, but it will create again oscillation (non on the tilt but on the position);

7) Kdwheel will be set as  the values that make the stop oscillating on the position.. be careful if you use a bigger value the bot will be "nervous"..



bye,


danilo
5  Community / Exhibition / Gallery / Re: Self Balancing arduino robot directly controlled with a Wiimote on: April 26, 2011, 01:07:28 pm
Timen. Patrick,

I am still working on PID tuning...

One simple question....does Your Bot balance even only with PID based on tilt angle (with no PD from encoders)?

In other words, if You put Kp_Wheel=0 and Kd_Wheel=0 and leave untouched Kp, Ki, Kd, dows Your bot still balance?

I am fighting with the first step of balancing (increase Kp till oscillation occours..), then increase Kd (starting from zero) till oscillation disappear..

We all are using the same motors but I cannot reach the  "oscillation occours" status unless using a very high Kp, that means a huge jittering..I know motors are not exactly the same, my be mine have a bigger backslash than yours..

I am trying to use  a quadratic formula like this:  pTerm = 0.75*error*(1.0+1.4*abs(error)) in order to have smoller jitter (around zero) but an aggressive ramp good to make the Bot oscillating.

What do You think about it?

Bye,

Danilo

6  Community / Exhibition / Gallery / Re: Self Balancing arduino robot directly controlled with a Wiimote on: April 16, 2011, 12:28:43 pm
OK, I find out  the problem...I was using Serial.begin(9600); instead of Serial.begin(115200)...4 simple Serial.print used to debug were taking 40ms...Kalman was KO (the Kas Kalman code is expeting to be used every 10ms...).

Now the Bot can stay up, but I think PID parameters need to be tuned...

You can see the video...   

Any suggestion?

bye,

Danilo
7  Community / Exhibition / Gallery / Re: Self Balancing arduino robot directly controlled with a Wiimote on: April 12, 2011, 04:25:50 pm
Hi Timen,

could You please attach a print out of Serial Monitor (2 minutes is enough) while Your boot is up and stable (with no inputs from the wiimote) using this code within the loop:

Serial.print(ACC_angle, DEC);     Serial.print(",");
Serial.print(GYRO_rate, DEC);     Serial.print(",");
Serial.print(actAngle, DEC);        Serial.print(",");
Serial.print(drive, DEC);            Serial.print(",");
Serial.println(count, DEC);     

I'll make a comparison with my datas to findout my problem...

thanks,

bye


8  Community / Exhibition / Gallery / Re: Self Balancing arduino robot directly controlled with a Wiimote on: April 12, 2011, 08:09:17 am
mY wheels: Pololu Wheel 90x10mm Pair - Black

no. it does not works with Your K set....

I think there is something wrong in Kalman even if the angle is whell evaluated, maybe it is a little bit slower than the real angle and this creates a phase problem... I am still investigating.

bye

9  Community / Exhibition / Gallery / Re: Self Balancing arduino robot directly controlled with a Wiimote on: April 11, 2011, 02:06:48 am
yes, the sensor is close to the axis..

do You mean Kp = 40 Ki = 1 and Kd = -8 (!!-!!) ?

and what about K?

thanks
10  Community / Exhibition / Gallery / Re: Self Balancing arduino robot directly controlled with a Wiimote on: April 10, 2011, 02:24:00 pm
Timen,

the problem is the battery.. i get back to my old battery (a very simple pack of 10 1,2 nimh 2600mah) and the system does not switch off..anyway it still does not stay up..

Ok, the  photo "1" is my first release..it could stay up for 45 min, it hat a sonar sensor to avoid obstacles and a turning  infrared receiver to understand the direction of the ir emitter and to follow it....the main kode was based on Kas thread.

I think that some inverse current coming from the motors burned arduino, the sonar sensor and the Sparkfun 5DOF analog IMU....at that time I was using the simple pack of 10 1,2 nimh 2600mah.

The new release is based on Freeimu (from Fabio Varesano), a digital 9DOF that is working pretty fine (photo "2").
I inserted a diode on the +12v line that powers the motor driver.

The crappy battery that does not work is in the photo "3" ..I am now back on the simple pack of 10 1,2 nimh 2600mah, the system  does not switch off but i cannot reach the "until oscillation occurs" (with Kd=0)..I believe that motors are not powered enough..

I'll try to build up another pack of 10 1,2 nimh 2600mah and put the 2 pack in parallel or try to order your same Lipo battery pack...

Any idea?

BYE,

Danilo


11  Community / Exhibition / Gallery / Re: Self Balancing arduino robot directly controlled with a Wiimote on: April 09, 2011, 10:54:26 am
Hi Timen,

I am following Your suggestion about using Pots to find out Kp and Kd...

Now I am facing problems on battery and motor current.

The battery I am using now is a "DC 12V 4800mAh Super Rechargeable Lithium-ion Battery" from ebay http://cgi.ebay.it/DC-12V-4800mAh-Super-Rechargeable-Lithium-ion-Battery-/120522024195?pt=LH_DefaultDomain_0&hash=item1c0fac2503

as soon as motors go back and forward all the systems shoots down and I have to power off and on again, arduino restarts..

I am using your same pololu motors and this as driver http://www.shop.robotikhardware.de/shop/catalog/product_info.php?cPath=65&products_id=112 ...

Did You ever face this kind of problems?
What kind of driver are You using (could You post a link)?
What kind of battery are You using (could You post a link)?

thanks,

danilo


12  Community / Exhibition / Gallery / Re: Self Balancing arduino robot directly controlled with a Wiimote on: April 07, 2011, 03:15:46 pm
Timen,

thanks again..

I am now working on this 3 actions:

1. make the bot higher (from 30 cm to 50 cm)..4 floors instead of 3...
2. use 2 potentiometers to change Kp and Kd without compiling and uploading each time...
3. use a 4800mah li-ion instead of a 2600mah mi-nh battery...

We are using the same Pololu motors, do You think that the new battery could drive better the motors?

bye,

Danilo


13  Community / Exhibition / Gallery / Re: Self Balancing arduino robot directly controlled with a Wiimote on: April 05, 2011, 03:26:49 pm
Timen,

i am using the same code You are using (more or less Kas style)..

the theory for PID tuning says:

For manual tuning, set all three constants to zero, then turn up Kp until oscillation occurs. 
Then turn up Kd until oscillation disappears.  Adjust Kd until the system is critically damped, i.e. there's no overshoot. 

Did You follow this rule?

Could You post a video of your bot drived only from Kp (IMU) until oscillation occurs?

I would like to understand what means "oscillation occurs".

Driving my boot only with Kp this is what happens:

Kp low the bot falls;
Increasing Kp around the " error zero" it vibrates a little bit then falls.

do I have to assume that " until oscillation occurs" means this vibration around  " error zero" or an oscillation should be more "important", lets says -20 __0___+20 or -40 __0___+40 in pids?

thanks,

danilo

14  Community / Exhibition / Gallery / Re: Self Balancing arduino robot directly controlled with a Wiimote on: April 04, 2011, 04:19:20 pm
congratulations..

I followed the kas guide and with his same components and pid values the bot was working fine..
I changed the IMU and cannot find the right PID values..

I read a lot of theory about PID, but...nothing stable as Your bot.

Are You using encoders? Do You use PID with angle and PD with encoders or what else?

bye,
Danilo
15  Topics / Robotics / Re: Using fuzzy logic (Balancing robot for dummies) on: February 20, 2011, 02:07:39 pm
Hi Patrick,

I really enjoyed the work that You and Kas did on the balancing robot.

My "balancing robot" is working quit well with the Kas PID (using encoders).

the only problem I can see is that the initial position (when the sensors are zeroed) does affect a lot the behaviour of the robot.

Is there any way to fix it ?

Kas said that the initial position is not so important because of the feedback of the encoders, but my expirience is different.

Any idea?

Are You working on a "fuzzy PID" ?

Is there any post where to continue Kas discussion?

Bye,

Prof
Pages: [1] 2