Challange to make reliable IO extension

Hello folks,

long story short.

First part of the story here:
https://forum.arduino.cc/t/74hc595-and-74hc165-with-4-or-5-pins-at-most/1099902

MCP23017 was failing in control cabinet due to the contactor coil switching. Therefore I decided to try 74HC shift registers. Tried to consider all PCB design recommendations from you in new design. Well at least up to my knowledge...
The board is working flawlessly, just 4 pins to control as many IO I need and speed is awesome. But it is cool only until the coils in the control cabinet come into the game. The contactor AC coil switching gives to my IO board good ride, outputs I switching randomly, but most often all of them ON :smiley:
It is happening even if input signal (which were originally connected to 3 AC contactors on bottom DIN rail) cables are disconnected from contactors and IO board completely.

Switching any of small 24VDC relays on middle DIN rail do not case any malfunction, but I noticed it does when I disconnect/connect relay manually (spike by sudden coil disconnection from the circuit?).

By the way, all AC cables are only in between bottom and middle DIN rail, and 24VDC and 3.3V is only in between upper and middle DIN rail. Both DC PSUs DC- are connected to earth (green/yellow).

So yes, my second generation of IO board is still very crappy. I am noob and I have obviously some significant flaws in my PCB design. And yes, I do not want to give up, I want to make it!

I will try to provide all possible information here and I will be glad if you can share your knowledge in order to help me to design next PCB attempt better.

EMI issue is obvious. Most likely very poor design of grounding and ground loop issues. Maybe some other schematic design flaws?
As I want to make IO rock solid, I did intensive online research, but it is real science....

I found guy who was facing very similar issues, and he tried many counter measures, nothing really successful. Finally he ended up by adding RC filter at latch pin and clock pin. It could get rid of EMI problems. Full post can be seen here: https://hstech.ro/HC595/

RC filter design is here:
image
He added it only to latch line, but I am going to added to clock line as well. As far as I understand it, I have to add that RC filter in front of every HC595 IC.

Because I do not want to make board bigger, I will need to learn how to draw 4 layer board. Most likely:
1st layer 3.3V, 2nd ground plane, 3rd ground plane, 4th 24VDC layer... or what do you think? Not sure if I could avoid 4layer somehow..

Current schematic in attachment.
IO_24DO_8DI_SHIFTREGISTER_r1 - Schematic.pdf (189.8 KB)

PCB design here, ground trace highlighted:

Shift register top side PCB, bottom side for ULN2803 and opto-couplers. There is many Vias to connect all channels...

Anything else could be improved? Any idea, just go on please..

By the way, slow down in code does not help at all. Tried 500ns between each bit, there was not improvement at all.

Thank you in advance for your feedback and support! Best regards Mira

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.