latching relay h-bridge config for motorized relays and switch validation #3232
Replies: 1 comment 1 reply
-
Please reopen this in the correct category https://github.com/orgs/esphome/discussions/categories/component-enhancements |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the enhancement
From: https://esphome.io/components/switch/hbridge.html#h-bridge-switch
In addition to this config,
Example configuration entry
switch:
id: my_relay
name: "Relay"
on_pin: GPIOXX
off_pin: GPIOXX
pulse_length: 50ms
wait_time: 50ms
there are also additional parameters for sanity checking and relays that have different on and off pulse widths.
pulse_length (required): The length in milliseconds to switch the relay coil on
off_pulse_length: (optional) The length in milliseconds to switch the relay coil off
verify_state: (optional) In the case that your relay has a dedicated set of contacts for state checking, use this to verify if the relay is off or on
wait_time: (optional) The time in milliseconds to delay between pulses on
off_wait_time: (optional) The time in milliseconds to delay between pulses off
a typical configuration for a motorized relay that has two contacts installed:
Example configuration entry for a motorized relay with a second set of switches
switch:
id: my_relay
name: "Relay"
on_pin: GPIOXX
off_pin: GPIOXX
verify_state: GPIOXX # updated after wait time expires
pulse_length: 70ms
off_pulse_length: 50ms
wait_time: 80ms
off_wait_time: 60ms
Example configuration entry for a standard latching relay with a second set of switches
switch:
switch:
id: my_relay
name: "Relay"
on_pin: GPIOXX
off_pin: GPIOXX
verify_state: GPIOXX # updated after wait time expires
pulse_length: 30ms
off_pulse_length: 20ms
wait_time: 40ms
off_wait_time: 30ms
Use cases
Motorized relays require more time to switch on than off while some manufactures include a dedicated set of contacts for the microcontroller to know that the relay is on or off.

https://lcsc.com/datasheet/lcsc_datasheet_2409302302_QLRELAY-JMX-1125F-012-1HF_C22385003.pdf

No link to show - IVY metering relay from aliexpress
Visual examples
No response
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions