# First Attempt at DC Motor Auto Dosing Pump

I’m currently working on the very beginning stages of an auto-dosing project for a hydroponic system. Basically, hooking up the Arduino to drive three DC Motors and a timing circuit. It will measure EC and PH eventually, but I’m starting simple. I’ve never done anything like this, so the going is slow.

I figured I would start by simply creating the circuit/breadboard to run each of the motors without worrying about the timing circuit or anything else. The attached pictures are what I’ve come up with so far.

Question 1:

I used Fritzing, and the schematic has a couple “ratsnest (dotted)” lines that won’t go away (between the 2nd and 1st diodes and the 2nd and 1st transistors)? Does this mean there is something wrong with the way I’ve drawn the circuit or manipulated the breadboard?

Question 2:

On the schematic, I haven’t hooked anything up to the Arduino 5V and the Arduino Gnd like I did on the Breadboard. Is this ok? In other words, is it common practice that these connections are just assumed?

Question 3:

Does this circuit look like it will work (I will only be running 1 motor at a time).

Thanks tremendously in advance, really enjoying learning Arduino.

-Chase

I would like to give appreciation and acknowledgment to the following website for inspiring this project.
- Fish Tank Projects -

You will need a common ground between the Arduino and motor supply.

Use IRLZ44N

.

Q7 cct. with a motor rather than relay.

Larry,

I very much appreciate the response, thank you for taking the time.

Common Ground... RIGHT! That's what I forgot.

Can you explain why you recommend the irLz44n over the irFz44n that I chose? I've looked at the data sheets and the only major different I can see is:

irLz44n

VGS: Max = 16 Volts

VGS (th): Min 1 Volts, Max 2 Volts

irFz44n

VGS: Max = 20 Volts

VGS (th): Min 2 Volts, Max 4 Volts

If I understand correctly, when I send 5 Volts to the transistor, it will allow current to flow from drain to source, rotating my motors. Because I will be using 12 volts to run my motors, and the max VGS for both are above 12 Volts, shouldn't either work?

Also, if I'm sending a 255 PWM signal from the Arduino to the transistor, isn't this equivalent to sending a 5 volt signal to the gate? Should I be concerned that the VGS Thresholds are quoted at 1 to 2 volts, and 2 to 4 volts respectively?

Thanks again Larry, any explanations or details you can give would be very beneficial as I'm a beginner in all of this.

-Chase

P.S. I will check out your schematic as well and see if I can make heads or tails of it... I appreciate you sharing.

You need the L version.
The Arduino outputs 0-5 volts. These are logic levels.
This will turn on the L version easily.

The F version is a none logic FET, you might get it to work, but you need the L version to guarantee it will saturate!

Vgs max is +-16V
255 will give +5v, no concern here.

Q7 cct, has a 10k to GND on the input to pull down (turns off) the FET at power up.

.

Have never heard of "Logic" Vs. "Non-Logic" transistors. Thanks for the heads up there, that will give me something to research.

No concern that the max VGS(th) is 2 Volts when the Arduino will be sending a 5 Volt signal? I must not understand what VGS(th) max means correctly? I thought it was the max voltage you could send to the gate without damaging the transistor?

Thanks again Larry,

You've brought this project from 0 to 60...

Vgs(th) tells you the transistor will saturate at ~ 2v minimum (not maximum allowable)

Vgs max is the maximum voltage gate to source that can be used safely.
this is +-16 volts for the IRLZ44N
Arduino o/p 5 volts is less than 16

.

For design purposes use data sheet:

Man,

Those links were truly fantastic and things are starting to get more understandable.

Thanks again for all the help, truly beneficial stuff.

Will update with progress when progress is made...

-Chase

Can anyone explain to me where (and why) I should connect my 5v from the Arduino in the attached schematic (breadboard image also attached).

If I’m pulsing my transistors using pins 9, 10, and 11 why is the 5v supply pin used at all? Nothing is even hooked to the 5v power rail? Is it just convention to always connect Arduino power and ground to the breadboard?

This is likely a very elementary question… Thanks in advance for any explanation.

-Chase

+5 is not needed.
You need the Q7 circuitry that I posted.

.

After doing some research, I came upon this... Is this why you're referring to cct Q7? If yes, I assume that means I need an extra resistor for each transistor?

