74HC595(shift register)+74AC540P(inverter) can not work.[Solved]

I used 74HC595(shift register) as a IO expander, and 74AC540P(inverter) to switch the optoisolator. But here is the problem, the shift register can not work correctly. For example, i sent 0x05 to shift reg, the bit 5 and bit 6 is ON.(sent 0x04, bit 4 and bit 5 is ON, and so on.Alike problem)

I connected UNO 5V pin to Vcc, but L led looks dim(Not enough power?). So, i connected UNO Vin pin to Vcc. Also measured 74HC595 & 74AC540P Vcc to gnd voltage is 1.1 Volt, so i think is the problem. How to fixed this problem? Or other bug cause to this problem?

Plz help me, thanks.

PS-the attachment is circuit diagram.

What is the resistance from 5v on 74HC595 to GND.

Show a good image of your wiring.

OP's cct.

Why the inverters.
The 595 can source and sink, so can drive both opto LEDs.
One resistor/LED between output and ground, and one resistor/LED between output and 5volt.

You might however need separate timings for both (slow, 5ms) optos,
becasuse of possible shoot-through (both being 'on' at the same time).

What are you switching.
Leo..

Wawa:
Why the inverters.
The 595 can source and sink, so can drive both opto LEDs.
One resistor/LED between output and ground, and one resistor/LED between output and 5volt.

You might however need separate timings for both (slow, 5ms) optos,
becasuse of possible shoot-through (both being 'on' at the same time).

What are you switching.
Leo..

Because i want use a bit(an IO) control a pair of opto act like flip-flop(output HV or HV_GND).The circuit took reference from here(support info have circuit diagram). According to above ref, i think the switch time is fast enough to prevent shot-through (not try yet).

kevin94chen:
The circuit took reference from here.

You have posted a link to a Zip file. :astonished: Need to give us a proper Web link

Your diagram:
768d498283324c4e739e5c0113aa485e40786b22.png

You can totally do this without the inverter... by placing the INTERNAL OPTO LEDS in opposite polarities across each other.

pwillard:
You can totally do this without the inverter... by placing the INTERNAL OPTO LEDS in opposite polarities across each other.

Wawa:
Why the inverters.
The 595 can source and sink, so can drive both opto LEDs.
One resistor/LED between output and ground, and one resistor/LED between output and 5volt.

You might however need separate timings for both (slow, 5ms) optos,
becasuse of possible shoot-through (both being 'on' at the same time).

What are you switching.
Leo..

r u said like this?

And i found the problem, i forgot add limit resistor in inverter Vcc. After add resistor is work like a charm!

YUP