Electrical – Using Raspberry to switch 12V

12voutputraspberry pirelay

I want to use my Raspberry Pi to turn on and off a 12V current for a certain amount of time. I've read a lot on Raspberry Stackexchange and I've understood that the 5V GPIO Pin is… Not GPIO, meaning that I cannot turn it on and off.

I am not an electronics expert, but I've already learned how to use GPIO to control stuff like Led, or simply closing circuits, using this tutorial (french) : http://blog.idleman.fr/raspberry-pi-06-utiliser-le-gpio-et-interagir-avec-le-monde-reel/

But now I need to turn on / off a 12V current for about 8 seconds.

I have a Rasberry Pi 3 Model B V 1.2.

I also have this relay : https://www.velleman.eu/downloads/29/vma406_a4v02.pdf

My question is : Could I use GPIO ports to open / close the relay safely ? I imagine plugging the relay into the 5V pin of the Raspberry and using another 3.3V GPIO pin to "activate" some sort of switch…

I really have no electronics background so don't hesitate to start from scratch.

Best Answer

There may not be enough current available on the pins 2&4 "GPIO" (actually power pins). The Velleman relay should draw less than 100mA when on.

The +5V is drawn directly from the USB port with a resettable fuse in series. Looks like a 2A fuse on yours (which means it might trip at 1.5 or 1.3A at elevated temperature). The current is also limited by what the USB can supply. So if you look at those two limits and take the smaller you may get some idea.

There is insufficient information on the Velleman to determine if it will work reliably from a 0V/3.3V signal. No specification and no schematic.

I would guess it might work well enough for you but that's a guess. If you hook it up correctly it shouldn't hurt anything, but you may not be able to tell if it is marginal.