logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

DIP-encapsulated micro relays to be driven directly from the microcontroller/ESP pin?

p.kaczmarek2  26 2736 Cool? (+14)
📢 Listen (AI):

TL;DR

  • A V23100-V4 dual signal relay was tested as a tiny mechanical disconnect for microcontroller and ESP-controlled lines.
  • Its 500 Ω coil and built-in protection diode allow direct GPIO drive, avoiding an extra transistor in many DIY circuits.
  • The datasheet lists 1 A contact current, 200 V maximum voltage, 10 W switching power, 3.5 V operate, and 0.75 V release.
  • A 5 V test worked immediately, and an ESP32 at 3.3 V also closed the relay despite the 3.5 V operate rating.
  • The 3.3 V result stretches the specification, so production designs should still follow the manufacturer's limits.

Today a little tidbit I came across while developing one of my projects. I was looking for a simple way to mechanically disconnect microcontroller/ESP controlled lines, with a minimum of additional components. This is how I came across the very small V23100-V4 dual signal relays. Interestingly, the manufacturer explicitly emphasises in the documentation that the coil can be controlled directly by TTL signals, which is immediately appealing for projects with microcontrollers.

Consider the parameters from the datasheet:
- maximum contact current: up to 1 A
- maximum voltage: up to 200 V
- maximum switching power: 10 W
For such a small relay, these are quite reasonable values - especially when it comes to signal applications or small loads. The coil parameters are also interesting:
- coil resistance: ~500 Ω
- coil power: ~50 mW
This means that the control current is very low, which is precisely what makes direct control from the microcontroller output possible (at least in many cases). In practice, it is important to check how much current can be drawn from the GPIO. For example, for the PIC18F2550 it is 25 mA:

Assuming a supply voltage of 5 V, about 10 mA will flow through the ~500 Ω coil. Well under the limit. Just what about lower voltages? According to the datasheet note:
- closing voltage (operate): 3.5 V
- opening voltage (release): 0.75 V

These values suggest that the relay is designed with low-voltage logic in mind. However, an interesting question arises: in practice, will it also work at even lower voltages than the declared 3.5 V? There is often some design reserve in such components, so I thought I would give it a go with ESP. DIY projects have their own rules, it's not mass production, so you can afford to do more. So it's time for testing.
The whole thing has a standard DIP raster, so it fits on a contact board:

Leads - yes, there is already a protection diode inside in parallel to the coil, so you can't connect the coil in reverse either:

First test at 5 V - no surprise here rather, the whole thing works.

Second test - controlled from ESP32 at 3.3 V:
Breadboard with a DIP relay and two LEDs, next to an ESP module with red indicator lights
Here I've stretched the specification a bit, as the manufacturer announces the contacts close from 3.5 V rather than 3.3 V, but nevertheless the relay works too.
In summary , this was an example of a small relay that in practice turns out to be much more 'friendly' to microcontrollers than the datasheet note alone might suggest. Thanks to the very low coil power consumption, it can in many cases be controlled directly from the GPIO, without an additional transistor. Of course, in production applications it is better to stick to the manufacturer's specifications, but in DIY projects such a reserve of parameters can be very useful.
Undoubtedly this was a rather beginner's topic, but I hope it may have interested someone.
Have you used this type of relay in projects, and if so, for what?

About Author
p.kaczmarek2
p.kaczmarek2 wrote 14648 posts with rating 12659 , helped 655 times. Been with us since 2014 year.

Comments

CosteC 21 Apr 2026 10:31

The question is whether one is making something for art, for the desk. In such circumstances, one gets away with a great deal. For a product, especially one exposed to non-room temperatures, I would not... [Read more]

p.kaczmarek2 21 Apr 2026 10:41

Right, but as I wrote in the next sentence - in production you should stick to these parameters and preferably with a margin, especially because if something goes wrong, a discrepancy of parameters on... [Read more]

CosteC 21 Apr 2026 11:27

This makes sense... The 5 V relay is often the only receiver on 5 V so it makes the design more expensive and larger. And that it devours a lot of current is less of a problem than a separate power supply.... [Read more]

p.kaczmarek2 21 Apr 2026 11:43

In the IoT devices I have tested, I am unlikely to have seen opto-isolation in such an application, and we have shown a bit of these devices on the forum. Here's a dedicated search engine (each result... [Read more]

