Make sure that this circuit is safe
If you have a clean 5v power supply, then yes this would be safe. But check the Application Circuit in the datasheet. They have R1 resistor for current limiting &amp; C1 de-coupling capacitor for protection against power-supply noise:

R1 and C1 are recommended for protection against EOS.
Components should be in the range of 33 Ω &lt; R1 &lt; 1 kΩ,C1 &gt; 0.1 µF


This is digital output signal. Check the internal circuit  &amp; timing diagram to be sure. The internal switching BJT is there to provide digital output.