A universal binary input module , comprising: an input configured to receive a direct current (DC) binary input voltage or an alternating current, AC, binary input voltage, wherein the binary input voltage can take two possible states indicated by a voltage magnitude of the binary input voltage, an input protection circuit configured to provide overvoltage protection from the binary input voltage, a rectifier configured to derive a direct current, DC, input voltage from the binary input voltage input, a power supply circuit configured to use the binary input voltage to power the binary input module, a converter circuit configured to convert the DC input voltage into a binary output signal, a galvanic isolator having an input connected to receive said binary output signal and a galvanically isolated output configured to output the binary output signal, wherein the converter circuit comprises an integrated microcontroller having an inbuilt analog-to-digital converter, ADC , an input port connected to receive the DC input voltage, and a serial output port connected to the input of the galvanic isolator , and wherein the inbuilt ADC of the integrated microcontroller is configured to convert the DC input voltage at the input port into N-bit digital values presenting the voltage magnitude of the binary input voltage, the integrated microcontroller is configured to encode the N-bit digital values into a pulse position modulated, PPM2, binary data stream, and the integrated microcontroller is configured to power the galvanic isolator and drive the galvanic isolator with the PPM binary data stream through the serial output port. an input configured to receive a direct current (DC) binary input voltage or an alternating current, AC, binary input voltage, wherein the binary input voltage can take two possible states indicated by a voltage magnitude of the binary input voltage, an input protection circuit configured to provide overvoltage protection from the binary input voltage, a rectifier configured to derive a direct current, DC, input voltage from the binary input voltage input, a power supply circuit configured to use the binary input voltage to power the binary input module, a converter circuit configured to convert the DC input voltage into a binary output signal, a galvanic isolator having an input connected to receive said binary output signal and a galvanically isolated output configured to output the binary output signal, wherein the converter circuit comprises an integrated microcontroller having an inbuilt analog-to-digital converter, ADC , an input port connected to receive the DC input voltage, and a serial output port connected to the input of the galvanic isolator , and wherein the inbuilt ADC of the integrated microcontroller is configured to convert the DC input voltage at the input port into N-bit digital values presenting the voltage magnitude of the binary input voltage, the integrated microcontroller is configured to encode the N-bit digital values into a pulse position modulated, PPM2, binary data stream, and the integrated microcontroller is configured to power the galvanic isolator and drive the galvanic isolator with the PPM binary data stream through the serial output port. <EOS>