Hello! I am trying to make an auto-top system that is powered by Arduino for my aquarium. I am using a submersible pump, an external reservoir, and a 1 gallon tank (scaled small compared to my 20 gallon tank haha). I know for my code, I would likely set a delay. Here is code that I got help with to start off (not official!) :
const int pumpPin = 2; // Digital pin connected to transistor base
void setup() {
pinMode(pumpPin, OUTPUT);
}
void loop() {
digitalWrite(pumpPin, HIGH); // Turn on pump
delay(5000); // Run pump for 5 seconds (adjust as needed)
digitalWrite(pumpPin, LOW); // Turn off pump
delay(10000); // Wait 10 seconds before next cycle (adjust as needed)
}
Yes, you're right! Sorry didn't mean to say it was a power supply! Meant to say how can I make a separate supply? I know I need a breadboard and a transistor or relay.
I am only using one water pump and it is 5V DC. How can I turn it off/on using Arduino? I know I cannot power the water pump using Arduino only, but what would be the separate power supply and how can I connect that to the Arduino?