Go Down

Topic: Arduino PID Library (Read 62632 times) previous topic - next topic

RKalaf

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.


zer0vector

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!

Fahad Mirza

#122
Jan 23, 2011, 11:31 am Last Edit: Feb 02, 2011, 07:25 am by Fahad Mirza Reason: 1
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?

Go Up