I am trying to read data from a circuit I created recently. But I do not understand if there's something I have missed in the same, since everytime I read data on my microprocessor, it always tells me that all inputs are LOW. I am using few opto-couplers PC817 for reading signals that are in terms of 24VDC.
I tested the optocouplers after activating them and it is working as expected, however I read nothing on the 165's. To test, I supplied 24v to one of my opto-couplers, and on the output I could read a resistance (using a multimeter) of 122 ohm when active.
I can share the code (Arduino - C) if needed, but I think this is more related to circuit/connections not the code.
Below is my circuit diagram.
Note: I have shown 4xPC817 optocouplers and 2x74HC165 in daisy chain configuration (to keep schematic simple). But I have 3 such 74HC165 and all data input pins have one optocoupler connected, so it means there are 24 such opto-coupler.
I checked the voltages and below are the numbers on testing:
- Between optocoupler Pin 1 and 2 - 1.14 VDC (Resistance 122 ohm)
- (Active) Between 74HC165 Pin GNT and Data Input Pin - 0.02 VDC
- (Inactive) Between 74HC165 Pin GND and Data Input Pins - 4.02 VDC