Can I use a 3.3V linear regulator to level shift a 5V square wave down to a 3.3V square wave?
What is the comparator part number? Does it have an open collector output? – Transistor


  It's an LM393, and it has an open collector output. – Shock-o-lot








simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. (a) Comparator with 5 V pull-up. (b) Comparator with 3.3 V pull-up.



Figure 2. LM393 internals showing the open-collector output, Q8.

The open-collector output can be used as a level shifter for this application. It also makes a very simple way of ANDing the outputs of two or more comparators as, for example, in a window comparator circuit.