Skip to content

PWM and Regulators

Pwm

Elements of page

  1. Frequency setting fields for PWM0 and PWM1 - PWM3 outputs (identical value for the whole group).
  2. Names, control and configuration of PWM outputs.

    In the upper part, there are name setting fields, output switch buttons, a slider and a fill factor setting field.

    In the bottom part there are configuration fields:

    • Active low - serves to reverse the switch and fill factor.
    • Mode ON/OFF - when this field is checked, the PWM output changes into a two-state output: on/off.
    • Brightening/dimming time - when set, PWM duty cycle will be changed over time, defined in this field (in seconds).
  3. The PID form contains the following fields:

    • Input - input parameter
    • Target value - desired value
    • Coefficients - coefficients Kp, Ki, Kd
    • Output filling - shows the current value of the PWM fill factor
    • Output - PWM output selection
    • activating the regulator function

Regulators

PID controller

The PID controller is used to control the PWM output depending on the input parameter so as to obtain the minimum error, ie the difference between the set point and the measured value.

A typical example of use is to control the heater's power to maintain the set temperature. Operation via PWM fill factor, in contrast to 2-state operation (on / off) with hysteresis.

The regulator contains three elements (coefficients):

  • proportional Kp - compensates for the current error
  • integral Ki - compensates for the accumulation of past errors
  • derivative Kd - compensates for the expected error in the future

Currently, the PID controller is experimental and you should test the operation of the system before leaving it unattended.

Extension of functionality

There is an extension board for Lan Controller v3 that allows the use of PWM outputs to control the load up to 2-4A (depending on the number of outputs used) and the voltage connected to the overlay input (maximum 28V).

In ON/OFF mode, it enables switching on/off connected receivers, eg LED lighting, sprinkling valves or fans. While in PWM mode, the fill factor slider smoothly regulate the output voltage. Ideally suited for, for example controlling brightness of LED strips.

The transistor outputs of the extension board are connected in a common + circuit (just like RGB LED tapes).