Pages: 1 ... 7 8 [9]   Go Down
Author Topic: Arduino PID Library  (Read 53725 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the replies guys!

As a matter of fact i´ve found out that the analog accelerometers and Gyros i was using as an input for the PID were too noisy. Even kalman filtered data produced noise that reflected on the output as exagerated or undesirable behaviour.
I got in touch with an italian gentleman that has tested the stabilization with a similar setup to mine, and he told me he used the "Wii Nunchuk + Wii Motion Plus" IMU approach, as they are now well-known devices and output directly to I2C (no noise).

I´m currently about to finish building my second prototype and start experimenting again.

I´ll keep your advices in mind and let you know in a few days how it goes.

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

fiveohhh
Quote
I'm planning on doing the same thing in a few weeks here(with an lm335 though).  What did you do to waterproof the sensor?

I had nothing but trouble with the LM temperature sensors.  I couldn't get stability regardless of the resistors I used.  Averaging might work better for you than me, but I had enough and just gave up.

The one-wire sensors from Maxim are accurate and dead easy with the existing libraries.  

Anyway, I've waterproofed one or the other a few different ways.  The best I've come up with so far is putting the chip in a piece of heatshrink tubing, filing the tubing with silicone sealant, letting the sealant almost set, then heat shrinking the tubing to tighten it all up.  It's the best compromise between waterproof and quick temperature response that I've had so far.  

Good luck!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi br3ttb,
              Nice work out there. Library is awesome.I am still studying, not implemented yet. But I like to ask you something. There is a function that is:

void SetSampleTime(int NewSampleTime)
{
    if (NewSampleTime > 0)
    {
      //convert the time-based tunings to reflect this change
      taur *= ((double)NewSampleTime)/((double) tSample);
      accError *= ((double) tSample)/((double)NewSampleTime);
      taud *= ((double)NewSampleTime)/((double) tSample);
      tSample = (unsigned long)NewSampleTime;
    }
}

I am confused about this line:   taud *= ((double)NewSampleTime)/((double) tSample);
Shouldn't it be:     taud /= ((double)NewSampleTime)/((double) tSample);
                    or  taud *= ((double)) tSample/((double) NewSampleTime);

I mean: taud=TauD/tSampleInSec , right?
« Last Edit: February 02, 2011, 01:25:12 am by Fahad Mirza » Logged

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