Reliable low-power domotic module designed to enable/disable loads saving energy consumption, zeroing the standby power.
It uses 3 latching relays, 15A 250Vac, that does not consume anything when are active, and can be used to enable loads or generators up to 3kW that are OFF for long time. Also, removing power to loads during lightning storms helps prevent damage from electrostatic discharges.
It also have 1 AC input to sense 230Vac voltage (detecting power outage), that acts also as a zero-crossing detector that permits to enable relays when voltage is zero (to minimize in-rush current, in case of capacitive loads) and disable relays when current in zero (to minimize overvoltage in case of inductive loads).
4 low voltage inputs, that can be configured as analog or digital, permit to connect pushbutton switches, NTC thermal probes, alarm sensors and energy / gas / water meters with pulsed output.
The 3 latching relays can be used to enable/disable:
- heat pump, that normally consumes more than 5W in standby
- boiler, heater or other appliances consuming power in standby
- gate and garage door, that normally consumes more than 5W/each in standby, and it's also good to disable them when away alarm is active to prevent thefts.
- small photovoltaic systems, less than 3kWp
- outdoor lights
Features
- 3x 15A SPST latching relays, that permit to manage up to 3kW loads or generators 230Vac
- 1x AC input, 100-250V, that is used for two functions: zero-crossing detector + voltage presence
- 4x configurable low voltage inputs, analog or digital: each input, using GND as common voltage, can be configured as pushbutton, twinbutton (UP/DOWN buttons that uses a single input), alarm sensor (magnetic, PIR, ...), NTC 10k thermal sensor, counter / meter with pulsed output.
- only 15mW power consumption, even if one or more relays are ON.
- available with two firmwares:
- DomBus firmware, supporting the proprietary DomBus protocol, working with Domoticz
- Modbus firmware, supporting the standard Modbus RTU protocol, working with Home Assistant, OpenHAB, NodeRED, ...
- RS485 bus connection, industrial grade, 115200bps, permitting to use up to 500m of standard alarm cable (2x0.5mm² + 2x0.22mm² + shield) for connections.
- Very compact size: 59x42x21mm, fits everywhere, expecially in switchboxes and junction boxes.
DomBus21 ports capabilities (for the DomBus version)
Default address: 0xff21
Port# | Name | Capabilities | Default configuration | Description |
1 | RL1 | OUT_DIGITAL | OUT_DIGITAL | SPST 15A latching relay: coil is activated only during on/off transitions, consuming nothing when relay is ON or OFF. The INAC input should be connected to 230Vac to permit the zero-crossing detection, avoiding high in-rush current (for capacitive loads) and overvoltage (for inductive loads) |
2 | RL2 | OUT_DIGITAL | OUT_DIGITAL | SPST 15A latching relay: coil is activated only during on/off transitions, consuming nothing when relay is ON or OFF. The INAC input should be connected to 230Vac to permit the zero-crossing detection, avoiding high in-rush current (for capacitive loads) and overvoltage (for inductive loads) |
3 | RL3 | OUT_DIGITAL | OUT_DIGITAL | SPST 15A latching relay: coil is activated only during on/off transitions, consuming nothing when relay is ON or OFF. The INAC input should be connected to 230Vac to permit the zero-crossing detection, avoiding high in-rush current (for capacitive loads) and overvoltage (for inductive loads) |
4 | INAC | IN_AC, IN_COUNTER | IN_AC | Optoisolated input, that can be connected to a circuit breaker (to notify power outages, expecially for fridges and heat pumps), PIRs with 230V output (to monitor presence), light and appliances (to monitor when light or devices are ON). |
5 | IN1 | IN_DIGITAL, IN_DIGITAL_PULLDOWN, IN_ANALOG, IN_TWINBUTTON, IN_COUNTER | IN_DIGITAL | Analog or digital input, with 10k pullup (to 3.3V). Can be connected to a pushbutton, switch, twinbutton (double button with 10k resistor connected between buttons), alarm sensor, 10k NTC thermistor, counter with pulsed output (energy meter, gas meter, water flow meter), ... The other wire should be connected to GND (common). |
6 | IN2 | IN_DIGITAL, IN_DIGITAL_PULLDOWN, IN_ANALOG, IN_TWINBUTTON, IN_COUNTER | IN_DIGITAL | Analog or digital input, with 10k pullup (to 3.3V). Can be connected to a pushbutton, switch, twinbutton (double button with 10k resistor connected between buttons), alarm sensor, 10k NTC thermistor, counter with pulsed output (energy meter, gas meter, water flow meter), ... The other wire should be connected to GND (common). |
7 | IN3 | IN_DIGITAL, IN_DIGITAL_PULLDOWN, IN_ANALOG, IN_COUNTER | IN_DIGITAL | Analog or digital input, with internal pullup or pulldown (activated when configured as IN_DIGITAL_PULLDOWN). Common terminal block is GND: pushbutton, switch, alarm sensor, counter with pulsed output (energy meter, gas meter, water flow meter), ... should be connected to this input and to GND. |
8 | IN4 | IN_DIGITAL, IN_DIGITAL_PULLDOWN, IN_ANALOG, IN_COUNTER | IN_DIGITAL | Analog or digital input, with internal pullup or pulldown (activated when configured as IN_DIGITAL_PULLDOWN). Common terminal block is GND: pushbutton, switch, alarm sensor, counter with pulsed output (energy meter, gas meter, water flow meter), ... should be connected to this input and to GND. |
DomBus21 Modbus RTU capabilities (for the Modbus version)
At power-on, the module shows on red LED the current Modbus slave address (register address=8192) in decimal format, on green LED the serial baudrate (reg. 8193), and finally on red LED the serial parity (reg. 8194).
If a value is zero, a long flash is emitted.
For example, if reg(8192)=33, reg(8193)=0, reg(8194)=0, at power the following led flashes will be shown:
3 red flashes, pause, 3 red flashes (slave address= 0x21 = 33 decimal), pause, 1 long green flash (reg(8193)=0 => baudrate=115200bps), pause, 1 long red flash (reg(8194)=0 => parity=None).
Device will be operative only when address/baudrate/parity parameters have been shown: then module will accept commands by Modbus RTU, and periodically shows output status for all ports, from 1 to max port: green flash means that port status is Off, red flash means that port is On.
Default slave address: 33 (0x21)
Addr | Name | Values | Description |
0 | RL1 | 0=OFF, 1 or 65280=ON, 2-65279=ON for specified time. Logic can be inverted specifying the INVERTED option (on address 512+port) |
SPST 15A latching relay: coil is activated only during on/off transitions, consuming nothing when relay is ON or OFF. The INAC input should be connected to 230Vac to permit the zero-crossing detection, avoiding high in-rush current (for capacitive loads) and overvoltage (for inductive loads) |
1 | RL2 | 0=OFF, 1 or 65280=ON, 2-65279=ON for specified time. Logic can be inverted specifying the INVERTED option (on address 512+port) |
SPST 15A latching relay: coil is activated only during on/off transitions, consuming nothing when relay is ON or OFF. The INAC input should be connected to 230Vac to permit the zero-crossing detection, avoiding high in-rush current (for capacitive loads) and overvoltage (for inductive loads) |
2 | RL3 | 0=OFF, 1 or 65280=ON, 2-65279=ON for specified time. Logic can be inverted specifying the INVERTED option (on address 512+port) |
SPST 15A latching relay: coil is activated only during on/off transitions, consuming nothing when relay is ON or OFF. The INAC input should be connected to 230Vac to permit the zero-crossing detection, avoiding high in-rush current (for capacitive loads) and overvoltage (for inductive loads) |
3 | INAC | 0=OFF (floating), 1=ON (100-250V signal detected) | Optoisolated input, that can be connected to a circuit breaker (to notify power outages, expecially for fridges and heat pumps), PIRs with 230V output (to monitor presence), light and appliances (to monitor when light or devices are ON). |
4 | IN1 | 0=OFF, 1=ON, or 0-65535 if port is configured as analog. See below for more information. |
Analog or digital input, with optional 10k pullup (pcb jumper) and optional internal pulldown (activated when configured as IN_DIGITAL_PULLDOWN). Common terminal block is GND: pushbutton, switch, twinbutton (double button with 10k resistor between buttons), alarm sensor, 10k NTC thermistor, counter with pulsed output (energy meter, gas meter, water flow meter), ... should be connected to this input and to GND. |
5 | IN2 | 0=OFF, 1=ON, or 0-65535 if port is configured as analog. See below for more information. |
Analog or digital input, with optional 10k pullup (pcb jumper) and optional internal pulldown (activated when configured as IN_DIGITAL_PULLDOWN). Common terminal block is GND: pushbutton, switch, twinbutton (double button with 10k resistor between buttons), alarm sensor, 10k NTC thermistor, counter with pulsed output (energy meter, gas meter, water flow meter), ... should be connected to this input and to GND. |
6 | IN3 | 0=OFF, 1=ON, or 0-65535 if port is configured as analog. See below for more information. |
Analog or digital input, with internal pullup or pulldown (activated when configured as IN_DIGITAL_PULLDOWN). Common terminal block is GND: pushbutton, switch, alarm sensor, counter with pulsed output (energy meter, gas meter, water flow meter), ... should be connected to this input and to GND. |
7 | IN4 | 0=OFF, 1=ON, or 0-65535 if port is configured as analog. See below for more information. |
Analog or digital input, with internal pullup or pulldown (activated when configured as IN_DIGITAL_PULLDOWN). Common terminal block is GND: pushbutton, switch, alarm sensor, counter with pulsed output (energy meter, gas meter, water flow meter), ... should be connected to this input and to GND. |
256-273 | Port config | 1=OUT_DIGITAL, 2=OUT_RELAY_LP, ... |
Command used to configure port 1 (256), port 2 (257), ... as OUT_DIGITAL or OUT_RELAY_LP (low power consumption relay) or other value (see table below) |
512-529 | Port option | 0=NORMAL, 1=INVERTED (output normally ON, or input is ON when port voltage is 0V) | Set port option. If set to 1, output stays ON after boot until the port is asserted (then relays goes OFF). For inputs, setting INVERTED the port value is ON (1) when input voltage is 0V, OFF when input is left open with internal pullhigh enabled. |
8192 | Slave Address | 1-247 | Permits to change the slave address of the module, so it's possible to add other modules to the same bus |
8193 | Serial bitrate | 0=115200bps, 1=57600, 2=38400, 3=19200, 4=9600, 5=4800, 6=2400, 7=1200bps | Serial speed, default 115200 bps 8,n,1 |
8194 | Serial parity | 0=None, 1=Even, 2=Odd | Serial parity, default none (115200 bps 8,n,1) |
8198 | Revision, major | Read only | Get firmware version, major number. For example "02" means that revision is "02XX" where XX defined by parameter 8199 |
8199 | Revision, minor | Read only | Get firmware version, minor number. For example "h1" means that revision is "XXh1" where XX defined by parameter 8198 |
It's possible to activate one or more outputs for a certain amount of time (monostable/timer output) as indicated in the table. The parameter corresponding to the needed time can be computed using the following rules:
From 0 to 60s => 31.25ms resolution 2=62.5ms, 3=93.75ms, ... 1920=60s => value=time_in_milliseconds/31.5
From 1m to 1h with 1s resolution 1921=61s, 3540+1920=5460=1h => value=(time_in_seconds-60)+1920
From 1h to 1d with 1m resolution 5461=1h+1m, 1380+5460=6840=24h => value=(time_in_minutes-60)+5460
From 1d to 1500 days with 1h resolution 6841=25h, 6842=26h, and so on => value=(time_in_hours-24)+6840
The following tables show some Modbus commands examples.
Slave Addr | Func. Code | Reg.Addr | Reg.Value | Frame | Description |
55 | 06 | 8192 | 1 | [37][06][20][00][00][01][xx][xx] | Change slave address from 54 (0x36) to 1 |
01 | 06 | 8193 | 4 | [01][06][20][01][00][04][D2][09] | Set serial speed to 9600bps |
01 | 06 | 8194 | 1 | [01][06][20][02][00][01][E2][0A] | Set even parity |
49 | 10 | 8192 | 1,4,1 | [31][10][20][00][00][03][06][00][01][00][04][00][01][B1][71] | With a single command, set slave address to 1, serial speed to 9600bps, even parity. Original modules address was 49 (0x31) in this example. |
01 | 06 | 0 | 65280 | [01][06][00][00][FF][00][C8][3A] | Activate RL1 output forever (65280=0xff00) |
01 | 06 | 1 | 960 | [01][06][00][01][03][C0][D8][AA] | Activate RL2 for 960/32=30s |
01 | 06 | 255 | 0 | [01][06][00][FF][00][00][B9][FA] | Disable all outputs (Reg.Addr=255) |
01 | 10 | 0 | 32,0,0,65280 | [31][10][00][00][00][04][08][00][20][00][00][00][00][FF][00][E6][5C] | Set RL1 On for 1s (32), RL2 Off, RL3 Off, RL4 On - Max 10 registers can be set in one command |
01 | 03 | 255 | 1 | [01][03][00][FF][00][01][B4][3A] | Read a 16bit value with ports status. For example if returned value is 0xd1 (0b11010001), output status is: RL8=On, RL7=On, RL6=Off, RL5=On, RL4=Off, RL3=Off, RL2=Off, RL1=On |
01 | 03 | 8198 | 2 | [01][03][20][06][00][02][2F][CA] | Read 4 bytes within module version. For example, if returned value is <30><32><68><31> (in hex format), the corresponding ASCII value is "02h1" (Firmware 02h1) |
01 | 0F | 0 | 8,1,0xd1 | [01][0F][00][00][00][08][01][D1][3E][C9] | Set coil status to 0xd1 (0b11010001), activating RL8, RL7, RL5, RL1 and disabling other relays |
01 | 01 | 0 | 8 | [01][01][00][00][00][08][3D][CC] | Read coil status. If returned value is 0xd1 (0b11010001), it means that RL8, RL7, RL5 and RL1 are On |
Modbus protocol can be tested easily using a modbus program, like mbpoll for Linux:
mbpoll -v -m rtu -0 -1 -a1 -b115200 -Pnone -r 0 /dev/ttyUSB0 32 0 64 128 0 0 0 65280
to activate RL1 for 1s, R3 for 2s, RL4 for 4s and RL8 forever.
mbpoll -v -m rtu -0 -1 -a1 -b115200 -Pnone -r 255 -c 1 /dev/ttyUSB0
to read all port states.
Application notes
Home automation system controlling a heat pump for climate / hot water
Heat pumps may have a standby power consumption of 5W or more: they stay On for long time, but also stay Off for very long time, so it makes sense to enable heat pump power supply only when needed.
The following diagram shows how to manage the heat pump by DomBus21 module, to get the following features on your home automation system:
- use a cheap energy meter with pulsed output to measure the power and energy used by the heat pump
- supply the heat pump only when needed (for climate, hot water, or anti-freeze protection)
- enabling the 3-way valve only when needed
- having your home automation system to send the climate On/Off signal to the heat pump (thermostat input)
- in case that home automation system is down, permits to manually toggle On/Off the 3 relays by pushbuttons (this feature is available only with DomBus firmware, using the DCMD commands).
The energy consumption of the DomBus21 is about 15mW even with the relays On: considering the heat pump On for 66% of the time, the energy saved is about 25kWh/year compared to a system where the heat pump is always powered and using inefficient home automation relay modules!
Also, having the heat pump disconnected may prevent damages by 230V voltage fluctuations or electrostatic discharges.
Be careful with wirings: DomBus21 handles loads with max 15A (3.5kW), which could overheat or burn out if connections are not made correctly. High power connections must be monitored with an IR thermal camera to ensure they do not overheat when delivering high power.