Changing the I2C-Address and activating new data interrupt
Application note for products of the SLF3x-family

SummaryThis application note describes how to change the factory-set I2C-address of a SLF3x sensor. This helps if
several sensors are used on the same I2C bus. To change the address, a command (containing the new address
as argument) needs to be sent to the bus, right afterwards, the IRQn pin of the sensor has to be set to high state
for at least 100 us. After a confirmation the sensor can be called with the new address.
Furthermore, the command to change the I2C address also enables the new-data-interrupt functionality, whichindicates whether new measurement results are available.

www.sensirion.com

Version 1.1 – D1 – April 2024

1/5

1 Introduction
Sensirion flow sensors of the SLF3x-family have all the same I2C address, which is set during the factory-calibration. Inorder to read out several flow sensors connected to the same bus, individual I2C-addresses shall be assigned.
This application note describes the necessary procedure.

2 Remarks▪
▪
▪
▪

The I2C address will be reset to the default value specified in the data sheet upon a hard- or soft-reset. Hence,the procedure will have to be repeated to assign individual I2C addresses.
It takes roughly 2 ms to change the I2C address for one device.
An arbitrary number of devices can be configured with this procedure and an arbitrary I2C address can be usedfor each device.
The procedure has to be executed upon a hard- or soft-reset of the sample, other commands must not beissued prior to the I2C address configuration command.

3 Procedure to change I2C addressPrerequisites▪
▪
▪

All sensors are connected to the same I2C bus
The IRQn pin can be directly controlled by a micro controller. The connecting pin needs to be configurable either
as an input or as an output.
A soft or hard reset is done prior to the address-changing procedure (see datasheet for more details)

Pad

Description

1IRQn

2

SDA (data)

Comments
Connect this pin separately for each device tothe micro controller
Serial data, bidirectional

3

VDD

Supply voltage

4GND

Ground5

SCL (clock)

Serial clock, bidirectional

6n.c.

Nonfunctional, connect to GND or leave floating

1 … 6

Explanation of the procedure
Using the default I2C address in the data sheet a specific command to change the I2C address has to be issued. Allsensors will respond to this command and internally a monitoring process is started, which will check the state of pin 1
during the subsequent 1.5 ms. Please note, that the pin 1 shall be generally referred to as the new data interrupt (IRQn),
which will become more comprehensible below. Hence, this pad is configurable as an output of the flow-sensor. However,upon issuing the command to change the I2C address the pad will be set to input mode, and the master is able toconfigure the pin on his side as output. The customer has then the possibility to set the pin 1 to high (for the course of atleast 100 us during the 1.5 ms time window) in order to apply the requested I2C address for the specific device. If asensor detects a high state of the IRQn pad during the 1.5 ms, the I2C address will be applied as requested in thecommand argument. If no high phase occurs during the time window, nothing happens and the I2C address will not bechanged. After the 1.5 ms have elapsed, the sensor will configure the pad to output mode, therefore, by this time themaster needs to have reconfigured the pad to input mode. It may be advisable to use a pull-down resistance on the IRQn
pin in order to prevent accidental high states caused by disturbances while the pin is configured to input mode by theslave.
The sensor where the I2C address has been changed will confirm the successful execution of the procedure by setting
the IRQn pin to high for 200 us. Upon this confirmation the slave will respond on the requested I2C address.
www.sensirion.com

Version 1.1 – D1 – April 2024

2/5

IRQn Functionality
After issuing the command (incl. command argument) to change the I2C address, the new data interrupt functionality will
be enabled on pin 1 (therefore referred to as IRQn pin). The IRQn pin indicates whether new measurement results areavailable. The signal is active low, meaning that when the signal is high there is no new measurement data available.
The IRQn will automatically clear to high when a flow measurement value is read out.
The IRQn pin will be set to low after confirming the I2C address change procedure with a 200 us long high pulse andremain low, until a measurement command is sent.
When the IRQn signal is not used, the pin should stay unconnected and must not be tied to GND or VDD.
Command Description
The address is changed by sending a dedicated command, followed by an argument with the new I2C addresscomprising an 8 bit CRC for the argument.

