Check this circuit please

Hi all

I am trying to control 3 peristaltic pumps from an Arduino using the attached circuit.

Is it correct? What I have been learning of the Arduino tells me that the 12v should be connected to the gate as it needs more than 10v to switch but this looks as though it is connected to the Arduino.

Can someone please tell me which way it should be connected please. I have connected it up and using a basic sketch which should turn each one on for 10 seconds and off again for 10 seconds but nothing is happening.

I believe the 5v ground should also be connected to the Arduino ground for reference reasons is that correct?

Thanks in advance

Steve

The connection from the MOSFET Sources should go directly to the 12V Source- since this will be a high current path.

The Gate threshold is between 2 & 4V which is whne the MOSFET starts to turn on. Since you want to use this as a switch you need a much high gate Voltage of at least 10V. The Ardiuno output pins can not do this.

Therefore you need a PNP transistor from the +12V to the Gate and then an NPN transistor from ground to the base of the PNP.

This is a very common circuit and has been discussed many times on SparkFun’s forum. Do a search to find examples.

An alternative is to use a MOSFET there has a “logic level” Gate.

See Figure 3 for Drain current verse Gate Voltage.

http://www.irf.com/product-info/datashe … rfz44n.pdf

The page where I got this reported he had a fully functioning device without the use of 6 extra transistors. Is there no other way to trigger it?

Thanks by the way, I will do another search.

A search didn’t turn up much, possibly used the wrong search terms.

So what I am attempting with the transistors is a high side switch is that correct? If I google that will I get links to the circuit I require?

Failing that can you suggest a good general purpose logic level mosfet that would be better for this application please.

Something like this?

What level of current does a pump draw ? While the FET might conduct better with more Vgs, it should conduct some w/a 5v Vgs. I think your major problem is this ;

I believe the 5v ground should also be connected to the Arduino ground for reference reasons is that correct?

Yes the Arduino ground and 5v ground (= 12v source -) need to be common, otherwise there's no complete circuit for the pump current coming from the 12v source + line.

What Arduino are you using ? Does it have a 5v regulator on it to run the RTC ? (ie - input 12v to the Arduino’s raw port)

Hi Mee_n_Mac

I am using the Uno just to kick start this project but it will ultimately be run from a mega which is connected to the rest of my controller.

Pump current is around 80 ma

I have ghetto wired together some BC547 and BC558 transistors, just connected the emitters and bases because if I understood what I was being told above if I connect the 558 collector to ground and the 547 collector to +12v then it will be a better circuit. Is that correct?

I will also common the grounds.

In case I have simply not followed the diagram correctly. I have the IRFZ44n drains connected to the ground on the pump with the diode between the drain and the ground.

I have the source connected to ground which is common to both the arduino and the 12v power supply.

The gate is connected as per this diagram with a 1k resistor and then to the Arduino pins. The 12v+ of the power supply is connected to the “in” of the voltage regulator and the 12v- of the power supply is connected to the ground of the regulator.

Out is obviously connected to the 5v of the RTC, the RTC ground is connected to the now common ground, sda to A4 and scl to A5

from the bus where the 12v+ is connected to the “in” of the regulator I have fed off to the + of the pumps.

I believe that is everything. I could show a photo if it doesn’t make sense.

I can confirm that the DS1307 is working correctly, using the regulated power from the regulator.

So I have got that part wired correctly. Just need a bit of help on the switch side of things still by the looks of things.

My more advanced code seems to be working also looking at serial monitor but the motors are not switching yet.

Pump current is around 80 ma

Mee n Mac is correct. With a pump motor current this low those MOSFETs will be fine without the extra transistors as per the DS figure I listed above. So your first schematic is good, just be sure to connect the MOSFET Drains to the common ground.

Those MOSFETs are actually a bit over kill but they will not need heat sinks.

I think you are ready to wire them and get the circuit a try. At worst the pump doesn’t turn on.

No1Daemon:
Pump current is around 80 ma.

At that level you could *almost* replace the FETs w/your BC547s and reduce the 1k Rs down to ~500 ohms. I say almost as the BC547 has a 100 mA max rating. A 2N2222a (800 mA max) would be a more robust choice. Still just to troubleshoot ...

If you can’t get it pumping w/the NPNs, then check your wiring and/or code.

waltr:
… just be sure to connect the MOSFET Drains to the common ground.

Those MOSFETs are actually a bit over kill but they will not need heat sinks.

I think you mean sources, not drains.

Which way is better to wire this?

I used the circuit at the following url and it works perfectly without transistors.

Should it have diodes for protection?

I think I will stick with this method as it is working.

Obviously I wasn’t connecting an RGB led but I connected the drains to the pump motor grounds.

http://www.jerome-bernard.com/blog/2013 … duino//url]

No1Daemon:
Which way is better to wire this?

I used the circuit at the following url and it works perfectly without transistors.

Should it have diodes for protection?

From the description it's basically the same as yours. He says he added some Rs from gate to ground (a good idea in case of disconnection from the Arduino) though the fritzing diagram doesn't show exactly** that. He eliminated your series gate Rs (not strictly needed but good for a couple of reasons). These are both minors details that wouldn't cause the circuit to work or fail. Otherwise the pump and FET connections are the same as yours, assuming you connected the "grounds" together. You should have the reverse biased diodes to better protect the FETs from any inductive spikes from the pumps.

** the red channel is shown correctly, the others aren’t. See the difference ?

Great. Thanks very much for the help.

Mee_n_Mac:

waltr:
… just be sure to connect the MOSFET Drains to the common ground.

Those MOSFETs are actually a bit over kill but they will not need heat sinks.

I think you mean sources, not drains.
Yes, The MOSFET SOURCEs to common.

Thanks for the correction.

Mee_n_Mac:
** the red channel is shown correctly, the others aren’t. See the difference ?

I see it. Thanks.

One more quick question. I find 1 motor activation a little when I power it on and also when I upload a new timer sketch to the board, what would cause this and how do I prevent it?

No1Daemon:

Mee_n_Mac:
** the red channel is shown correctly, the others aren’t. See the difference ?

I see it. Thanks.

One more quick question. I find 1 motor activation a little when I power it on and also when I upload a new timer sketch to the board, what would cause this and how do I prevent it?

From your link above ...

I mostly did what Adafruit tutorial explains, except I added 10kΩ resistors, between each control/gate pins and ground (so 3 resistors for a RGB strip), in order to force the signal to LOW until the Arduino kicks in!

The gate-to-source junction has a very high input resistance and a “high” capacitance, which can become charged up by leakage current. The FET’s input resistance is too high to bleed the leakage current off and so voltage can build up and (partially) turn the FET on. Adding an external resistor (10k-100k) will prevent this until the Arduino pin comes alive and goes to a low output state.

I read that and had added 3 10k resistors where it shows on the board but perhaps I didn’t follow the red line correctly.

Will check their placement.

Using the Arduino analogWrite(motorPin1, 255)

The code should work on pins 9,10 and 11 of the Arduino mega.

I have more permanently wired this circuit onto my mega now and started integrating it into my controller sketch but the 1 motor I have written code for is very stop start. Holding a TFT button down activates it but it will sometimes not run, then run a little, then stop. Randomly.

So for some reason the power is not going to the motor correctly or it is not switching consistently.

Any ideas why this might be the case?

I have added the 3 10k resistors as per the frizzing diagram above but not yet added any revers bias diodes as I was not certain where to place them to protect the FETS