node-red-contrib-easy-pid-controller
v1.2.1
Published
A Node-RED node for implementing an easy PID controller
Downloads
96
Readme
Easy PID Controller Node for Node-RED
The easy-pid-controller
is a simple-to-use Node-RED node that provides Proportional-Integral-Derivative (PID) control functionalities. This node is designed to integrate easily with various control systems and offers configuration options for 0-10V
and 4-20mA
control signals.
Features
- Easy to configure PID parameters: Kp, Ki, Kd.
- Setpoint (
SV
) input for desired control level. - Process Variable (
PV
) input to feedback the current state. - Output values for PID components (P, I, D), final output signal, and mapped value signal.
- Choice of control signal types:
0-10V
or4-20mA
. - Real-time status updates during runtime for easier debugging and monitoring.
Installation
npm install node-red-contrib-easy-pid-controller
Usage
- Drag and drop the
easy-pid-controller
node into your Node-RED flow. - Double click on the node to configure its parameters.
- Connect it to other nodes to provide
PV
andSV
inputs and get the output signals. - Deploy and monitor the control signal in real-time.
Inputs
SV
: The desired setpoint value for the controller. Previously was part of the node's configuration, now can be sent as amsg.payload
with the topicSV
.PV
: The process variable or the current state of the system.auto
: Boolean signal. If set totrue
, the PID loop starts.
Outputs
The node outputs an object payload containing:
PV
: The current process variable.SV
: The setpoint.P
,I
,D
: PID component values.Output
: The final PID calculated signal.Value
: The mapped control signal according to the sensor type (0-10V
or4-20mA
).
Changelog
v1.2.1
- Added: Node status updates during runtime to display relevant information like current PV, PID activation state, and more.
v1.2.0
- Changed: Moved the Setpoint (
SV
) from node configuration tomsg.payload
with the topicSV
.
v1.1.0
- Added: New output value
Value
that provides the direct control signal based on the sensor type configuration. - Improved: Code documentation and error handling for invalid inputs.
v1.0.0
- Initial release with basic PID functionalities.
- Support for
0-10V
and4-20mA
signal types.
Contributing
Contributions to improve the node or fix any issues are always welcome. Please submit a pull request on the GitHub repository.
License
GPL-3.0 License. See LICENSE
file for details.
Example
Visit the examples/
directory for a sample flow illustrating the usage of the node.
Author
Harshad Joshi @ Bufferstack.IO Analytics Technology LLP, Pune