reading 24v input from multiple production presses

Hi I am a programmer but new to electronics. I need to modify an existing data collection system to get data automatically from a number of presses. The local engineer can provide a 24 volt signal from each press when ever a part is made. The principle of reading a number of digital pins and passing the pin number when a voltage is detected to the serial port for my vb app seems fine. How would I reduce the 24 volts to 5 and would I just need a single wire from each press to a digital pin or would I need to ground also? I said I was new to electronics!

Thanks in advance

chris

If the 24v supply is reasonably well regulated and doesn't have any significant electrical noise on it you could use a pair of resistors as a voltage divider to drop the 24v down to the 0-5V range. If it isn't clean you could use something like an optocoupler between them to isolate and clean up the signal. You would need a ground wire as well as the signal wire to each device. Perhaps the machines all have a common ground, but if not then the optocoupler approach would enable you to keep them electrically isolated.

but if not then the optocoupler approach would enable you to keep them electrically isolated.

From what you describe, this is how I would do it.

The reason you would do it that way is because opto-couplers have been the interface of choice for industrial equipment to uProcessors since microprocessors have been available. I would add that the "upgrade" version of that interface is probably fiber-optic because it maintains the isolation but adds the benefit of really long cable runs.