This is the link https://m.indiamart.com/proddetail/ago-20-single-infrared-beam-sensor-20-m-25335495762.html for a sensor which operates on 12V so we can't connect to the micro directly because the micro operates on 5V. I understand that for this we need a circuit that converts the output of the sensor to 5 V
My question is whether it would be good to use voltage divider or optocoupler to convert voltage from 12V to 5V DC?
My question is whether it would be good to use voltage divider or optocoupler to convert voltage from 12V to 5V DC?