I'm asking you for advice to bridge the electronic sides of my project. Two light barriers will be polled for objects passing the lights, when an object passes and triggers a barrier, the barrier provides +12V on one of it's connections. The Arduino is programmed to watch for +5V on two pins.
What I need to know is a simple and reliable way to feed those two +12V signals into the Arduino. Done directly, it would damage the Arduino.
One way could be using two standard 5V regulator circuits (one circuit for one light barrier) based on a 78m05 and three capacitors, which should regulate the 12V (object detected) down to 5V.
Another approach, using a LM317K and one resistor, is described here http://www.roboternetz.de/phpBB2/konstantstrom.php
Would you agree on either of these, is there a more straightforward solution?