An interesting solution that can be provided in some cases is the one shown in the figure in which an adjustment trimpot is used. This adjustment trimpot allows you to bring the level of transition of the signal from the door where the trip is obtained to the ideal value. This allows even microprocessors that provide lower output voltages at their gates, such as some modern versions that provide 2.7 V or 3.3 V signals, can also be used in interfacing external circuits without having to change the circuit . Note that the reference resistors were calculated for two comparator supply voltages: 6 V and 12 V. For other voltages the reader can make the calculation, remembering that for a 5 V trigger output, the reference voltage level must be 2.5 V. Remember that the outputs of comparators LM139 / 239/339 are open collector, requiring a pull-up resistor. The maximum current drained by the output is 16 mA (tip) for a 5 V supply. This way, this step can directly excite transistors and other devices, with ease.