the module has 3 pin and i connect them like this:
GND -> raspi gnd
VCC -> raspi 5v
IN -> raspi gpio 15
i am running a simple python code like this:
Code: Select all
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(15, GPIO.OUT)
GPIO.output(15, 0)
time.sleep(2)
GPIO.output(15, 1)
time.sleep(2)
GPIO.output(15, 0)
GPIO.cleanup()
unfortunately the relay doesnt close the contact (except on the SETUP statement and CLEANUP at the end)
but if i try to connect directly the "IN" pin of the relay module to the raspi GND the realy works actually.
what's the problem?
why the relay doesnt work when i set the gpio 15 to LOW?
thanks