PCB Solenoid Driver

Hello everyone, I am a newbie and I am intending to design a PCB of a mosfet driver for a solenoid.
I have a doubt with the wiring of the flyback diode. In the first image you can see the complete PCB where you can observe my last version of the wiring for the diode. The second image is a detail of the first version i did for the diode wiring.

I'm not sure if there is or not a difference between both versions.
Thanks a lot
Best
Monika

You only have one crossing of traces so it would be easy to make this a single-sided board. It would be easier to debug if all of the traces were on the bottom.

1 Like

Thank you for your swift answer. I understand, it is easy to arrange.
What is your opinion about the diode wiring. I guess that the second image is wrong but ...

Diode is pointing in the right direction.-

Thanks JBBOP!
I rerouted the wires to make a single-sided board as @johnwasser suggested.
Driver

You can make the tracks wider, the PCB manufacturers don't charge more for wide tracks so you may as well make them as wide as practical.

R2 is in the wrong place, as you have it R2 forms a voltage divider with R1, put R2 between GND and Pin.

Thank you @PerryBebbington. I have already made the tracks wider.
Concerning R2 and R1. R1 is for me 220Ohms and R2 10K. WHen I started I found a lot of projects and examples and I found 2 different versions respect the placement of the resistors. Like in the picture below.
I appreciate your remark about it.

If you look at the values of R1 and R2, it should make little difference, though some people prefer the second approach.

More importantly, be sure this mosfet will work with logic level circuits.

Use the second one, the one where R1 and R2 don't form a divider. Yes, I agree that with those resistor values it makes hardly any difference, but it's good practice and a good habit to get in to. In any case, it's practice in thinking about what you are doing and why.

So, do it because you understand why, not because I (or anyone else) told you to do it that way.

Thank you @cncnotes, yes, I am using a logic level mosfet, IRL Z 44N.
You are of course right @PerryBebbington and I am trying to learn. I understood bad the voltage divider circuit, in concrete I interpreted it in the other way round, I understood that if I place R2 at the left of R1 I was creating a voltage divider. Now I understood.
Thank you all

1 Like

With the corrections:

44

:+1:
The PCB looks good, esp with the diode being nice and close to the coil.

1 Like

Thank you! and Thank you for the guidance.

Make your pads 75 to 80 mil.

You can widen the traces even more, try 50 mil.

Which is of course, completely wrong. :grin:

The diode should be as close as possible to the FET and the missing decoupling capacitor as the three comprise the commutation circuit. :roll_eyes:

Never mind, some people just do not understand electronic theory. :astonished:

Excellent advice. :+1:

Which is of course, completely wrong. :grin:

But, . . . :zipper_mouth_face: . . .

Thank you Paul_B.
As I said in my first post I am newbie and I would like really to learn and do the things right.
I will appreciate a lot if you please can clarify to me what is wrong with the diode and the missing decoupler capacitor.
Thank you on advance.

Briefly put, people get confused as to what happens when the FET switches off.

The matter of the "flyback" or whatever you call it is that the current in the inductor then instantaneously keeps flowing - but declines exponentially.

So all the current which was supplied by the FET, is now flowing through the diode. The current through the coil does not suddenly stop - as said, it declines exponentially.

What does happen is that the current being drawn from the supply does stop very suddenly. So that sudden current impulse in the wires (including the ground wire) to the supply can be coupled as an inductive impulse, to other parts of your wiring which (particularly the microcontroller circuitry) may be sensitive to such impulses.

And if the ground connection is common to other parts of the circuit, the sudden change in voltage drop due to the step in current may also affect those other parts.

People fail to understand that this impulse is in the supply wiring, not in the wiring to the inductor unless you mount the diode at the inductor. The part of the wiring between diode and inductor does not experience a current impulse, only the wiring between the diode, the FET and the supply.

So to limit the extent of that current impulse, you need a capacitor of decent size (470 µF or 1 mF would be a good start) directly across the FET and diode to absorb the current impulse and keep it out of the wiring back to the supply. The circuit that needs to be kept as physically small as possible to contain the impulse is the "triangle" of the FET, the diode and that capacitor.

Guess I may have failed the "brief" bit. :grin:

1 Like

I really appreciate that you have not been brief. Thank you a lot.
I was one of the people who "fail to understand that this impulse is in the supply wiring, not in the wiring to the inductor".
I guess I understood (I hope).
Below is the design with the addition of the capacitor.

1 Like

Hmmm.

While there are more complicated ways to fix the problem of the voltage spike, a diode across the coil is a simple and cheap method. From TI:

From Nick Gammon:

This forum:

Circuit Cellar:

Dave really does a great job of demonstrating the effectiveness of the flyback diode:

Of course, the @molindz should do whatever is best.

1 Like