Hi!
I've followed this tutorial and everything works great with 1 solenoid.
I made a protoboard with 8 solenoids attached and everything went rly weird.
1 solenoid attached to the lowest pins on J15 worked again nicely, but when I moved the solenoid to any other pins nothing happened. I measured with a multimeter that every mosfet pulls nicely and I get my 12V across the pins, but not even a small led didn't flash.
I had that 1 solenoid in the working pins running a few hours on/off every 0,5s to test it and after that my Arduino's USB connection started to behave odly and after awhile my PC does recognize it, but I can't upload anything to it!
I've read something about it being cause of common ground, but I'm pretty new in electronics so it doesn't help me to realise how to fix this problem.
What are your opinions of the problem and how would you fix it (and make the board better in terms of reliability)?
EDIT:
Forgot to mention that J17 is my 12V power terminal.
And that picture is too small and fuzzy to make any sense of.
Need a wiring diagram, (not fritzing).
FQP30N06L, this mosfets are overkill for my needs, because each solenoid draws ~0,5A.
Click the picture to open it bigger!
I will provide a schematic later today when I get off work
I had to change those pulldown resistors from 10k (as stated in the picture) to 80k so that mosfets would turn off.
When I was testing on my breadboard with 1 channel I used 6,7k and it worked flawlessly.
lohiS:
I had to change those pulldown resistors from 10k (as stated in the picture) to 80k so that mosfets would turn off.
When I was testing on my breadboard with 1 channel I used 6,7k and it worked flawlessly.
Then something is very broken, 100k should work even. Drain to gate leakage suggests you've fried the
MOSFETs with static or something.
A circuit board like this needs a ground plane and much thicker power traces, and I'd decouple the
solenoid supply with ceramic and electrolyte, placing ceramics close to the MOSFETs.
MarkT:
0.5A x 8 = 4A, yet you power them all via a single 7805 regulator (1A max)? How can that work?
You have 12V power yet are using 5V solenoids? Poor choice - you waste power converting 12V to 5V
with a linear regulator.
12V goes directly to 12V solenoids which are controlled by FET's by Arduino with 5V.
Max amperage (of solenoids) is 2A, because only 4 would be working at the same time.
I have only 1 power source which is 12V and I have that regulator for Arduino, FET's, BT module and some sensors, so 1A is more than enough for my 5V circuit.
I finished the schematic:
MarkT:
Then something is very broken, 100k should work even. Drain to gate leakage suggests you've fried the
MOSFETs with static or something.
A circuit board like this needs a ground plane and much thicker power traces, and I'd decouple the
solenoid supply with ceramic and electrolyte, placing ceramics close to the MOSFETs.
As I stated above, max current is a bit higher (in total) than 2A and main power traces are 48mil wide/2oz weight, so I'm good with those.
I haven't attached no more than 1 solenoid so far to my board. Even testing with only a LED, only Q8 lights it up. Still I can measure 12V over every other FET as I should. So I have voltage, but no current and the problem has to be in my groundings. I even tried to hook power straight from power source and ground it via FET's getting same results as before.
Are you grounding things in a loop somehow? Normally you would follow a star-ground pattern (here your
boards ground plane would be the meeting point for all grounds).
Wide power traces are done for low inductance as well as high current capacity - logic supplies should be
wide even if they take a few mA for instance, to provide a lower impedance path to the decoupling capacitors.
I don't like the lack of groundplane in a high current switching circuit, you risk injecting voltage transients into
the gate circuit and your layout isn't great.
You need to route gate and source signals together as a signal pair from the microcontrol to each
MOSFET - not just the gate signal, so that you have a low inductance drive to that device.
The MOSFET is a two-port device when used for switching - run gate/source signals into one port
and drain/source power to the other. The source is common to both ports, but you still use two
traces, one for power (high current), the other for gate-return.
Using a ground plane would finess this whole problem in fact. Its a two layer board so there's no
difficulty with providing one.
Are you grounding things in a loop somehow? Normally you would follow a star-ground pattern (here your
boards ground plane would be the meeting point for all grounds).
Wide power traces are done for low inductance as well as high current capacity - logic supplies should be
wide even if they take a few mA for instance, to provide a lower impedance path to the decoupling capacitors.
I don't like the lack of groundplane in a high current switching circuit, you risk injecting voltage transients into
the gate circuit and your layout isn't great.
You need to route gate and source signals together as a signal pair from the microcontrol to each
MOSFET - not just the gate signal, so that you have a low inductance drive to that device.
The MOSFET is a two-port device when used for switching - run gate/source signals into one port
and drain/source power to the other. The source is common to both ports, but you still use two
traces, one for power (high current), the other for gate-return.
Using a ground plane would finess this whole problem in fact. Its a two layer board so there's no
difficulty with providing one.
Thanks MarkT for a very useful explanation and a method to (maybe) solve my problem.
I'll start redrawing this and reading more about ground planes next monday when I can get back to my project.
I have to change the drawing anyhow, because this board is going to be used in a car and I've read that those 7805 are a bad choice for that kind of enviroment. If I've understood correctly 2940 regulators would be much better with different size of caps.
What else could you recommend to protect my circuit?
I guess optocouplers (4N35) driving FETs would be a nice touch, but I believe it's not mandatory.
Ok, hopefully I understood your points and advises MarkT!
I've redesigned my pcb layout. I've added those optocouplers (U1-U8) I was talking about, got rid of regulator and replaced it with step-down buck converter and I divided the groundplane to 2 different areas.
Left groundplane is where everything related to 12V is and on the right 5V. Planes are connected through buck converter (text "12V/5V" surrounded by 4 vias (left vias inputs, right ones outputs).