watering system

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.

What value cap did you try?

You should have a 0.1uF bypass cap near the power pins of the ATtiny85. Your pull-up resistor on the ATtiny85 reset pin is too high. Use 10K (brown-black-orange) not 1M (brown-black-green). Same for your other button, but you can remove that and connect the button between the pin and ground and use INPUT_PULLUP.

PaulRB:
What value cap did you try?

You should have a 0.1uF bypass cap near the power pins of the ATtiny85. Your pull-up resistor on the ATtiny85 reset pin is too high. Use 10K (brown-black-orange) not 1M (brown-black-green). Same for your other button, but you can remove that and connect the button between the pin and ground and use INPUT_PULLUP.

Thank you @PaulRB, I've tried the capacitor with between ATTiny pins 4 and 8 (GND and 5V) with a big one I had here (470uF). Was that too high? I'll try to change the pull-up resistors.

Cheers!

@PaulRB, I've changed the resistors, but got the same result.
Any other ideas?

Again thank you a lot.

I would like to see an updated schematic (a proper schematic this time please, not like the last one, use the schematic view in Fritzing) so I know you have tried the suggestions (and some of them were not just suggestions, like the bypass cap for example). If I am using words you don’t understand, please ask, don’t just ignore them (I realise English is not your first language).

Have you measured the voltage drop from the psu when the motor starts, does it have a large inertia with a long start up time? this is a very weird issue with the cap on the input not solving the problem