I have made my first usable sketch. It waters plants when the soil is dry. Pretty simple, using a moisture sensor and relay to toggle a pump for xx seconds if moisture sensor falls below a threshold. Cool.
It works when using separate power to run the pump and arduino nano, but if I try to power the pump and the arduino from the same power source, the arduino resets when the pump turns on. I've tried using both analog and digital outputs, high power inputs... no difference.
Am I missing amps? There must be a way I can use one power supply for both purposes?
Also, is there something smaller, cheaper, I can use rather than a relay to turn the pump on/off ? using between 7 and 9 volts