acctr 21 Apr 2026 12:18

Where exactly did he write about this? TTL levels are ranges from 0 to 0.8 V for the low state and 2.4 to 5 V for the high state. In the table with the DS of this relay, there is a range from 3.5 V so... [Read more]

p.kaczmarek2 21 Apr 2026 12:41

I was referring to this passage from the catalogue note: https://obrazki.elektroda.pl/7812401500_1776768079_bigthumb.jpg [Read more]

mkpl 21 Apr 2026 13:29

It is possible to control this way but this approach has some limitations. Firstly, you have to be careful with the sum of the input currents relative to the supply (ground or power) pin. Controlling... [Read more]

acctr 21 Apr 2026 14:52

You can disconnect the relay for the duration of the measurement, the shortest time in the relay DS is 0.15 ms. [Read more]

CosteC 21 Apr 2026 15:59

Will it drop from 10 bit to 9 bit? Not likely, as the problems could be with the accuracy of the ADC or rather with the reference voltage, as there will be offsets due to currents flowing in the ground... [Read more]

acctr 21 Apr 2026 16:48

What is this project? Who is the author? Where have you seen it? Motivations can always be sensibly explained, either a technical reason or someone's whim. [Read more]

rezydent1 21 Apr 2026 17:57

My question is, what is the guaranteed number of switches. ? [Read more]

Janusz_kk 21 Apr 2026 18:02

These are hermetic reed switches so they safely last for millions. [Read more]

acctr 21 Apr 2026 18:24

https://obrazki.elektroda.pl/8945003400_1776788643_thumb.jpg [Read more]

CosteC 21 Apr 2026 18:56

https://www.elektroda.pl/rtvforum/topic4144485.html [Read more]

exlibris71 21 Apr 2026 20:50

Separating the ground (and not just the power supply) of the control part from the executive part can be convenient, e.g. with many such modules, thanks to opto-isolation, the connection point for these... [Read more]

acctr 21 Apr 2026 21:37

In the diagram you have the answer - the grounds are separate, they can be combined and separated, the relays can be fed from one power supply and the ESP from another. You will see what happens between... [Read more]

CosteC 21 Apr 2026 21:46

No... Everything flies from the power supply to J1, then there's 5V from it linear to 3V3 to the ESP. From 5V a small isolated inverter is used to make Relay-5V. The common ground of the relays and ESP....... [Read more]

kris8888 22 Apr 2026 08:57

Control current is one thing, but I assume that a suppression diode must also be inserted in parallel to the relay coil. Will it be sufficient to protect the after all quite sensitive to overvoltage output... [Read more]

krzbor 22 Apr 2026 09:45

Have you looked at the internal schematics of the relays the Author has provided? Half of these circuits (relays) have an integrated diode. [Read more]

FAQ

