One resitor will only limit the current but not the voltage. So you need a voltage divider using two resitors.

Vin are the 5V pulses from the sensor, using a 2k2 (R1) and a 3k9 (R2) resistor will limit the output voltage (Vout) to a safe 3.2V puls.
1 Like