Shift Register read problem

Hello, I’m designing a circuit, but I’m having a problem. I’m waiting for your help. I use a 7805cv voltage regulator and use the shift register (sn74hc165n) to evaluate the output data. But when I read the outputs with arduino, I can’t see that each input is individually high or low. The data in the output cannot be stable. When I make the entries Low sequentially, there is no problem. thanks in advance.

The shift register is a digital part. You’re not giving it a true digital signal input. Get yourself a DMM and measure the voltage at the SR inputs and compare that with the datasheet. I’d guess your LED voltage drop, ~2v, is putting the input in an indeterminate state.

When I feed the phototransistor between the cathode end and the gnd with 5V of the arduino, the problem disappears, but I want to complete the circuit with my own regulator circuit.

C1:1uF
C2: 1uF
C3: 220uF
Reg : L7805CV

What phototransistor?

SB-5243SC or BPW96C

tu92:
SB-5243SC or BPW96C

I don't see that in your circuit.

If you have an analog voltages to read you'll need to use an analog multiplexer, not
a shift-register, and send the input to an analog pin.

Alternatively if you want to threshold an analog voltage, a comparator or schmitt-trigger would
typically be used, so you don't get millions of unwanted transitions due to slowly changing voltages

There is an example that works with this scheme. And I want to run it the same way. As I said, the problem disappears when I make an additional 5V supply over the arduino between the cathode end of the phototransistor and the ground end. There is insulating varnish on the original PCB. Could the problem be caused by this?