0
\$\begingroup\$

Here the schematic of a small board with a 74HC595 shift-register:

schematic

Here the detail of each output. They are connected to QB..QE.

output

Nothing is connected to the collectors of BJTs and the board contains no other components. The signals (SER and SRCLK) come from an external MCU that drives the lines with an optocoupler.

The MCU takes care of the correct output bits and the common "trick" to derive the RCLK signal from the last clock bit.

On my bench all works like a charm. I have several boards (and several MCUs) and all is fine. But the very same setup tested on a customer's system leads to a weird behavior: when there is at least one bit enabled, sometimes also other outputs go high.

I checked with the oscilloscope to find some spikes or other noise (the system is surrounded by a lot of DCDC converters):

waves

The signals seems quite clean to me. To set a bit high a spike should be reach more than 3V during the clock edge. Please note that if I send all zeros it never happens that an output goes high. If the noise would be there, it should act regardless the actual data.

What if this is an xy problem? I mean, what else can lead to an high level on the outputs other than put the SER signal high during the clock edges?

\$\endgroup\$
5
  • \$\begingroup\$ Which brand (manufacturer) of 74HC595 are you using, ans where was it sourced from? \$\endgroup\$ Apr 15 at 13:11
  • \$\begingroup\$ The red signal looks suspicious, like it doesn't have a proper ground reference, almost like it is AC coupled. Red = SER, blue = SRCLK? We may need to see more of the circuit on the left side. \$\endgroup\$
    – Mattman944
    Apr 15 at 13:19
  • \$\begingroup\$ @Mattman944, I don't have the schematic of the board on the left side, but I see there are ACPL-247. Emitters go to pin 2 of J2 and J3; collectors to pin 1. \$\endgroup\$
    – Mark
    Apr 15 at 14:34
  • \$\begingroup\$ @BruceAbbott, I'm using HC595 from TI, bought from Mouser few months ago \$\endgroup\$
    – Mark
    Apr 15 at 14:35
  • \$\begingroup\$ ... what else can lead to an high level on the outputs ... Voltage spikes on the signals that exceed the specified minimum or maximum voltage can upset flip-flops inside ICs. Your plots do not support this cause, but since you asked ... \$\endgroup\$
    – Mattman944
    Apr 15 at 16:49
1
\$\begingroup\$

The real reason might be just too slow signal at RCLK, or even on SCLK.

For example the TI 74HC595 has a maximum input transition rise or fall time of about 400ns at 6V or 500ns at 4.5V.

It means the signal may not spend more than the abovementioned time in the input threshold region between 0.5V and 1.5V, or there might be double clocking.

The RCLK will have very slow edge due to 10k resisor and 100nF capacitor. If I have it right, it takes about 270 microseconds. That is about 500 times too slow edge so it is definitely outside recommended operating conditions.

As the scope traces show, also the SCLK is driven with a relatively slow rising open-collector optocoupler output, it can be seen from the shark-fin like appearance. This clock should also be checked to be within required rise time.

The data should have ideally have fast edges too, as slow edges have also other implications, but at least it by itself does not cause double-clocking. The red data trace has also weird droop and goes negative which may indicate other problems in the circuit or measurements.

\$\endgroup\$
3
  • \$\begingroup\$ I saw this approach used by others like these: romanblack.com/shift1.htm. The transition on RCLK is certainly out of specs. I don't think I can shrink all to fit this edge below 500 ns, unfortunately. \$\endgroup\$
    – Mark
    Apr 16 at 4:35
  • \$\begingroup\$ @Mark - you are selling a product based on an hack by a stranger? Add a separate RCLK signal, or use a Schmitt Trigger to clean up the edges after the RC (74AC14 or similar). \$\endgroup\$
    – Mattman944
    Apr 16 at 9:10
  • 1
    \$\begingroup\$ @Mark Many things seen on Internet are unfortunately not good examples. Hobbyists and tinkerers may show something they made once and it happened to work for them but will not work in real life perhaps due to component tolerances or with chips from different manufacturers, or they are powered up differently. I'd still recommend figuring out why your red trace looks all weird, it may provide more reasons why it does not work. Maybe you have a broken supply or ground connection somewhere. \$\endgroup\$
    – Justme
    Apr 16 at 9:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.