Go Down

Topic: Speed or cruize control (Read 885 times) previous topic - next topic


Hi guys,

I came across this frequency library: http://interface.khm.de/index.php/lab/interfaces-advanced/frequency-measurement-library/

I made the the input network, it reads 100%

As soon as I enter myservo.attach(9); or any other pin on the arduino for that matter the frequency readings go haywire, leading me to believe that within the library they used up all the pins?

On to the next.....


Nov 02, 2015, 10:16 pm Last Edit: Nov 02, 2015, 11:28 pm by frankjell
Hi, I'm new to this Arduino stuff and forum, just ordered my first one yesterday....
Anyhow, I'm a 57 yr old process engineer, I have worked with PID controllers when most of you were just a thought...
As I read that your system hunts I immediately think: the settings for PID controller are not correct.
You have "Kp=0.1, Ki=0.2, Kd=0"

Kp is a variable from ( I presume in Arduino) 0 - 1 though in the old analogue days it was 0-~500%. A normal setting was then somewhere from 80 - 200%.
If Kp = 0 it acts like a non-proportional controller, not able to establish a stable situation (oscillating fast), if it is to high the controller will be very slow acting (oscillating slow). I would try to set it at .3 and see what happens.

Ki is in normal life set in seconds, I don't know for Arduino but I assume that it is the same. Try 30 seconds and see what happens. The fluctuations should be much smoother. Ki acts like a brake on the output from the Kp action..

Kd is normally also in seconds, set this to 120 seconds. Kd will diminish the difference between set-point and measured value in stable situations in the controller.

Hope this old man helped you a bit.

Regards Frank from The Netherlands.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131