Professional Documents
Culture Documents
How to choose
the right I2C
chips
Or the hidden software
problem of choosing
hardware modules
The I2C bus offers all the necessary Sensors or actuators might be on an
functions: extension cord, or all the chips might
be concentrated on one module. Or all
● a simple physical interface: the chips can be focused on one module.
SDA data and SCL
synchronization signals require The master controller and slave
only two wires to connect to the devices can be powered
bus; independently. Or all devices on the
● the addressing of devices on the bus can be powered from a common
bus with unique 7-bit addresses; source.
● identification of devices on the
bus by their address or by unique The I2C is supported by the vast
identifiers (if provided by the chip majority of microelectronics
manufacturer); manufacturers. All popular controllers,
● hot device plugging / unplugging IoT / Smart Home platforms, and
like Plug & Play; related development environments are
● the unit is powered by the bus or compatible with the bus.
by each module’s own power
supply; Most IoT devices support the I2C
● the support for different supply interface as basic. Moreover, the
voltages of devices on the bus support of the I2C bus is usually a
(provided that the signals are decisive factor in the selection of chips
matched to the voltage level); in our projects. But any system has not
● an advanced infrastructure of only advantages. There are also
amplifiers, repeaters, splitters shortcomings and hidden problems
and multiplexers to build complex that we reveal in the publications.
topologies offered by chip
manufacturers; Today we would like to talk about the
software problem of choosing the right
All that allows about a hundred devices hardware sensors with I2C bus
to be connected to the controller on a support. We will not go into the theory,
single interface at the same time. The but rather suggest a practical example
I/O port budget of the main controller is using our devices.
minimal when the I2C bus is used to
connect the sensors.
Fig. IoT-devices GGreg20_V3 Ionizing Radiation Sensor module with pulse counting output
We really like the I2C bus. We, STM32, which must perform the
moreover, already have an I2C necessary pulse calculations and give
interface splitter module, I2CHUB, calculated values of the power and
which would be well suited to a dose of ionizing radiation to the main
hypothetical GGreg20 with I2C controller at a low level via I2C
interface. So we can take a budget interface.
microcontroller – a companion like
© IoT-devices LLC - Kyiv - Ukraine
But let’s ask ourselves how many The companion controller
common and very popular IoT occupies a certain area on the
platforms and microcontrollers will module board.
have driver support for such an I2C The I2C bus takes up twice as
sensor? The answer will be many controller ports as the pulse
disappointing since it is not an output.
industrial sensor with a huge sales All this significantly increases
market. the unit cost of the product.
While the Pulse interface takes
Certainly, our company needs up only one GPIO controller with an
everyone to be able to connect our interrupt handler and is much easier
sensors. It is our customers who must to program.
choose the type of controller or And if we talk about maximum
platform. We need to provide versatility simplification, the GGreg20 module
for Arduino, ESP32 / ESP8266, can work without a controller at all.
Raspberry Pi, or for NodeMCU, The user can measure radiation
Node-RED and ESPHome in Home (in circumstances that require it)
Assistant, and many other IoT only with a clock to record the
development environments that we measurement time in minutes.
might not have even heard of.
We will next consider another example
GGreg20 is now supported by any of two similar devices. They both have
controller, development environment, an I2C interface, but different
and IoT platform, precisely because it application perspectives.
has a versatile pulse output. If we
equipped the GGreg20 with an I2C
interface, we would have a completely Example №2. I2CUI3,
different result. I2CUI4 and I2C
We first developed I2CUI3 – a useful
and reliable product. It is a universal
Note. What if you make two
module of user interfaces with the I2C
interfaces on the GGreg20 module at
interface, which provides input of user
once – pulse output and I2C?
instructions with the help of five
It would be very convenient,
but in this case we believe that these
navigation buttons and output of data
costs at the expense of customers to the RGB LED and the buzzer about
would be unjustified. the status or events of the IoT device.
Fig. IoT-devices I2CUI3_V1 User Interface module with I2C (PCA9538 8-bit)
See also
Tindie https://www.tindie.com/stores/iotdev/
Hackaday https://hackaday.io/iotdevicesdev
GitHub https://github.com/iotdevicesdev
Slideshare https://www.slideshare.net/IoTdevices
Reddit https://www.reddit.com/r/GGreg20_V3/
Twitter https://twitter.com/iotdevicescomua
Telegram https://t.me/s/iotdevices
Pinterest https://www.pinterest.com/iotdevicesua/
Facebook https://www.facebook.com/IoT-devices-114746816966582
Youtube https://www.youtube.com/channel/UCHpPOVVlbbdtYtvLUDt1NZw/v
ideos