Trying to connect 4 water pumps

Hello, Im pretty newb in electronics, but trying to learn. im trying to connect 4 small 12v water pumps to arduino using 4 nmosfets, as in the pic, but I am having some problem i dont understand... i have done a test sketch that switch every pump on and off one by one, for a few seconds each, and then switch all 4 pumps on at the same time.

more data: arduino is powered via usb, and im using a wall adaptor for the 12V rail (it says is 12v 2250mA) the pumps are 12v max400mA each, but the multimeter tells me each pump+led is taking 350mA, and when all 4 are on, i get 1.35A. the mosfets: 2 of them are IRF520, the other 2 are IRF530. (i just had 2 of each...) the diodes are 1N4007 gate resistors are 1k, gate pulldown resistors are 1M, and leds resistors are 560ohm. note - the pumps are supossed brushless, i have added the diodes just in case...

the problem:

1.- well first i would like to know if this is a correct way of connecting the 4 pumps to arduino.

2.- this works ok, and each pump+led switch on and off when it should. the problem is, if i unplug arduino from usb, the leds (well, some of them it seems) still get power from somewhere: apparently the ones connected to the IFR520 doesnt light up, but the ones connected to the 530 does... if i just take out the 530s, all leds "seems" to be off. if i just take out the 520, the 2 leds connected to the 530s light up. note this happens only to the leds, the pumps are all off as they should... BUT if i take the pumps wires out, then the same 2 leds connected to the 530s still lights up, but one of them very dim... i just dont understand anything. I have even take out the 4 wires from arduino to the gates, just to be sure nothing was coming from arduino, but nothing changes...

so, whats going on here? shouldnt the mosfets be fully-off when arduino is off? (they have pulldown resistors, so should stay LOW?)

3.- i know this are low-side switches, maybe i should do it high-side? if so, what is a low-side switch used for?

4.- another thing i have noticed is that when i just touch any one of the mosfets (the top metal part) with my finger, the associated led do light... so i dont understand this either...

any help please?

You are on the right track, but dump the Fritzing diagram - these are for absolute beginners, and are very confusing for anything with more than about 3 components. Even a hand drawn schematic is better.

I don't understand the behavior of your circuit either, but I don't trust my interpretation of the diagram. It is possible that you have not wired it as shown. In any case, you should be using logic level FETs. The ones you have are not fully turned on until the gate drive is about 10 V, which the Arduino can't supply.

To debug the circuit you have, I suggest to reduce it to just one MOSFET/LED combination that doesn't work properly. Then it will be easy to suggest solutions.

the mosfets: 2 of them are IRF520, the other 2 are IRF530. (i just had 2 of each...)

The logic level versions of these are IRL520 and IRL530.

The "power rails" (the two top and bottom horizontal rows) in some of the protoboards are not connected all the way through. You may need jumpers across the middle.

thanks for the answers,

ok, i have tried to create an schematic in eagle that (as far as i know) is the exact conversion of the fritzing picture in the first post.

first, im surprised about these mosfets not being logic-level, i though they were (or at least the IRF520). in the arduino starter kit they use it to switch a dc motor, controling the gate directly from arduino output pin, thats probably why i though it was logic-level...so then thats another thing i dont understand... (how can i know if a mosfet is logic level looking at the datasheet?)

anyway, i have been doing some simple tests with only 1 led (lets forget about the pumps for now) on another breadboard, like in this graph and i have noticed some things:

  • I have tested the mosfets, one by one. with any of the 520, the led doesnt light up. thats ok i guess. with one of the 530, the led light up a bit. and with the other one, it lights brightly. so in my noobness, can i assume at least one of the 530 (if not both) are fried? UPDATE - ok, i have just noticed one of the 520 seems to be burn too now (its also lighting up when it shouldnt). and i think could have been my fault as i have been touching some things while the circuit was connected to 12v supply... oh well... :blush:

ok, so i think i will have to buy some other NEW mosfets and try everything again... ouch...

how can i know if a mosfet is logic level looking at the datasheet?

Look for VGS It needs to be <= your power source (VDD).

Note: The “L” in IRL520 or IRL530 means Logic Level gate drive.

that last schematic has the LED backwards.

also, you need to make sure your power supply ground is on both ground rails of your test board.

since the voltage of the gate is in question, try to power your LED with 5v and not 12.

worst case is that if your FETs are not being driven with a high enough voltage on the base, you can use a transisor to deliver the higher voltage while you wait for your new FET's to arrive.

Have you tried adding the decoupling capacitors?

dlloyd:

how can i know if a mosfet is logic level looking at the datasheet?

Look for VGS It needs to be <= your power source (VDD).

Note: The “L” in IRL520 or IRL530 means Logic Level gate drive.

thanks, i will look for it

dave-in-nj:
that last schematic has the LED backwards.

also, you need to make sure your power supply ground is on both ground rails of your test board.

since the voltage of the gate is in question, try to power your LED with 5v and not 12.

worst case is that if your FETs are not being driven with a high enough voltage on the base, you can use a transisor to deliver the higher voltage while you wait for your new FET’s to arrive.

you are right about the leds being wrong in that diagram, my bad…
and yes, both grounds are connected.

KenF:
Have you tried adding the decoupling capacitors?

yes, I tried it but no difference… it seems like the problem was just the mosfets were burn. will try it all again when the new mosfets arrive, i hope everything will work ok then