Posts: 1
Joined: Thu Sep 06, 2018 7:15 am

Implementation of PID controller using Qt creator

Thu Sep 06, 2018 7:29 am

I'm very new on qt creator kindly help me on writing algorithm for pid controller using Qt creator to control temperature and humidity inside the chamber. I'm using HTU21D sensor for my project.

Posts: 12148
Joined: Tue Jul 17, 2012 3:02 pm

Re: Implementation of PID controller using Qt creator

Fri Sep 07, 2018 9:36 am


You question is a bit too vague and general to answer properly. You mention PID and Qt, which implies you are working in C++. You mention a specific sensor.

Which part(s) are you having difficulty with:

a) Understanding the PID control algorithm,

b) Writing an implementation of PID in C/C++,

c) Creating a user interface with Qt,

d) Using C++,

e) Reading the sensors

The PID control algorithm is very simple and described all around the internet. For example:, Actually using it properly can be rather application dependent and difficult to tune the parameters. Usually requires a good deal of experimentation before getting satisfactory results.

Actually writing a PID algorithm is also very simple in any language. It's only a handful of lines of code and some simple arithmetic. If you are lazy you can find source codes for PID all over the net as well. For example: and ... iniPID.cpp

Creating a user interface in Qt is to big a topic for a forum thread. Again there are articles and blogs about using Qt all over the net.

Programming in C++ is too big a topic for a forum thread. Again, see internet.

I know nothing about the sensors you have there.

Return to “C/C++”