How can I connect a 24v-powered inductive proximity sensor to a 3D printer control board?
simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. The simplest solution.

Just be careful that no accidental 24 V connection is made to the signal line. If the microcontroller has internal pull-ups R1 can be omitted.


  I think internally to the sensor, the "sense" output will be pulled up to the 24v input when it's not triggered; I believe that would damage the microcontroller?


It would if there is an internal pull-up but you said open-collector. Your link points to a catalog page and there is no datasheet. (This should have been enough to discourage you from a purchase.)

Testing is easy to do:


Power up the sensor with a high-value resistor - 1 M&Omega;, say - between the collector and ground and your voltmeter across it. 
Move the target into and out of range. If the voltmeter reading stays close to zero then there is no pull-up. If it increases towards 24 V in either state then there is.










simulate this circuit

Figure 2. Using an opto-isolator provides level-shifting and prevents accidental connection of 24 V to the microcontroller. This version uses the opto-isolator in active-high mode. Swap the positions of Q2 and R1 for active-low mode.