I'm doing a project where I use a 74HC595 output shift register. I've done a simple LED circuit (reference https://www.arduino.cc/en/tutorial/ShiftOut, and I corrected the decoupling capacitor issue) to test it and also adapted it to control some relay modules (the relays are opto-isolated, no excess draw!). I'm also controlling the output enable via the Arduino to deal with the boot-up but something strange still happens: when I boot the circuit the output pins' voltage dips below ground for about 150us, after that rising to the expected 5V (measured with a cheap oscilloscope but it's there).
I didn't notice it at first with the LEDs since, well, they're diodes, but sure enough the relay circuit uses inverted logic so I was able to see some blinking in their LEDs. When I inverted the LED circuit (cathodes to 595 outputs), the LEDs also blinked for a split second, confirming the oscilloscope observation.
Now my first set of questions would be: why does this happen, is it normal and unavoidable, or am I doing something wrong?
More pragmatically, the final circuit will use the 595 outputs to control a set of NPN transistors, which in turn control other devices not relevant for the question. So my second set of questions is whether this very short "blink" would produce any undesirable effect on the switching transistors (analysing gate currents and voltages is something newish to me); and if a way to correct the problem would be to add diodes to the 595 outputs to prevent this. Might be overkill, but I'm also trying to learn the pros and cons of each approach, and if I can get a "perfect" output the better.