I am working on a project for a watering controller where I would need to turn on or off an solenoid valve (electric valve), my first thought would be to use a relay, but I know relays are good for things like 110V/220V AC, but I feel like it would be too overkill for 9V/12V DC. Would a transistor work as a switch for 9 to 12 volts? Or is a relay still a better option?
Relays are still used and with good reason. In your case:
- The relay separates your logic circuit from your high-current and higher voltage pump circuit.
- Any faults on your pump circuit will not affect your logic circuit.
- A faulty relay can often be a plug-in replacement.
A transistor is cheaper but requires that the common line must be shared between both circuits.