DIN-rail high reliability and low power home automation module with relays output, low voltage inputs and one 100-250Vac input.Works with home automation systems like Domoticz, Home Assistant, Node-RED, OpenHAB and more...
Can be used to manage alarm sensors, pushbuttons, lights and other loads, and monitor 230V presence (detecting power outage).
It can be connected to the home automation controller by a RS485 serial bus (4 wires, 2 for 12/24V power supply, and 2 for data at 115200bps).
As other DomBus devices, DomBus38 is designed to consume low power, be reliable, fully configurable and easy to use.
Features
- 4x 10A relays with both normally-open and normally-closed outputs on terminal block, configured in low-power mode (about 100mW/each, when On)
- 2x 10A relays with normally-open outputs, configured in low-power mode (about 100mW/each, when On)
- 1x AC optoisolated input to detect (and notify) power outages, implementing zero-crossing detection to permit relay switching minimizing the in-rush current (for capacitive loads, such as electronic boards) and overvoltage (for inductive current, like motors and coils).
- 10x low voltage inputs with 10k pullup resistor that can be enabled by PCB jumper: can be connected to pushbuttons, switches, twinbuttons (up/down button connected to a single input), alarm sensors (magnetic contact, PIR, ... ), balanced double or triple biased alarm sensors (with 2 wires they provides 4 or 5 states: Closed, Open, Masked zone, Tamper, Shortcircuit), counters and meters with pulsed output, NTC temperature sensors, ...
- 2x low voltage inputs with internal pullup resistor that can be excluded in case of analog inputs: can be connected to pushbuttons, switches, alarm sensors (magnetic contact, PIR, ...), counter and meters with pulsed output, analog voltages in the range 0÷3.3V.
- Internal RS485 bus terminating resistor (150 ohm) that can be enabled by a PCB jumper (with a solder iron)
- RS485 industrial bus, that works with up to 500m of cable (using standard alarm cable: 2x0.50+2x0.22mm² + shield)
- DIN rail low-profile enclosure, 115x90x40mm, 220g
- Plugin terminal blocks (disconnectable) for easy wiring
- Available with 2 firmwares of your choice:
- DomBus firmware, working with Domoticz, implementing the DomBus proprietary protocol
- Modbus firmware, working with NodeRED, Home Assistant, OpenHAB and many other controllers supporting the standard Modbus protocol.
- Very low power usage: 15mW with relays OFF.
Warnings
- Do not mix high and low voltage devices on relay output blocks: relays may be used all connected to 115 / 230Vac devices, or all connected to 30Vmax devices within the same block. For example if RL1 is connected to 230V, RL2÷RL4 can be connected only to 230V loads, and low voltage devices can be connected only to RL5÷RL6, or vice versa. Of course, it's possible to connect all RL1÷RL6 to high voltage OR low voltage loads.
- Use a 4 wires shielded cable for the bus, using two lines to feed power supply (12 or 24Vdc) protected by a fuse.
- To reduce noise and reflections on the bus, enable the termination resistor (shorting Rbus PCB jumper behind the LED) on the two furthest ends of the bus.
DomBus38 ports capabilities (for the DomBus version)
Default address: 0xff38
Port# | Name | Capabilities | Default configuration | Description |
1 | RL1 | OUT_RELAY_LP,OUT_DIGITAL,OUT_BLIND,OUT_FLASH | OUT_RELAY_LP | 10A SPDT relay (NO+NC contacts) with 250Vac or 30Vdc output capability. No varistor. Inrush current and overvoltage protection by connecting the INAC input (zero-crossing detector) |
2 | RL2 | OUT_RELAY_LP,OUT_DIGITAL,OUT_BLIND,OUT_FLASH | OUT_RELAY_LP | 10A SPDT relay (NO+NC contacts) with 250Vac or 30Vdc output capability. No varistor. Inrush current and overvoltage protection by connecting the INAC input (zero-crossing detector) |
3 | RL3 | OUT_RELAY_LP,OUT_DIGITAL,OUT_BLIND,OUT_FLASH | OUT_RELAY_LP | 10A SPDT relay (NO+NC contacts) with 250Vac or 30Vdc output capability. No varistor. Inrush current and overvoltage protection by connecting the INAC input (zero-crossing detector) |
4 | RL4 | OUT_RELAY_LP,OUT_DIGITAL,OUT_BLIND,OUT_FLASH | OUT_RELAY_LP | 10A SPDT relay (NO+NC contacts) with 250Vac or 30Vdc output capability. No varistor. Inrush current and overvoltage protection by connecting the INAC input (zero-crossing detector) |
5 | RL5 | OUT_RELAY_LP,OUT_DIGITAL,OUT_BLIND,OUT_FLASH | OUT_RELAY_LP | 10A SPST relay with 250Vac or 30Vdc output capability. No varistor. Inrush current and overvoltage protection by connecting the INAC input (zero-crossing detector) |
6 | RL6 | OUT_RELAY_LP,OUT_DIGITAL,OUT_BLIND,OUT_FLASH | OUT_RELAY_LP | 10A SPST relay with 250Vac or 30Vdc output capability. No varistor. Inrush current and overvoltage protection by connecting the INAC input (zero-crossing detector) |
7 | INAC | IN_AC, IN_COUNTER | IN_AC | Optoisolated input, that can be connected to a circuit breaker (to notify power outages, expecially useful for fridges and heat pumps), PIRs with 230V output (to monitor presence), light and appliances (to monitor when light or devices are ON). |
8 | IN1 | IN_DIGITAL, IN_DIGITAL_PULLDOWN, IN_ANALOG, IN_TWINBUTTON, IN_COUNTER,SENSOR_ALARM | IN_DIGITAL |
Analog or digital input, with optional 10k pullup (pcb jumper) and optional internal pulldown (activated when configured as IN_DIGITAL_PULLDOWN). |
9 | IN2 | IN_DIGITAL, IN_DIGITAL_PULLDOWN, IN_ANALOG, IN_TWINBUTTON, IN_COUNTER,SENSOR_ALARM | IN_DIGITAL |
Analog or digital input, with optional 10k pullup (pcb jumper) and optional internal pulldown (activated when configured as IN_DIGITAL_PULLDOWN). |
10 | IN3 | IN_DIGITAL, IN_DIGITAL_PULLDOWN, IN_ANALOG, IN_TWINBUTTON, IN_COUNTER,SENSOR_ALARM | IN_DIGITAL |
Analog or digital input, with optional 10k pullup (pcb jumper) and optional internal pulldown (activated when configured as IN_DIGITAL_PULLDOWN). |
11 | IN4 | IN_DIGITAL, IN_DIGITAL_PULLDOWN, IN_ANALOG, IN_TWINBUTTON, IN_COUNTER,SENSOR_ALARM | IN_DIGITAL |
Analog or digital input, with optional 10k pullup (pcb jumper) and optional internal pulldown (activated when configured as IN_DIGITAL_PULLDOWN). |
12 | IN5 | IN_DIGITAL, IN_DIGITAL_PULLDOWN, IN_ANALOG, IN_TWINBUTTON, IN_COUNTER,SENSOR_ALARM | IN_DIGITAL |
Analog or digital input, with optional 10k pullup (pcb jumper) and optional internal pulldown (activated when configured as IN_DIGITAL_PULLDOWN). |
13 | IN6 | IN_DIGITAL, IN_DIGITAL_PULLDOWN, IN_ANALOG, IN_TWINBUTTON, IN_COUNTER,SENSOR_ALARM | IN_DIGITAL |
Analog or digital input, with optional 10k pullup (pcb jumper) and optional internal pulldown (activated when configured as IN_DIGITAL_PULLDOWN). |
14 | IN7 | IN_DIGITAL, IN_DIGITAL_PULLDOWN, IN_ANALOG, IN_TWINBUTTON, IN_COUNTER,SENSOR_ALARM | IN_DIGITAL |
Analog or digital input, with optional 10k pullup (pcb jumper) and optional internal pulldown (activated when configured as IN_DIGITAL_PULLDOWN). |
15 | IN8 | IN_DIGITAL, IN_DIGITAL_PULLDOWN, IN_ANALOG, IN_TWINBUTTON, IN_COUNTER,SENSOR_ALARM | IN_DIGITAL |
Analog or digital input, with optional 10k pullup (pcb jumper) and optional internal pulldown (activated when configured as IN_DIGITAL_PULLDOWN). |
16 | IN9 | IN_DIGITAL, IN_DIGITAL_PULLDOWN, IN_ANALOG, IN_TWINBUTTON, IN_COUNTER,SENSOR_ALARM | IN_DIGITAL |
Analog or digital input, with optional 10k pullup (pcb jumper) and optional internal pulldown (activated when configured as IN_DIGITAL_PULLDOWN). |
17 | IN10 | IN_DIGITAL, IN_DIGITAL_PULLDOWN, IN_ANALOG, IN_TWINBUTTON, IN_COUNTER,SENSOR_ALARM | IN_DIGITAL |
Analog or digital input, with optional 10k pullup (pcb jumper) and optional internal pulldown (activated when configured as IN_DIGITAL_PULLDOWN). |
18 | IN11 | IN_DIGITAL, IN_DIGITAL_PULLDOWN, IN_ANALOG, IN_COUNTER | IN_DIGITAL |
Analog or digital input, with optional 10k pullup (pcb jumper) and optional internal pulldown (activated when configured as IN_DIGITAL_PULLDOWN). |
19 | IN12 | IN_DIGITAL, IN_DIGITAL_PULLDOWN, IN_ANALOG, IN_COUNTER | IN_DIGITAL |
Analog or digital input, with optional 10k pullup (pcb jumper) and optional internal pulldown (activated when configured as IN_DIGITAL_PULLDOWN). |
DomBusTracker 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)=56, reg(8193)=0, reg(8194)=0, at power the following led flashes will be shown:
5 red flashes, pause, 6 red flashes (slave address= 0x38 = 56 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: 56 (0x38)
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) |
10A SPDT relay (NO+NC contacts) with 250Vac or 30Vdc output capability. No varistor. Inrush current and overvoltage protection by connecting the INAC input (zero-crossing detector) |
1 | RL2 |
0=OFF, 1=ON. Read only. |
10A SPDT relay (NO+NC contacts) with 250Vac or 30Vdc output capability. No varistor. Inrush current and overvoltage protection by connecting the INAC input (zero-crossing detector) |
2 | RL3 | 0=OFF, 1=ON. Read only. Tracker position may be changed by using the Pns and Pew control bars. |
10A SPDT relay (NO+NC contacts) with 250Vac or 30Vdc output capability. No varistor. Inrush current and overvoltage protection by connecting the INAC input (zero-crossing detector) |
3 | RL4 | 0=OFF, 1=ON. Read only. Tracker position may be changed by using the Pns and Pew control bars. |
10A SPDT relay (NO+NC contacts) with 250Vac or 30Vdc output capability. No varistor. Inrush current and overvoltage protection by connecting the INAC input (zero-crossing detector) |
4 | RL5 | 0=OFF, 1 or 65280=ON, 2-65279=ON for specified time. Logic can be inverted specifying the INVERTED option (on address 512+port) |
10A SPST relay with 250Vac or 30Vdc output capability. No varistor. Inrush current and overvoltage protection by connecting the INAC input (zero-crossing detector) |
5 | RL6 | 0=OFF, 1 or 65280=ON, 2-65279=ON for specified time. Logic can be inverted specifying the INVERTED option (on address 512+port) |
10A SPST relay with 250Vac or 30Vdc output capability. No varistor. Inrush current and overvoltage protection by connecting the INAC input (zero-crossing detector) |
6 | 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 useful for fridges and heat pumps), PIRs with 230V output (to monitor presence), light and appliances (to monitor when light or devices are ON). |
7 | IN1 | 0=OFF, 1=ON, 0-65535 if port is configured as analog, or 0-4 if configured as SENSOR_ALARM. 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). |
8 | IN2 | 0=OFF, 1=ON, 0-65535 if port is configured as analog, or 0-4 if configured as SENSOR_ALARM. 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). |
9 | IN3 | 0=OFF, 1=ON, 0-65535 if port is configured as analog, or 0-4 if configured as SENSOR_ALARM. 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). |
10 | IN4 | 0=OFF, 1=ON, 0-65535 if port is configured as analog, or 0-4 if configured as SENSOR_ALARM. 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). |
11 | IN5 | 0=OFF, >0 = 16-65520 if motor current is detected. Ins = value*0.00042 [A] in case that sensing resistor is 0.12Ohm |
Analog or digital input, with optional 10k pullup (pcb jumper) and optional internal pulldown (activated when configured as IN_DIGITAL_PULLDOWN). |
12 | IN6 | 0=OFF, >0 = 16-65520 if motor current is detected. Ins = value*0.00042 [A] in case that sensing resistor is 0.12Ohm |
Analog or digital input, with optional 10k pullup (pcb jumper) and optional internal pulldown (activated when configured as IN_DIGITAL_PULLDOWN). |
13 | IN7 | 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). |
14 | IN8 | 0=OFF (input externally pulled/shorted to GND), 1=ON (input externally disconnected, with internal pullup to 3.3V). Logic can be inverted with the INVERTED option (to be set on address 512+port) |
Analog or digital input, with optional 10k pullup (pcb jumper) and optional internal pulldown (activated when configured as IN_DIGITAL_PULLDOWN). |
15 | IN9 | 0=OFF, 1 or 65280=ON, 2-65279=ON for specified time. Logic can be inverted specifying the INVERTED option (on address 512+port) |
Analog or digital input, with optional 10k pullup (pcb jumper) and optional internal pulldown (activated when configured as IN_DIGITAL_PULLDOWN). |
16 | IN10 | 0=OFF, 1=ON, 0-65535 if port is configured as analog, or 0-4 if configured as SENSOR_ALARM. 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). |
17 | IN11 | 0=OFF, 1=ON, 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). |
18 | IN12 | 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). |
255 | All input ports | bitmask: 1=> RL1, 2=>RL2, 4=>RL3 ... 32768 => IN9 |
This address is used to check the state in one command, or set output state of relay outputs |
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 |
56 | 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.
Using input ports to read external DC voltages
Voltages applied to a DomBus module input must be in the range 0-3.3Vdc, so an external resistive partition should be applied to measure higher voltage.
For example, to monitor a 12V voltage, a resistive partition with 100k and 22k can be used: in this case max applied voltage = 3.3 / 22k * (100k + 22k) = 18.3V and the A constant used in the domotic controller to get the real voltage is calculated as 18.3/65535=0.00027924
Please note that analog voltage can be applied only to module ports without the 10k pullup resistor.
Take care to measure voltages only on devices that share the same ground (GND) of the DomBus network!
Using input ports to read temperatures
DomBus modules have the ability to read temperature by using NTC sensors with 10k resistance @25°C and B=3950 coefficient.
NTC should be connected to inputs that already have the internal 10k pullup resistor, otherwise an external 10k resistor must be applied. Connect NTC sensor between input and GND.
Setting IN_ANALOG,FUNCTION=3950 the module port is configured in analog mode, and DomBus driver will convert the read value to the temperature value in °C.
When using Modbus protocol, the analog value returned by the module should be converted, by software, using the following formula:
Ro=10000
To=25.0
beta=3950
#value=0..65535, value returned by DomBus module
if (value==65535): value=65534 #Avoid division by zero
r=value*Ro/(65535-value)
temp=math.log(r / Ro) / beta
temp+=1.0/(To + 273.15)
temp=round((1.0/temp)-273.15, 2)