I want to power an Arduino Mega2560 (now powered by USB) and an external water pump that I need (12V, controlled by the Arduino with a relay module).
Is there a way to have a single power supply for both components? Where do you normally buy power supplies? I'm looking for a final experience where I only have to plug a single power supply transformer to the socket and that's it...
Any devices powered from the Mega? If it's only driving a relay module you can power it from the barrel jack, shared with 12V power for the pump. Make sure the relay coils are driven from 12V not the Arduino.
Get a 12 volt supply that provides enough power for the pump plus a bit more. power the mega via 12 volts to the barrel connector. DO NOT power anything else from the mega board.
A relay is often used to provide isolation between the controller and the load.
If you only use one power supply, the relay isn’t doing much for you, use a logic level MOSFET to drive the load.
12v can be inputted on the Vin pin to power the Arduino, or feed 12v to a converter to get 5v, connect this 5v to the 5v pin on the Arduino.
If the latter, best disconnect the 5v pin when plugging the USB cable into the Arduino USB connector.
Depending on the SD card they can draw 100 - 300 ma. This is mostly as spikes when reading and writing (more when writing). You need a by pass capacitor to help even it out. (Most SD breakout boards will have some.)
Where do you guys get all this knowledge from? I can start looking up tutorials but I'm really lacking the basics... I wish I could get the basics properly. Any recommendation for that? TIA.
However, it's recommended not to drive a pump directly with an Arduino. Because they draw a lot of current. It can damage the Arduino at some point. It's recommend to use a relay between the Arduino and the pump.