I want to build up my automatic water pump with an arduino pro mini 5v and a 5v usb water pump (2.3 W). As I understand, I cannot power the pump directly through the vcc pins of the board, right? Would it be possible to place a female USB Port in my system to power the board and the pump through a relay on the board? What would be an appropriate circuit diagram?
As I understand, I cannot power the pump directly through the vcc pins of the board, right?
This is from the Arduino Pro Mini schematic:
Note that the maximum current output is 150 mA. On the other hand, your pump needs 2.3 W / 5 V = 460 mA > 150 mA. So your understanding is right: you can't power the pump directly through the Vcc pins of the board.
Would it be possible to place a female USB Port in my system to power the board and the pump through a relais on the board? What would be a appropriate circuit diagram.
There are lots of extremely cheap, commercially available, opto-isolated 5V relays modules in aliexpress and the like.
I'd recommend one like this because it allows you to have separate supplies for the relay coil and for the input diode in the opto. That will help you to avoid problems related to having "different" 5V levels due to dropout in the Pro Mini regulator.
VCC --> VCC from the Pro Mini.
JD-VCC --> V+ from the power supply (same as RAW input to the Pro Mini).
COMMON --> V+ from the power supply.
NO (normally open) --> connect it to the 5V rail of the USB pump.
NC (normally closed) --> leave it unconnected.
Be sure to connect all grounds together.
I'd also recommend adding an additional decoupling capacitor close to the RAW pin of the Pro Mini, to protect the regulator from voltage spikes caused by switching-off inductive loads like the relay coil and the pump motor.
NOTE: take into account that the relay module can draw up to an additional 80-100 mA of current. Take that into account in your power/current budget.
Hi Florian you can take power from USB fro both Arduino and the water pump.This is the schematic you have asked for your project. An arduino Pin can give maximum 20mA current that's why we need a limit resister to limit the current below 20mA and also this current should be such a way that it can drive the switching transistor. So the challenging thing is choosing the correct resister I have taken the value 1K So the current at Arduino Digital pin is Current I = 5V/1k = 5mA which is below of 20mA and sufficient to drive the Transistor. you can use BC548 transistor also.