# Relay for Servo 2040?

**URL:** <https://forums.pimoroni.com/t/relay-for-servo-2040/24685>\
**Category:** Support\
**Created:** [April 21, 2024, 3:09am UTC](https://forums.pimoroni.com/t/relay-for-servo-2040/24685 "2024-04-21T03:09:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AL1024](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@AL1024](https://forums.pimoroni.com/u/AL1024)\
**Post date:** [April 21, 2024, 3:09am UTC](https://forums.pimoroni.com/t/relay-for-servo-2040/24685/1 "2024-04-21T03:09:57Z")

</div>

I have a Servo 2040 with two servos that work fine. I would like to add two solid state relays. I purchased a small board from SainSmart with two Omron G3MB-202P relays. Should I connect them to the pins intended for servos? I don’t need all 18. And then do I need to change a config file somewhere to tell MicroPython those two pins are now relays and not servos? Also, the board itself requires 5V (I assume at low current, but I could not find a spec). Is the 5V pin on the header close to the USB-C connector an output? Can I use it?

---

<div class="post-metadata">

**Author:** ![bablokb](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@bablokb](https://forums.pimoroni.com/u/bablokb)\
**Post date:** [April 22, 2024, 7:23am UTC](https://forums.pimoroni.com/t/relay-for-servo-2040/24685/2 "2024-04-22T07:23:46Z")

</div>

The servo-pins are connected to the Pico and therefore are 3.3V pins. The datasheet of your G3MB-202P tells you, that they need 4V and above to turn on. So this will not work. What you typically do in this case is to drive a mosfet with the 3V3 pin that in turn switches the relay. Or, depending on what currents you intend to switch, you could also replace the relay with a mosfet. Ask Google about “mosfet as a switch” and you will find many tutorials, examples and so on.

I am not aware of a ready-to-use breakout for that, if some reader knows about one, please chime in.

Regarding your second question: the Servo2040 has a dedicated 5V power pin labeled “5V”. It is next to the Stemma-Qt/Qwic connector and is directly connected to the 5V of the USB-C plug. You can use this to power other boards, but keep the total current you draw in mind.
