Numerous outputs are so-called ‘open collector’ outputs. Understanding how to use those is important to avoid damage to the controller.
An open-collector output means it switches the connected wire to GND. This enables the user to switch devices that do not need the same voltage rating as the controller.
In the image below such an output is shown.
This output can directly be used, for example, to switch a relay. If a logic signal is needed a pull-up resistor is required.
Please note, an open-collector output can not be measured with eg. a multimeter, to test an output connect a 10k resistor between the output and +5V or 24V, now you should be able to measure this output switching.
Connecting an open-collector output directly to a positive voltage eg. 24V will cause a short-circuit damaging the board.
The drawing below shows how an open-collector output connector can be used to create different output signal levels by using a pull-up resistor. The value of this resistor can vary depending on the load of the output. Typical values are 4.7k or 10k.
With open-collector output, it is very simple to use a relay in order to switch bigger loads. Connecting a relay is shown in the drawing below.
In the above example, a 5V- and 24V relay are used, and both will switch. However please consider that a 5V relay will need more current to switch. This can limit the total number of used relays because of the maximum total current that can be switched.
in case a relay is used, a fly-back diode MUST be connected as shown in the figure above. This is necessary to limit spikes that occur when switching a relay. A typical diode that is used is e.g. 1N4007. Note that the diode is polarized and should be connected the right way or damage could occur to the output of the controller. Below is an image showing the connection of a diode.