Using a relay is very helpful when trying to power something with a raspberry pi that requires more than 5v. To be able to do this you are going to need a raspberry pi, a relay, and an external power supply greater than 5v.