[TL;DR: how to use PiZero GPIO21 to turn on and off power to separate device.]
Is it possible to switch the IoT Power Relay (COM-14236) using a GPIO pin (GPIO21) of a Pi Zero? I found with Pi connected to the relay directly, the relay was rapidly and audibly cycling. I then tried to add a SparkFun Logic Level Converter - Bi-Directional (BOB-12009) between in an attempt to boost the GPIO signal from 3.3 to 5V and hopefully eliminate the fluttering.
However now I am having trouble with the wiring - especially ground, as there is only one power source (Pi). Present Pi connections to LLC to relay: pin1 (3V3)->LV, pin2 (5V)->HV, GPIO21 (signal)->LV1, HV1->relay(+), HI GD->relay(-) LO GD->pin6 (Ground).
Will this solution work to provide a switched 5V signal into the relay? It looks like I am still only getting 3.3V, so something must be incorrect. Should I attach both sides of the LLC (GD HI+GD LO) to the same ground point on the Pi (pin6)?
From the LLC docs: “Keep in mind that these level shifters are purely digital. They can’t map an analog voltage from one max voltage to another.”
-SpaceCOS