Attempting to Use a 3 Way Valve

Please, for all intents and purposes, consider me a beginner with electronics.

I am working on my first electronics project for a water filtering thing. Essentially, we are using Arduino sensors to determine water quality. If the water is too dirty, the 3-way valve will send it down one tube, and if the water is clean enough, the valve will send down another tube.

I understand how to do the coding component of this, but not the electronics/wiring part.

These are my questions:

  1. How do I power things that don't operate with 5V? Most valves I'm seeing are 12V or 24V. I looked into it and most people suggest using relays or transistors to accomplish this. Which is better for getting a 5V Arduino to activate a 12V valve? And do I need to purchase a 5V power adapter/battery or a 12V/24V power adapter/battery?

  2. Anything else I may need to purchase? People are saying you should have a diode with a relay, for example. And I see people using resistors as well. I already own an Arduino, breadboard, and jumper cables.

Sorry if I sound absolutely nooby. I have tried watching a lot of videos about this and I just want to make sure I know what I'm doing before I purchase materials. Thank you!

You need to post a link to the datasheet for the valve(s) you want to use.

If you just need ON/OFF then you could use the Arduino to control a relay - but make sure to get a relay that can be controlled by an Arduino or else be prepared to build a small transistor circuit between the Arduino I/O pin and the relay coil.

...R