I'm trying to control this relay
with my rpi2 b+. The problem is, when I do
GPIO.setup(myPinNum, GPIO.OUT) this activates the relay. When I then do
GPIO.output(myPinNum, True) or
GPIO.output(myPinNum, False), this doesn't affect the relay. The relay can be deactivated only by setting the pin back to the input mode. I checked the voltage on the pin, in input mode it is 0, in output mode LOW it is 0.05 and in output mode high it is 3.3. It seems that even those small 0.05v voltage is sufficient to activate the relay. Then I made a voltage divider with 1kO and 10kO resistors, but even with the divider the output LOW still activates the relay. The questions are:
- How to solve this problem?
- Is this normal that a pin in output LOW has a voltage of 0.05 ?
P.S. Just noticed that one of the pins has 0.03 volts even in input mode and the relay is always activated when connected to this pin. This makes impossible to control the relay with this pin at all, even by setting the mode to input.