Pi to open sliding gate

I’m trying my first project with Raspberry Pi. I’m a bit of a noob at Python and other types of programming languages, the Pi, as well as circuits and such. I’m trying to configure it to open my sliding gate to the entrance of our house. I have connected the Raspberry Pi3 to my PC via WI-Fi, using the command line over ssh. I have then used jumper wires to connect the Pi’s GPIO pins to the pins on a Arduino Compatible 4 Channel 12V Relay Module. From the Pi to the relay module, I have connected the ground to the ground, 5v to the VCC, and GPIO 17 (BCM) to IN2. On the relay module i have jumper wires connecting from the 2nd channel to the control board of the gate motor at TRIG and COM. When i run the code the gate doesn’t open. I am running a command line to operate a GPIO pin to attempt to complete a circuit and open the circuit so that the gate can be opened and closed. I’ll take a picture of the Pi, relay module and gate motor in a picture, as well as a picture of the Python code that I am using. Would anybody have any ideas as to how I could make this work? Hope this makes sense. Thanks in advance.

Regards,
Rob

Hi Rob,

Sounds like the RPi doesn’t have enough oomph to power the relay. With the relay disconnected, does the GPIO pin you’re using go from 0V to 3.3V?

Hi Graham,

That could be the problem. I read about 0V and 3.3V but I’m not too sure how to find out what voltage it is at. I’ll attach pictures of the setup and Python code that I used which could hopefully help you find what I am doing wrong.

Thanks,

Rob

Mail](https://go.microsoft.com/fwlink/?LinkId=550986) for Windows 10

Code looks fine. For debugging hardware, it would be best to use a multimeter so you can see “what’s what” in the real world.