It is generally a good idea to include a gate resistor to avoid ringing. Ringing (parasitic oscillation) is caused by the gate capacitance in series with the connecting wire's inductance and can cause the transistor to dissipate excessive power because it doesn't turn on quickly enough and hence the current through drain/source in combination with the somewhat high'ish drain-source impedance will heat the device up. A low ohm resistor will solve (dampen) the ringing.

As @PhilFrost mentiones, a high value resistor to ground is a good idea to avoid capacitive coupling driving the transistor when it is otherwise not connected.

At all times keep the wiring between logic output, transistor gate, transistor source and ground as short as possible. This will ensure fast turn on/off.

Taken from HERE

Thanks,
-Chase

Yes each MOS FET will need two resistors.

Q7 in the image I posted in #2 above.

So I’ve updated the schematic a bit (see attached), but I’m a bit concerned about how I’m trying to supply power.

I’m planning to have an AC to DC converter plugged into a wall supplying 12 volts. Those 12 volts will be supplied to the “Source” side of each transistor (after being pulsed at the “Gate”).

The 12 volts will also run to a voltage regulator which will output 5 volts. From this voltage regulator I’ve attached an RTC timing board and will also run this to Vin on the Arduino (hoping to power the Arduino from the same 5 volt rail).

I’m having a very difficult time visualizing what happens around my voltage regulator. In other words, if I “steal” some voltage form my initial 12 volts at the voltage regulator, then I take the 5 volt output and split that again to the RTC and the Arduino, can I still expect to have 12 volts and 5 volts where I need it respectively?

I guess I don’t understand voltage very well and can’t tell, with the way I’ve drawn the schematic, if my components are in series or parallel?

Any help in understanding or comments on how to improve is much appreciated.

-Chase

Vin should be 7.5 to 9 volts, but I would go in from the power jack.
However, you could feed your 5v regulator output to the 5v pin on the Arduino.

R1-3 should be ~ 220 ohms.

Edit
The RTC can be powered from +5 from the Arduino.
I would use a DS3231 based RTC, much much more accurate.
It is nice some times to have a power led, maybe flash it at 1hz rate.

.

Thanks again Larry.

Are you saying to change R1-R3 to 220 Ohms as opposed to 1K because the 1K drops the current too much to trigger the gate on the FET?

ie.

V=IR

With 1k

5V = I*1000 ------> I = 5 mA

With 330 Ohm

5V = I*220 ------> I = 22.7 mA

Also, thanks for the heads up on the Vin requirement. I missed that in my Arduino research.

If I understand you correctly, you would run the 12 Volt wall wart to both the barrel power jack and the motors? Then you would run the RTC by simply setting one of 5V Arduino pins to HIGH?

Can you give me a hint on the best way to split the voltage? Is it ok to come directly off of my wall wart and into the source of my transistors or should there be some kind of protection circuit between?

Finally, why on earth do none of the schematic diagrams for the Arduino include a connection for the barrel jack to power the darn thing? Am I missing something?

By the way… I’m thoroughly enjoying how you answer questions. You give just enough information for me to research in the right direction without giving away the answer completely. It feels like guided learning…

Thanks again!
-Chase

Hi-

I have similar interests.

This may not be relevant if you are looking to start from scratch or are not interested in a comprehensive automation approach, but, have you checked out YieldBuddy?

best,

R

Hi Revel,

Thanks for taking the time to chime in.

That does look like what I'm trying to accomplish as an end goal (with a LONG way to go haha).

I'm doing this project as a way to learn about Arduino and circuits (as well as grow some delicious greens). So starting from scratch is part of the enjoyable process for me. With that said, I bet they'll be a great resource as I make some more headway.

Thanks again for the tip!

-Chase

In your case I would recommend you wire things up this way:

Note:
The input resistance to a FET is infinite.
It does have capacitance, gate to GND, see data sheet.

R45 is there to protect the Arduino output.
i.e. it limits the output current to a safe level while the FET input capacitance charges.

Ceramic capacitors are used for noise/de-coupling purposes.

Finally, why on earth do none of the schematic diagrams for the Arduino include a connection for the barrel jack to power the darn thing? Am I missing something?
Designers assume you know things have to be powered.

.

.