Arg[7:0]

CRCArg[7:0]

ACK

Arg[15:8]

ACKCmd[7:0]

ACK

Cmd[15:8]

ACK

I2CAdr[6:0] W

ACKS

ACK

I2C master writes 16 bit command + 16 bit argument + CRC for argument

Dark areas with white text indicate that the sensor controls the SDA (Data) line.

The following table describes the content of the write sequence depicted above.
Name
Description
CommandTo change I2C address
Command code: 0x3661

Argument

16-bit argument for new I2C address:0x0000 to 0x007F: range for new I2C address (restrictions according to I2Cspecification may apply)
For example 0x000F for address 15CRC for Argument

8 bit CRC. See datasheet for more details

During the 1.5 ms that the sensor is subsequently checking the state of the pin 1, other measurement commands mustnot be sent to the sensor (the sensor does not acknowledge [NACK] such commands). This waiting time of 1.5 msmust also be observed even if the I2C address shall not be changed (i.e. pin 1 will not be pulled to high), but only thenew data interrupt shall be enabled.

www.sensirion.com

Version 1.1 – D1 – April 2024

3/5

Typical Implementation DiagramIn the following scope plot, a typical implementation diagram of the address-change sequence and the new datainterrupt functionality is shown.

Description of sequence steps
1a,1b The command to change the I2C address may be issued multiple times according to the number of SLF3x
on the bus. The desired I2C address is transmitted in the command argument. After receiving the command,the IRQn pin is set to input, and the master (microcontroller) can set the pad-mode to output.
2.

Applying a high state to the IRQn pin of the SLF3x to change I2C address for at least 100 us is the selection
criterion on which SF3x to change the I2C address.

3.

After 1.5 ms the slave (SLF3x) will change the pin-mode to output, therefore, by this time the pad-mode of
the master (microcontroller) needs to be reset to input. The sensor where the I2C address has been changed
confirms the successful execution of the procedure by setting the IRQn pin high for 200 us. Upon thisconfirmation the slave will respond on the requested I2C address. The IRQn pin has been enabled (in fact
already with the first command to change the I2C address) and remains low, until a measurement commandis sent.

4.

A start measurement command is issued, which configures the IRQn to its default active low behavior.

5.

No flow measurement values can be read during the first 12 ms (see data sheet), therefore the IRQn pin
state is high.

6.

After about 12 ms the IRQn pin adopts its active low alert state to indicate that flow data can be read fromthe sensor. The master is synchronized to the IRQn pin and reads the data as soon as the measurement
data is available indicated by the IRQn.

www.sensirion.com

Version 1.1 – D1 – April 2024

4/5

4 Headquarters and Subsidiaries
Sensirion AG
Laubisrütistr. 50
8712 Stäfa
Switzerland

Sensirion Inc., USA
phone: +1 312 690 5858
info-us@sensirion.com
www.sensirion.com

Sensirion Korea Co. Ltd.
phone: +82 31 337 7700~3
info-kr@sensirion.com
www.sensirion.com/kr

phone: +41 44 306 40 00
fax:+41 44 306 40 30
info@sensirion.com
www.sensirion.com

Sensirion Japan Co. Ltd.
phone: +81 3 3444 4940
info-jp@sensirion.com
www.sensirion.com/jp

Sensirion China Co. Ltd.
phone: +86 755 8252 1501
info-cn@sensirion.com
www.sensirion.com/cn

Sensirion Taiwan Co. Ltd
phone: +886 3 5506701
info@sensirion.com
www.sensirion.com

To find your local representative, please visit www.sensirion.com/distributors

www.sensirion.com

Version 1.1 – D1 – April 2024

5/5

Revision History of the Application Note “I2C-Address-Change” – for INTERNAL USE onlyRevision
0.1
0.2DateNov 2021
24.11.

www.sensirion.com

Changes
Chapter Description
allFirst preliminary version
allChanges of Harry Figi implemented. Discussed together
with Stefan Arnold

Version 1.1 – D1 – April 2024

Author
PARE
PARE, HFI

6/5