I am working on a data logging device that will record production data from various CNC machines and robots on our production floor. The PLC's and robot controllers will pulse a 24V output when an event happens. My device needs to recognize that event and post it to a database log on the network.
I have created a circuit with a resistor divider connected to an optocoupler. The optocoupler is connected to the micro with a pull-up resistor. (see attached schematic)
This schematic is the result of about 10 hours of searching the on the web. I have breadboarded this circuit and it seems to work. My question is 3 fold:
thanks
Chris
I have created a circuit with a resistor divider connected to an optocoupler. The optocoupler is connected to the micro with a pull-up resistor. (see attached schematic)
This schematic is the result of about 10 hours of searching the on the web. I have breadboarded this circuit and it seems to work. My question is 3 fold:
- have I missed anything here
- how do I protect this from noise as the plc will also be driving relays and valves
- how do I add a led on the micro side to provide visual indication of a signal
thanks
Chris
Attachments
-
4.8 KB Views: 40