I'm not a guy from electrical engineering and I'm having a little trouble with a small garage project that I'm working on.
I want to use a photoelectric sensor to measure distances. I'll probably stick my sensor - an O1D105 - in a little board with a microcontroller to do some early processing and communication with a server. I'm used to dealing with components that already provide me some pre-processing of the data and communicates through SPI or serial RS232, but this is my first project with something of such a low level.
I don't know how to project a circuit to this DC PNP output that the datasheet is talking about. Also, I can't understand the pin diagram that was shown to me: what is L+ and L-? VCC and GND? And where is the output? Could it be pin 2, where the guy placed an amperemeter? It looks from the datasheet that I should measure the current to get an analog output for this device, but I could be wrong. And how do I connect this output to a microcontroller? Is it the usual workflow to find information about my microcontroller's input ports so that I can make sure that the output is in an acceptable range (I haven't chosen a microcontroller yet)?
Also, what should I start studying to figure this stuff out for myself? It looks to me that this is something really obvious to someone that works with the standards referenced by this component, but that I don't have a clue about.
About the distance between the controller and the sensor: there might me some meters of distance between them (probably no more than 5 meters) and it could be attached to a lamppost, so I guess I'll follow the tips to avoid noise.
Thanks for all the really detailed answers. I'm gonna try to work this out so that I can decide which answer was the most helpful, but I guess all of them could be the right answer. Thanks again!