logo elektroda
logo elektroda
X
logo elektroda

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

p.kaczmarek2 252 6

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.
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • DIP-encapsulated micro relays to be driven directly from the microcontroller/ESP pin?
    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.
    DIP-encapsulated micro relays to be driven directly from the microcontroller/ESP pin?
    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:
    DIP-encapsulated micro relays to be driven directly from the microcontroller/ESP pin?
    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
    DIP-encapsulated micro relays to be driven directly from the microcontroller/ESP pin?
    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:
    DIP-encapsulated micro relays to be driven directly from the microcontroller/ESP pin?
    Leads - yes, there is already a protection diode inside in parallel to the coil, so you can't connect the coil in reverse either:
    DIP-encapsulated micro relays to be driven directly from the microcontroller/ESP pin?
    First test at 5 V - no surprise here rather, the whole thing works.
    DIP-encapsulated micro relays to be driven directly from the microcontroller/ESP pin?
    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?

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 14355 posts with rating 12262, helped 649 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 21887918
    CosteC
    Level 39  
    p.kaczmarek2 wrote:
    I've stretched the specification a bit here, as the manufacturer announces the contacts close from 3.5 V, not 3.3 V, but nevertheless the relay works too.

    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 risk controlling it with 3.3 V or even 3.5 V. The microcontroller output has its voltage drops, the coils have their spread which will cause occasional failures.

    On a completely different note: these are very good signal relays. They are by no means suitable for power applications (10 VA or 3 VA max) but for measurement applications as much as possible, especially in systems with low packing density.
  • ADVERTISEMENT
  • #3 21887928
    p.kaczmarek2
    Moderator Smart Home
    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 paper is always (according to common sense) the first sign of the designer's fault :D but let's not focus so much on 3.3 V, many microcontrollers operate on 5 V.

    And while we're on the subject of 3 V, I've also seen another curiosity recently. I've noticed that IoT manufacturers too have started to combine with relays on 3 V, but the kind for switching networks normally. For example, here:
    Template and firmware information for the generic Tuya EU WiFi Smart Plug with LN
    This is interesting to me because for years I have seen IoT devices based on a 5 V power supply, a relay for 5 V, and separately a 3.3 V LDO for the Wi-Fi module, and here suddenly they are already starting to simplify so much that directly the power supply gives 3.3 V and then the Wi-Fi module and the relay share power.
    Here the other one:
    [ZIGBEE] Zigbee 20A socket with energy measurement (Tuya TS011F_plug_3)
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #4 21887952
    CosteC
    Level 39  
    p.kaczmarek2 wrote:
    As long as we're talking about 3 V, I've also seen another curiosity recently. I've noticed that IoT manufacturers too have started to fiddle with 3 V relays, but ones for switching the grid normally.

    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. The interference doesn't come from the relay coil in a good design anyway.
    I admire how bad the design has to be to opto-isolate relays, and I have seen such.
  • #5 21887969
    p.kaczmarek2
    Moderator Smart Home
    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 leads to a separate Electrode topic):
    https://openbekeniot.github.io/webapp/devicesList.html

    Well, unless you consider industrial equipment, here too there are separate power lines in general:
    [YT] ESP32-S3-Relay-6CH six relay controller - schematic, flashing, Home Assistant
    Helpful post? Buy me a coffee.
📢 Listen (AI):
ADVERTISEMENT