TL;DR: With a ~500 Ω coil, the relay draws about 10 mA at 5 V, and the author reports, "the relay works too" from an ESP32 at 3.3 V. This FAQ helps MCU and ESP builders decide when a V23100-V4 DIP relay can be driven directly from GPIO and when a transistor or more margin is safer. [#21887831]

Why it matters: Direct-GPIO relay drive can save parts and board space, but operating near the pull-in limit can create intermittent failures in finished products.

Option Coil supply / drive What the thread says Best fit
5 V relay from 5 V MCU GPIO 5 V / ~10 mA Works and stays below a PIC18F2550 25 mA pin limit Simple 5 V MCU designs
Same relay from ESP32 GPIO 3.3 V / below 3.5 V spec Tested working, but outside stated operate voltage DIY tests, not production
3.3 V relay with shared ESP/Wi‑Fi supply 3.3 V shared rail Used in some modern IoT plugs to simplify power design Compact IoT hardware

Key insight: Low coil power makes direct GPIO drive practical, but the thread’s strongest engineering advice is to keep design margin in production, especially across temperature, voltage drop, and part spread.

Quick Facts

  • V23100-V4 thread figures: max contact current 1 A, max voltage 200 V, max switching power 10 W. That makes it a small signal-switching part, not a power relay. [#21887831]
  • Coil data cited in the thread: ~500 Ω resistance and ~50 mW coil power. At 5 V, that implies about 10 mA coil current. [#21887831]
  • The posted operate/release figures are 3.5 V pull-in and 0.75 V release, so 3.3 V ESP32 drive is below the stated operate voltage even if a sample still actuates. [#21887831]
  • One participant warns that, in a finished product, microcontroller output voltage drop, coil tolerance spread, and non-room temperatures can cause occasional failures near the minimum drive point. [#21887918]
  • The relay package has standard DIP spacing and the coil includes an internal protection diode in parallel, so polarity matters during wiring. [#21887831]

How can I drive a V23100-V4 DIP dual signal relay directly from a microcontroller GPIO or an ESP32 pin without using an extra transistor?

You can drive it directly only if the GPIO can source or sink the coil current at the required voltage. 1. Check the coil resistance, shown here as ~500 Ω. 2. Compute current from the intended supply; at 5 V it is about 10 mA. 3. Compare that with the MCU pin limit and keep voltage margin above the stated 3.5 V operate level. The thread shows direct operation from 5 V and a working DIY test from 3.3 V ESP32, but that 3.3 V case sits outside the stated operate spec. [#21887831]

What current does the V23100-V4 relay coil draw at 5 V and how do I check whether a PIC18F2550 or ESP32 pin can supply it safely?

At 5 V, the ~500 Ω coil draws about 10 mA. Check safety by comparing that current with the GPIO limit of the controller. The thread gives 25 mA as the PIC18F2550 output-current figure, so 10 mA is comfortably below it. For an ESP32, the same method applies: calculate the coil current first, then confirm the pin can deliver it while still keeping enough output voltage for relay pull-in. Current limit alone is not enough if the output voltage sags near the relay’s minimum operate value. [#21887831]

Why does a V23100-V4 relay sometimes work from an ESP32 at 3.3 V even though the datasheet lists 3.5 V as the operate voltage?

It can work because a real sample may have some margin below the stated 3.5 V operate point. The author tested the relay from an ESP32 at 3.3 V and observed that it still actuated. That does not move the official pull-in specification; it only shows that this particular test setup and relay sample worked below the guaranteed value. Use that result as a DIY experiment, not as a guaranteed design rule for every unit, temperature, or supply condition. [#21887831]

What problems can appear when a relay is driven close to its minimum operate voltage in a finished product, especially across temperature and part tolerances?

You risk occasional failures to pull in. One participant explicitly warns against using 3.3 V or even 3.5 V in a product because the microcontroller output has voltage drop, coils have unit-to-unit spread, and non-room temperatures worsen margin. A bench test may pass, yet a production unit can miss actuations under colder, hotter, or lower-voltage conditions. That makes borderline drive acceptable for desk experiments, not for hardware that must switch reliably every time. [#21887918]

Which is better for small MCU-controlled switching tasks: a 5 V relay driven directly from a 5 V microcontroller or a 3.3 V relay shared with an ESP/Wi-Fi supply?

A 5 V relay on a 5 V MCU is the safer direct-drive choice when current and voltage margin both check out. A 3.3 V shared relay and logic rail can simplify IoT hardware because it removes a separate 5 V relay rail, and the thread notes that some modern Tuya Wi‑Fi and Zigbee devices already do this. Choose the shared 3.3 V approach when reducing cost, size, and power rails matters more than preserving wider actuation margin. [#21887928]

How do I wire a DIP relay with an internal flyback diode correctly, and what happens if I reverse the coil polarity?

Wire the coil with the correct polarity shown for the internal diode. The thread states that the diode is already connected in parallel with the coil, and the author notes that you cannot connect the coil in reverse. In practice, that means the relay has a defined positive and negative side instead of a fully interchangeable coil. The standard DIP spacing helps breadboard use, but the diode makes polarity checking mandatory before you apply 5 V or 3.3 V drive. [#21887831]

What does TTL control really mean for a relay coil, and why did the forum discussion question whether 3.5 V operate voltage qualifies as TTL-compatible?

In the thread, “TTL control” is questioned because a stated 3.5 V operate voltage does not align cleanly with classic TTL high-level expectations. One participant points out that TTL levels are ranges, with high starting at 2.4 V, so a relay that only guarantees pull-in from 3.5 V is not inherently TTL-compatible by that definition. The catalog note may use “TTL” loosely for logic-driven convenience, but the forum correctly separates marketing wording from guaranteed electrical thresholds. [#21887991]

What is a signal relay, and how is it different from a power relay when switching measurement lines or small loads?

A signal relay is for low-power paths, not for heavy loads. "Signal relay" is an electromechanical relay that switches measurement or low-level circuits, with small contact power limits and compact construction. In this thread, it is described as suitable for measurement applications and low packing density systems, but not for true power switching. One reply stresses that these parts are “very good signal relays” yet “by no means suitable for power applications,” citing limits such as 10 VA or 3 VA max in that context. [#21887918]

What is opto-isolation in relay modules, and why would a designer isolate the control side from the relay side grounds?

Opto-isolation separates the control interface from the relay side so grounds and supplies can remain separate or be joined deliberately. "Opto-isolation" is galvanic signal separation that transfers control through an optocoupler, keeping the control side electrically distinct from the relay-side supply and ground, which can reduce shared-ground interaction and simplify modular wiring. In the thread, the practical reason given is flexibility: the relay section can run from one supply, the ESP from another, and the grounds can be combined or separated as needed. [#21888361]

Why can low-side relay control through ground affect ADC accuracy or reference stability in some microcontroller designs?

Low-side control can shift the local ground reference seen by the analog section. One reply warns that relay current returning through the common ground path creates voltage drops on that shared connection, and those drops directly affect REF and ADC accuracy. The thread does not claim a fixed loss such as “10-bit to 9-bit,” but it clearly identifies ground-current-induced offsets as the mechanism. This matters most when analog measurements and relay drive share the same narrow ground path. [#21888043]

How can I reduce ADC measurement errors when relay coil current shares the same ground path as the analog circuitry?

Disconnect the relay during the measurement window or avoid sharing the sensitive ground path. One participant suggests turning the relay off for the measurement itself and notes a shortest datasheet time of 0.15 ms in that context. That gives you a clear timing strategy: switch, settle, measure, then restore the relay state if needed. Separate grounding or supply partitioning can also help, but the thread’s concrete mitigation is temporary relay disconnection during ADC sampling. [#21888117]

What is the guaranteed switching lifetime of these hermetic reed-style micro relays, and how does load type affect the number of operations?

The thread does not provide a numeric guaranteed lifetime, but one participant says these hermetic reed switches “safely last for millions.” That means the discussion only supports a qualitative answer, not a guaranteed cycle count. Load still matters because switching light signal paths stresses contacts less than harder electrical loads. If you need a guaranteed lifetime for a product, the thread points you toward the exact datasheet endurance entry rather than treating “millions” as a universal specification. [#21888216]

Why are some modern Tuya WiFi or Zigbee smart plugs moving from 5 V relay supplies to 3.3 V relay and logic supplies in the same design?

They do it to simplify the power architecture and reduce cost and size. The thread notes that older IoT designs often used a 5 V supply for the relay plus a separate 3.3 V LDO for Wi‑Fi, while newer products increasingly share a 3.3 V rail between the radio and relay. A reply says this makes sense because the 5 V relay is often the only 5 V load, so keeping that separate rail increases expense and board area more than it helps. [#21887952]

What should I look for in a datasheet when choosing a DIP micro relay for direct GPIO control, including coil resistance, coil power, operate voltage, and contact ratings?

Check four numbers first: coil resistance, coil power, operate voltage, and contact limits. In this thread, the useful figures are ~500 Ω coil resistance, ~50 mW coil power, 3.5 V operate voltage, 0.75 V release voltage, 1 A maximum contact current, 200 V maximum voltage, and 10 W maximum switching power. Also verify package style, here a standard DIP format, and whether the coil already includes a protection diode because that changes polarity handling. Those values tell you both drive feasibility and switching scope. [#21887831]

How do separate grounds and separate supplies for ESP and relay sections change noise behavior in multi-relay boards such as ESP32 relay controllers?

Separate grounds and supplies let you control where relay current returns and where noise can couple. The thread explains that, with isolation and split supplies, the relay section can run from one source and the ESP from another, with grounds either combined or left separate. That can reduce interference carried by common ground paths across multiple modules. A later reply challenges whether such separation matters much without analog signals, so the benefit is strongest when ground-current routing or system modularity is the real design constraint. [#21888322]
%}