STUCK: Controlling IoT Power Relay (COM-14236) from Pi Zero GPIO signal

[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

3.3 volts from the pi should be enough by itself. If you connect the relay directly to 3.3 volts and ground does it stay on? If not, does connecting the relay directly to 5 volts and ground work?

Thanks, YellowDog.

I believe I may have a bad power supply to the Pi. The 3.3V is coming in closer to 2.9, and will not hold the relay. Will swap this out and retry.

-SpaceCOS

Swapped power supply and cleaned some stray flux from breadboard.

The circuit now works perfectly using the GPIO pin to switch and hold the relay without the need for a logic level converter.

Glad you got it working!