Help needed with PCB design based on existing project

@paulvdh. I think this is very important sentence about that project. I write it just to ensure you won’t miss it. I have never dealt with pump control, but it seems to me that this is not a trivial issue if you want your relays to work for a long time.
Do you know that one of the effects of diode in paralel to relay coil is that the current in the coil drops slowly and its contacts move away more slowly which favors the formation of sparks on them which can kill the contacts.

Peristaltic pumps and AC motor driven water-pumps (with contactor and motor protection circuit breaker). Maybe it mathers what king of pumps they will control.

May be.
My knowledge about pumps is zero, zero, nothing.
The most important question is how big spark (energy ?) their windings can generate when switched off.

Up until now I’ve just been having some fun and giving some general advise without taking any responsibility. From what I understand Cosmin does not know much about electronics nor about PCB design and would like to have a 100% finished PCB.

If the PCB relays are just driving bigger contactors then that is a good solution for higher powered motors, but in that case the relays do not need to swich 10A as you suggested earlier.

Getting all the details right to get to a finished and reliable product is a lot of boring work, and I do not have much interest in that.

I do not want you to take responsibility for the PCB, I am aware that is not the case. I just wanted you to help me get the PCB as close to a functional and stable PCB as possible, taking into account the advice and help so far. The project is and will remain for personal use, so there is no need to discuss responsibilities or things like that.
Indeed, until this PCB I had no idea about PCB design and indeed my knowledge of electronics is not very extensive but I like to get involved and I’ve learned alot since I started this project but in this stage, when it comes to EMC, ESD, and other things that need to be take in consideration, I’m overwhelmed.

One of the pumps draws 5-6A and will not be controlled by a contactor, but another pump that draws 10-11A will be controlled by the contactor. That’s why I need the relays to “hold” 10A.

I never like the idea on high currents through a PCB much.
It places high demands on the solder connections and the quality of the connectors, and it increases the risk for fires.

Once you have made the choice to use a contactor for a big motor, then you also need a power supply for that contactor, and probably want to place it on a DIN rails. Once you go that far, it is a very small step to also use a (smaller) contactor or DIN relay for smaller pumps or other motors.

Yet another thing I thought of just now is that the power for 6 relays comes from your very small DC-DC converter, and 5V relays of that size need a fair amount of current to drive their coils. It is unlikely that your DC-DC converter can deliver enough current to drive 2 or three relays at the same time. And there are a lot of considerations like that.

Yet another one is wires from a connector routed directly to an I/O pin. For example PB2, PB3, PA7, your NTC’s and probably more. For a robust design (and also for EMC) these need some kind of protection and filtering. Something as simple as a series resistor can be enough, but there is no guarantee.

Would it be possible to use 2 DC-DC converters in parallel? One for those 4 relays (nominal current of 40.0mA each) and one for the rest of the board?

Done! After I moved them manually, I discovered the “flip” function. :rofl:
Relay

Not.
Transistor is still wrongly connected.

1 Like

:man_facepalming:2 is swapped with 3, right? 2 should be imput (base).:man_facepalming:

Not only that. R10->2, 3->GND, 1->LED.REL.3
Collector has to be positive relative to Emitter for an NPN.

1 Like

I will delete them and make the all over again.

What are your goals regarding to electronics?
Knowing how to connect transistors and relays is somewhere at the start of the learning curve.

At the moment I think you are better off to start experimenting with a breadboard and some parts instead of this PCB project.

This is the way a NPN BJT is usually used to switch a relay:

I agree with you, but since I had no one to make my PCB, I had to venture. I tried to run before I learned to walk, but I didn’t have much choice to make the PCB. At the beginning of the post, that’s exactly what I asked for, to find someone to make the PCB in my place (for a fee), but since I couldn’t find anyone, I started even if I didn’t have the necessary knowledge.

I had another look at your schematic and I noticed the two other relays:
image

First, the transistor is connected as normal and I wonder why you have not spotted this yourself earlier.
The value of 240Ohm is a bit lowish, but it probably works.

But I mostly wonder why those two relays are there at all.
Why not just connect the “ORP” and the “PH” sensor do different analog inputs of the ATmega and let the microcontroller handle it?

And why are you using a DC-DC converter?
Where is the power coming from?
You already mentioned earlier that there are big pumps involved and you are using at least one external contactor (relay).

You also always have to consider the worst-case scenario.
I once read a story of a pool controller that dumped all the chlorine in the pool because of a sofware glitch. That was not only very unhealthy to swim in, but it also cost a lot of money because that stuff is apparently also quite expensive.

The interfaces of the PH and ORP sensors do not have galvanic isolation and therefore the measurements take place in turn, so the relays alternate between PH and ORP.

In the automation panel with the rail in, I already have a 12VDC switching source and I will supply everything from it.
The biggest pump is 3 HP but the coils of the contactors need a very small current, less then 0.5A. I don’t need power from the board to control the contactors, the contactors I use have 230V AC coils and I only use the relay to switch the A1 (Live) terminal off the contactor’s coil. Here’s an link with one of thr contactors I use in general:

If this happens, apart from the costs, no health accidents can happen because the chlorine we use in swimming pools, regardless of whether the whole 20 liters container is dosed in the pool, there are still 35000 liters of water and would dilute enough to be less dangerous. In addition, such a high concentration of chlorine in the pool gives off an odor that feels very easy even outdoors.

Which option do you think would be better?

  1. To put two DC-DC converters in parallel to power all the board and all the relays on the board;
  2. To put two DC-DC converters but separately, one to power the board and the other to power the 4 relays (K3-K6).

I would not use DC-DC converters at all, but just add a simple external transformer and bridge recitfier on the PCB.

I would power the relays directly from the rectified DC (12V or 24V) and then use a voltage regulator for the microcontroller and sensors. Current is so low that it’s probably not worth to bother with a SMPS.

I already have 5VDC 2A power supply laying arround and since the relays work with 5V, could I power the PCB directly with 5V and for the other components that work with 3V, to use a voltage regulator?

I don’t know the reason to say not. So - yes.