Lcd to display pot voltage

Yes. You need to use two resistors connected in series, as a potential divider. If you Google that, you'll find lots of information.

In this case, you will need to connect 0V of the sensor (pin 3) to 0V of your Arduino. Next, conect a 1k resistor between 0V and the Arduino input you want to activate. By Ohm's Law, to get 5V across this resistor you will need 5mA to flow through it, (V = IR, so I = V/R = 5V/1000ohms = 0.005A = 5mA).

Next, connect a 1k5 resistor from the sensor output (pin 2 if you want the signal to go high when the beam is interrupted) to the Arduino input, where the 1k resistor is connected.

Now you have a series total of 2k5 (2500ohms) from the output to 0V. If you operate the sensor at 12V, you will have 12V at the sensor output pin 2 when the beam is interrupted. By Ohm's Law, (V = IR), you can find the current by solving for I, which gives I = V/R = 12V / 2500ohms = 0.0048A = 4.8mA. This is very close to the 5A we are looking for.

To check, we again use Ohm's Law to see that the voltage across the 1k resistor, which is the voltage at the Arduino input, is V = IR = 0.0048A * 1000ohms = 4.8V. The Arduino will see any voltage above 3.5V as a High signal, and anything less than 1V as a Low signal.

I hope this help you. :grin: