Optocoupler and converter on which board

Hello everybody. New to KiCad, new to DIN rail enclosures.

I am busy with a 2-3 PCB project. Because I am not sure how much space I finally need to choose a Enclosure, I need some advice about a placing a set optocouplers and isolated dc-dc converter. The opto transistor inside the optocoupler is feed by the isolated power supply.

I have 6 relays 5vdc ( controls main devices ) and are controlled by a RP2040 through those optocouplers.
Depending on the final schematic I have to choose if I go for an din rail enclosure with two or three levels of PCB’s. Top PCB is buttons and signals and is not included in my worries hereafter.

My worries:
Lets say I need two PCB’s ( top board not included ).
Where should I place the optocouplers? On the control pcb or on the relais high voltage pcb ? My first thought was on the relay board, but then what about the wiring length from the RP2040 board to the relay board. Is the current / voltage enough to avoid noise from the 230vac and relays switching? BTW I do use a transistor to amplfy the current and voltage from the RP2040 to the 5v optocoupler.

The same for the isolated dc-dc converter to supply the 5vdc on the relay board. On the control board next to the other 5vdc/3,3vdc for the logic or separated/isolated on the relay board?

What are the pro’s and con’s of each?

I can use hierarchical sheets for this, but what if I have enough space so I can build just one board. Do I need to create two projects or 1 project with two schematics with a naming difference? Or is there any other trick to draw 1 schematic with non or minimal effort to create one or two pcb’s.

The last question’s are not only for the set of PCB’s but also for future projects.
Thank you.

For my last question about board managing I did found this;
https://forum.kicad.info/t/multi-pcb-project-idea/17657

It got several ideas that I can use.

Now the first couple of questions, anyone?

I don’t understand what for are you using optocouplers. You need two insulations? Relays provide insufficient insulation that you have to reinforce it?
If you really need two insulations than your main concern will probably be how to ensure right clearance and creepage distances for each of them and it will determine your decisions about where to place each element.

Wiring length inside a DIN rail box can be a concern if you transmit high MHz signals through that wires. I don’t expect you switch the relay so often.
I used to use optocouplers to make a current loop transmitting signals on a 1200m distance (4800 bps).

Hi, and thank you for your reply.

I am not concerned about that I need creepage, clearance or distance, and how much. Its more about the final board size that makes a decision if it will be one or two boards.

Relays can fail, devices behind the relais can fail.
Circuit breakers can fail. A normal fuse will be inthere too.

Btw Next besides the relais, I will also add a sloth between the left an right side off the optocoupler. Maybe overkill, but it cost nothing more at the end. Btw, can Kicad calculate creepage length? Or does exist there a calculator for those needs?

Any other pro or con?

As for now, I will place them on the relay bord, and place the connectoren ( using wire’s ) above each board in line. I also was concerned about the environment where the enclosure will be placed.

So you assume breakdown of relay insulation and because of it you add optocouplers.

If you only assume relay coil shortage then driving it with transistor with limiting current (current source-like construction) could be enough to protect your RP2040 (I don’t know what it is and didn’t searched for it). The other solution can be using InteliFET or OmniFET to drive relay coil.

But right. Optocouplers gives better protection.

I don’t know if KiCad can calculate creepage or clearance.

I am using DIN rail enclosures, but except one I have only one PCB inside. That one has a controlling PCB placed vertically on the main PCB.

Currently creepage is not handled in KiCad.
The calculator tool has a clearance table and on top there is a lot to be found in the web.

Good suggestion. In the beginning I was thinking about, but thought maybe on one board, and did forget about it. I was thinking about for each set of two relays on that vertical board, easy to exchange. Cheaper because the board could be less than 100x100mm. Each board with their own set of Knopf and signalling.
Thinking about loud
set of relay boards
1 power board
1 logic board
all reusable.
Thank you for helping reminding this. But then I have to figure out how to use/place the Wire-To-Board Terminal Blocks.

Thank you, I will check the calculator tool.

My first solution was to use 2mm 2x20 pin headers and vertical PCB (thickness 0.8mm) inserted between pins. That soldered - disassembling not assumed.

Cheap but great solution.

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