Raspberry Pi Pico - Relay

by DIYables in Circuits > Arduino

25 Views, 0 Favorites, 0 Comments

Raspberry Pi Pico - Relay

ib_cover_89222600.jpg

Learn how to program for Raspberry Pi Pico to control the relay

Supplies

Everything below is what the build uses. The links go to the parts we make and test.

Raspberry Pi Pico W

Raspberry Pi Pico

Micro USB Cable: https://diyables.io/dp/B0DQ43NLS4

Relay: https://diyables.io/dp/B0B1ZHXXXD

LED Strip: https://diyables.io/dp/B0DLMYYK1G

DC Power Jack: https://diyables.io/dp/B0BPGC5GTQ

Breadboard: https://diyables.io/categories/breadboard

Jumper Wires: https://diyables.io/categories/jumper-wires

DIYables Sensor Kit (18 sensors/displays): https://diyables.io/dp/B0CWZQ13M1

Wiring

Connect the relay's DC- pin to GND and DC+ pin to VCC (5V) on the input side.

Connect a Pico GPIO pin, such as pin 3, to the relay's IN pin to send the control signal.

On the output side, wire COM and NO pins on the screw terminal to the high-voltage device.

Gotchas

Check whether your relay is LOW level trigger or HIGH level trigger before wiring the IN pin.

The output mode (open by default or closed by default) changes how NO and COM behave when IN is LOW.

Make sure MicroPython firmware is on the Pico and the correct interpreter is selected in Thonny before running the code.