Soil moisture to pump using Arduino

I built the circuit in the image below in order to use YL-69 soil moisture sensors to activate 3-6V DC submersible water pumps. I also attached the code. The code and the setup work exactly as they should, but I just want to make sure that I am using the NPN transistor and the diode correctly. I would like to add up to 6 sensors and pumps each functioning independently, but I think I should use a 5V power supply for that.

What I’m asking is:

  • Is the circuit correctly configured in the image provided?
  • Are there any unnecessary/missing components in the circuit?
  • Could I simply assign one power rail on the breadboard to the 5V power supply and power the motors from that using the transistor switches?

Thanks in advance for any help with this,

Dylan

YL-69_Refined.ino (899 Bytes)