I'm trying to get into the arduino world with a simple auto-waterer. But it's been a decade since my electronics courses and it seems I have forgotten everything about them.
I've been reading up a lot of source material for the past couple of hours, but at this point I think I just need to figure out what components I need specifically for the water pump I'm using. It's a really basic 2.5-6V pump (couldn't find out how many amps).
From what I gather from an example in a guide that was powering a fan, I probably need a rectifier diode and a transistor?
Looks like the diode's purpose is to convert AC to DC, which is probably also needed for the pump. I guess a 1n4007 diode is a good bet for this?
What about the transistor? One example uses a 2N2222A. Would that work? Or should I use a mosfet?
I am still really clueless about all this, I'd probably be much more comfortable just having a bunch of stuff and tinkering with it, but I don't want to make some rookie mistakes and burn my arduino board on my first experiment. So I'd also appreciate any general pointers on what kind of starter materials I should buy with my first arduino.
PS. I'm buying an uno, a nano, and a whole bunch of sensors and modules to play with. What I'm clueless about is the tiny stuff like the resistors, diodes, transistors, capacitors, mosfets and whatnot.
To control that motor from an Arduino you need a motor power supply and either a motor driver like this one, or a transistor, a base resistor and a "flyback diode", as you have already seen in fan tutorials.
The diode is essential and protects the transistor and associated circuitry from high voltages created by the motor. You should not attempt to power the motor from the Arduino, or the Arduino power supply.
Grumpy_Mike:
Yes or a logic level FET in place of the transistor.
No it is to short out the back EMF from the inductive motor when you turn it off. Without that many hundreds of volts could be generated.
If the motor draws over 500mA then use a FET.
Do some tutorials before embarking on your own project. Learn first the do your own thing.
Hmm okay I'll measure the current of the motor when I get it, and see how much it draws. And I'll look into FETs. Thanks.
And I'll definitely do a lot of tutorials first, the auto-water project is just the end goal and I want to get the parts I need in the bulk order along with the arduino.
jremington:
To control that motor from an Arduino you need a motor power supply and either a motor driver like this one, or a transistor, a base resistor and a "flyback diode", as you have already seen in fan tutorials.
The diode is essential and protects the transistor and associated circuitry from high voltages created by the motor. You should not attempt to power the motor from the Arduino, or the Arduino power supply.
Really? This tiny motor needs its own power supply? All the tutorials I've seen so far (which have similar or bigger pumps) have drawn power from the arduino power supply. I could be missing something though...
I will look into a driver though, some of the tutorials use those instead of the transistor+diode setup. Thanks.
Arduino current supply is normally limited.
Any decent size motor uses considerable current.
Any inductive load can impose a lot of interference on the supply.
Instructables are unreliable. If you have a proposed circuit post it here first for comment.
That water pump does not specify current, it will be considerably more than a fan.
Allright, I'll keep that in mind and try to find some examples that use an external power supply for the motor.
Just to clarify, the tutorials I see don't draw power directly from the arduino, but from the power supply of the arduino. Not sure how that can make the arduino emit smoke, worst case it'd probably not be able to power both, and the arduino would reset?
Just trying to understand how exactly all these guys doing the tutorials haven't burned down their garages yet.
The tutorial writers don't face the everyday barrage of questions on the Arduino forum that are caused by their tutorials. For example: "Why does my Arduino constantly reset, when I run my motor?", or "Why does my servo stutter?".
Ah, I understand. It would be nice to have the whole thing work with just a single power supply (or battery) but I guess that's more trouble than its worth. Anyway I found some examples that use an external power supply. Looks similar. Now I just need to find a pump with an external supply...
Actually, I might just go with a solenoid valve. Then I wouldn't have to worry about all this, and could probably just run the whole thing with a 9V battery?
As I said, it is possible to get both the Arduino and a pump to run on one power supply. However, for the pump you have chosen, that is not very simple because the pump is specified for 6V maximum and the Arduino won't run on that voltage.
If you have a power supply capable of supplying 7-12 volts at a couple of amperes, then you could apply that to the Arduino barrel jack with a split cable. Use a stepdown converter to supply 4 to 6 volts for the pump, like this one.
The converter must be able to supply the stall current of the pump motor, as the motor briefly draws the stall current every time it starts up.
9V batteries are for smoke alarms, and are useless for projects like this.