Hi everyone, my name is Joao Aguirre, I'm quite interested electronics, in DIY and Arduino.
I've assembled a simple plant watering system. But sadly I'm facing some problems with it. Could anyone help me here? Let me tell you my issue.
I have the following circuit assembled:
All black wires are connected to the power supply ground and all the white ones to the power supply positive.
The program reads two inputs from the potentiometers, one to define the time to wait between two activations of the pump, and another to define how long the pump will be on when activated (controlling the time to wait and the amount of water to pump).
When the system is turned on, after a short period the pump is supposed to turn on, then, when it's time again, the ATTiny85 activates the relay that turns on the pump and the yellow LED.
Everything seems to be working IF I USE different power supplies to the pump and the rest of the systems (which I would not like to have on the final version). When I use a single power supply, at the moment the ATTiny activates the relay to start the pump, everything is reset and it happens over and over again.
The pump is supposed to use 0.2A and the power supply I'm using is a 2.2A max (5V). So I wasn't expecting the voltage to fall too much. Even though I've tried to add a capacitor to the circuit (between the 5V and ground around the ATTiny supply) but it didn't help. After looking for the issue here, I've added a flyback diode, but that hasn't also solved the issue.
Can anyone give me some suggestion on what to try next?
Thanks a lot in advance.