<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>I2C &#8211; IoT-devices, LLC &#8211; Electronics manufacturer for IoT</title>
	<atom:link href="https://iot-devices.com.ua/en/tag/i2c-en/feed/" rel="self" type="application/rss+xml" />
	<link>https://iot-devices.com.ua/en/</link>
	<description>From modules to complex devices</description>
	<lastBuildDate>Thu, 25 Dec 2025 16:48:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://iot-devices.com.ua/wp-content/uploads/2020/05/iot-devices_logo_inversed_kromka_512x512_82ce62_white-100x100.jpg</url>
	<title>I2C &#8211; IoT-devices, LLC &#8211; Electronics manufacturer for IoT</title>
	<link>https://iot-devices.com.ua/en/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Application of I2CHUB_V1 &#8211; I2C bus interface splitter</title>
		<link>https://iot-devices.com.ua/en/zastosuvannya-podilyuvacha-interfejsiv-na-shyni-i2c/</link>
		
		<dc:creator><![CDATA[iot-guru]]></dc:creator>
		<pubDate>Mon, 05 Sep 2022 14:24:29 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[application-note]]></category>
		<category><![CDATA[I2C]]></category>
		<category><![CDATA[I2CHUB_V1]]></category>
		<category><![CDATA[technical-note]]></category>
		<guid isPermaLink="false">https://iot-devices.com.ua/?p=2335</guid>

					<description><![CDATA[Description of the problem We have a main system controller and several devices with an I2C interface that need to be connected to it. The figure shows an approximate classic set of modules that may need to be connected to the main controller (MCU). Fig. Various I2C Modules Example Most microcontrollers (MCUs) are miniature devices [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Description of the problem</h2>

<p class="wp-block-paragraph"><br/>We have a main system controller and several devices with an I2C interface that need to be connected to it. The figure shows an approximate classic set of modules that may need to be connected to the main controller (MCU).</p>

<figure class="wp-block-image size-full"><a href="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_7_i2c-modules-example_branded.jpg"><img fetchpriority="high" decoding="async" width="960" height="540" src="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_7_i2c-modules-example_branded.jpg" alt="" class="wp-image-2315" srcset="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_7_i2c-modules-example_branded.jpg 960w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_7_i2c-modules-example_branded-300x169.jpg 300w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_7_i2c-modules-example_branded-768x432.jpg 768w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_7_i2c-modules-example_branded-800x450.jpg 800w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_7_i2c-modules-example_branded-454x255.jpg 454w" sizes="(max-width: 960px) 100vw, 960px" /></a></figure>

<p class="wp-block-paragraph">Fig. Various I2C Modules Example</p>

<p class="wp-block-paragraph">Most microcontrollers (MCUs) are miniature devices and have a very limited budget for free I / O ports. Typically, on Arduino / ESP8266 / ESP32 / STM32 controllers, only one interface can be reserved for the I2C bus (even if there are two) &#8211; two GPIO ports for SDA and SCL signal channels.</p>

<p class="wp-block-paragraph">There are at least two reasons for this.</p>

<p class="wp-block-paragraph"><strong>First</strong> , GPIO ports are a valuable resource on the main controller. They are involved in no less important external interfaces &#8211; UART, SPI, Deep Sleep Wakeup, sub-button inputs, actuator outputs (s), etc.</p>

<p class="wp-block-paragraph"><strong>Secondly</strong> , the design of the main controller module board must take into account the size limitations: the more connectors installed on this board, the greater the linear dimensions it will have.</p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>Note</strong> . We also know that the I2C serial bus can be implemented not only in hardware, with fixed I / O ports on the MCU, but also in software, when the bus signal lines can be assigned to any MCU’s GPIO ports. Moreover, the software implementation of the bus allows to declare multiple I2C software buses with different Bus_ID.</p></blockquote>

<figure class="wp-block-image size-full"><a href="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_2_hw_sw_mcu-i2c-bus_branded.jpg"><img decoding="async" width="960" height="540" src="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_2_hw_sw_mcu-i2c-bus_branded.jpg" alt="" class="wp-image-2319" srcset="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_2_hw_sw_mcu-i2c-bus_branded.jpg 960w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_2_hw_sw_mcu-i2c-bus_branded-300x169.jpg 300w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_2_hw_sw_mcu-i2c-bus_branded-768x432.jpg 768w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_2_hw_sw_mcu-i2c-bus_branded-800x450.jpg 800w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_2_hw_sw_mcu-i2c-bus_branded-454x255.jpg 454w" sizes="(max-width: 960px) 100vw, 960px" /></a></figure>

<p class="wp-block-paragraph">Fig. MCU I2C bus hardware and software implementations</p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>But the manifestation of several I2C software buses simultaneously within one MCU reduces the number of free pins for other tasks. Because of this, such opportunities are rarely used. Exceptions to this may be situations when such a technique avoids problems that cannot be solved in any other way. For example, addressing collisions (two different devices with the same 7-bit address) and similar problems. But even for such problems, it is more efficient to use an I2C hardware multiplexer than multiple I2C software buses.</p></blockquote>

<h2 class="wp-block-heading"><br/>Problem solution</h2>

<p class="wp-block-paragraph">To solve the problem of one I2C port on the MCU, the hardware I2C bus interface splitter is most often used. It is a passive hub that splits one existing I2C interface into the required number of the same interfaces.</p>

<p class="wp-block-paragraph">There are many similar devices on the market, but we will give an example of a device of our own production &#8211; <a href="https://iot-devices.com.ua/en/product/i2chub-v1-module-i2c-bus-interfaces-splitter/">I2CHUB_V1</a> , which has 6 I2C ports: 3 x 4 pin JST HX2.54, 3 x 4 pin Dupont and two additional dedicated “bidirectional” 2 pin power ports.</p>

<figure class="wp-block-image size-full"><a href="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_1_i2chub_branded.jpg"><img decoding="async" width="960" height="540" src="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_1_i2chub_branded.jpg" alt="" class="wp-image-2317" srcset="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_1_i2chub_branded.jpg 960w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_1_i2chub_branded-300x169.jpg 300w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_1_i2chub_branded-768x432.jpg 768w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_1_i2chub_branded-800x450.jpg 800w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_1_i2chub_branded-454x255.jpg 454w" sizes="(max-width: 960px) 100vw, 960px" /></a></figure>

<p class="wp-block-paragraph">Fig. I2C bus interface splitter &#8211; I2CHUB_V1 as an example</p>

<p class="wp-block-paragraph">Another way to solve the problem in the case of a bus-type serial interface, such as I2C, may be to use predefined end-to-end interfaces in individual sensor modules or actuators that connect to the bus.</p>

<figure class="wp-block-image size-full"><a href="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_3_two-connector_i2c_modules_branded.jpg"><img loading="lazy" decoding="async" width="960" height="540" src="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_3_two-connector_i2c_modules_branded.jpg" alt="" class="wp-image-2322" srcset="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_3_two-connector_i2c_modules_branded.jpg 960w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_3_two-connector_i2c_modules_branded-300x169.jpg 300w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_3_two-connector_i2c_modules_branded-768x432.jpg 768w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_3_two-connector_i2c_modules_branded-800x450.jpg 800w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_3_two-connector_i2c_modules_branded-454x255.jpg 454w" sizes="(max-width: 960px) 100vw, 960px" /></a></figure>

<p class="wp-block-paragraph">Fig. Not widespread In-Out (two-connector) I2C sensor modules connection example</p>

<p class="wp-block-paragraph">The &#8220;input&#8221; interface of each such module is connected to the MCU or the previous sensor module on the bus, and the &#8220;output&#8221; interface allows you to cascade the next module. Some manufacturers provide two I2C bus interfaces for this purpose. But, unfortunately, most modules are not equipped with such capabilities. Therefore, we consider I2C HUB as a more common and universal approach. Below you will find the basic schemes for modules connection with use of the hub.</p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>Note</strong> . As the number of connections increases, it exponentially increases:<br/>– number of failure points (PoF, Point of Failure);<br/>– the risk of human error when making interface signal connections.</p></blockquote>

<p class="wp-block-paragraph">For the protection of equipment from failure and installation errors, in order to increase the overall reliability of the system, we recommend:</p>

<ul class="wp-block-list"><li>to use connectors with a safety key as often as possible;</li><li>to use modules with mutually compatible electrical interfaces and physical connectors.</li></ul>

<p class="wp-block-paragraph">While we recommend using key connectors whenever possible, we also try to take into account the realities of the electronic components market and meet the needs of consumers. That&#8217;s why we&#8217;ve given the I2CHUB_V1 splitter the ability to act as a type connector converter from JST to Dupont and vice versa.</p>

<p class="wp-block-paragraph"><br/>We consider this a very useful feature, because thanks to the ability of freely reversing JST &#8211; Dupont interface cables from one side to the other, the user can connect almost any existing I2C interface modules to the hub. Also, the user is free to use their own Dupont – Dupont pin cables.<br/>For the ” <em>Order with cables</em> ” option in the module I2CHUB_V1 connectors are always soldered in the same way: half of them are 2.54 mm JST connectors (with key), the other half are Dupont pin connectors. This is done to ensure the above-mentioned flexibility of interconnection of various I2C modules.</p>

<h2 class="wp-block-heading"><br/>Schemes of modular connection to the interface splitter</h2>

<h3 class="wp-block-heading">Star</h3>

<p class="wp-block-paragraph"><br/>The most common scheme is when all modules are connected to the divider by I2C interfaces. Let&#8217;s call her &#8220;Star&#8221;.</p>

<figure class="wp-block-image size-full"><a href="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_4_hub_star_connection_branded.jpg"><img loading="lazy" decoding="async" width="960" height="540" src="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_4_hub_star_connection_branded.jpg" alt="" class="wp-image-2324" srcset="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_4_hub_star_connection_branded.jpg 960w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_4_hub_star_connection_branded-300x169.jpg 300w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_4_hub_star_connection_branded-768x432.jpg 768w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_4_hub_star_connection_branded-800x450.jpg 800w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_4_hub_star_connection_branded-454x255.jpg 454w" sizes="(max-width: 960px) 100vw, 960px" /></a></figure>

<p class="wp-block-paragraph">Fig. “The Star” module connection example</p>

<h3 class="wp-block-heading">Cascading</h3>

<p class="wp-block-paragraph"><br/>The next topology is a cascade of two or more &#8220;Stars&#8221;. Let&#8217;s call it &#8220;Cascading&#8221;.</p>

<figure class="wp-block-image size-full"><a href="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_5_hub_cascading_branded.jpg"><img loading="lazy" decoding="async" width="960" height="540" src="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_5_hub_cascading_branded.jpg" alt="" class="wp-image-2326" srcset="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_5_hub_cascading_branded.jpg 960w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_5_hub_cascading_branded-300x169.jpg 300w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_5_hub_cascading_branded-768x432.jpg 768w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_5_hub_cascading_branded-800x450.jpg 800w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_5_hub_cascading_branded-454x255.jpg 454w" sizes="(max-width: 960px) 100vw, 960px" /></a></figure>

<p class="wp-block-paragraph">Fig. “Cascading” module connection example</p>

<p class="wp-block-paragraph">Because one of the interface splitter ports is always used as an &#8220;input&#8221;, there may be a lack of free splitter ports in some situations. In this case, the necessary number of splitters is cascaded to provide the desired number of interface ports on the I2C bus.</p>

<p class="wp-block-paragraph">For example, IoT-devices I2CHUB_V1 has 6 I2C ports. If it is planned to connect more than 5 slave devices to MCU in the project, it is possible to apply cascading of two splitters and distribute the corresponding slave devices between their interfaces.</p>

<h3 class="wp-block-heading"><br/>Long line</h3>

<p class="wp-block-paragraph"><br/>The last possible implementation scheme to be included in this publication is a topology with a long data line and two remote independent sources of power. Let&#8217;s call it &#8220;Long Line&#8221;.</p>

<figure class="wp-block-image size-full"><a href="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_6_hub_long-line_remote-power_branded.jpg"><img loading="lazy" decoding="async" width="960" height="540" src="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_6_hub_long-line_remote-power_branded.jpg" alt="" class="wp-image-2328" srcset="https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_6_hub_long-line_remote-power_branded.jpg 960w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_6_hub_long-line_remote-power_branded-300x169.jpg 300w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_6_hub_long-line_remote-power_branded-768x432.jpg 768w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_6_hub_long-line_remote-power_branded-800x450.jpg 800w, https://iot-devices.com.ua/wp-content/uploads/2022/09/i2chub-modules-connection-schemas_6_hub_long-line_remote-power_branded-454x255.jpg 454w" sizes="(max-width: 960px) 100vw, 960px" /></a></figure>

<p class="wp-block-paragraph">Fig. “Long line” connection with remote power source example</p>

<p class="wp-block-paragraph">In this scheme, only three signal lines are used, while the power for the devices comes from a local, independent source on each side. This arrangement allows a relatively long data line to be organized on the I2C serial bus interface without the use of special bus repeaters / amplifiers.</p>

<h2 class="wp-block-heading">Compatibility of splitters with other systems</h2>

<p class="wp-block-paragraph"><br/>If you use modules with different supply voltages in one project, you should pay special attention to the signal matching of such components. But if you choose to apply a passive splitter that has no conversion or voltage leveling elements just take into consideration that the voltage that you apply to the splitter connectors will reach all the modules connected to the splitter via the respective I2C bus signaling lines.</p>

<p class="wp-block-paragraph">However, since the classical I2C splitter (such as I2CHUB_V1) is a passive device and does not change the voltage level, it is automatically compatible with any controller you choose to connect it to: Arduino, STM32, ESP8266, ESP32, Raspberry Pi, etc.</p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>Warning!</strong> Only you decide which logical levels the components of the project should work with: 1.8V, 3.3V or 5V.</p></blockquote>

<h2 class="wp-block-heading"><br/>Detailed I2C bus specifications</h2>

<p class="wp-block-paragraph"><br/>To view details of all I2C bus features, we recommend reading the official guidelines and specs here: https://www.nxp.com/docs/en/user-guide/UM10204.pdf<br/>As well as other resources on the Internet.</p>

<p class="wp-block-paragraph">That&#8217;s all we planned to tell in this publication. We have considered the features and connectivity of the slave modules to the I2C bus interface of the main controller. We have also shown the main application patterns of the splitter, such as Star, Cascading, Long Line, with the possibility of remote independent powering of individual bus chunks, thanks to the special power &#8220;input/output&#8221; ports in the splitter.</p>

<p class="wp-block-paragraph">Thank you for your attention. Ask questions on our social networks.<br/>Good luck!</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Why we didn&#8217;t add the I2C interface to the GGreg20_V3 module</title>
		<link>https://iot-devices.com.ua/en/why-we-didnt-add-the-i2c-interface-to-the-ggreg20_v3-module/</link>
		
		<dc:creator><![CDATA[iot-guru]]></dc:creator>
		<pubDate>Sat, 28 May 2022 19:24:07 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[ESP-IDF]]></category>
		<category><![CDATA[ESPHome]]></category>
		<category><![CDATA[Expressive]]></category>
		<category><![CDATA[Geiger]]></category>
		<category><![CDATA[Geiger-Counter-Device]]></category>
		<category><![CDATA[GGreg20_V3]]></category>
		<category><![CDATA[GPIO]]></category>
		<category><![CDATA[Home Assistant]]></category>
		<category><![CDATA[I2C]]></category>
		<category><![CDATA[ionizing radiation]]></category>
		<category><![CDATA[IoT devices]]></category>
		<category><![CDATA[ISR]]></category>
		<category><![CDATA[LUA]]></category>
		<category><![CDATA[MicroPython]]></category>
		<category><![CDATA[NodeMCU]]></category>
		<category><![CDATA[Pulse Counter]]></category>
		<category><![CDATA[SBM20]]></category>
		<category><![CDATA[STM32]]></category>
		<category><![CDATA[Tasmota]]></category>
		<guid isPermaLink="false">https://iot-devices.com.ua/why-we-didnt-add-the-i2c-interface-to-the-ggreg20_v3-module-uk/</guid>

					<description><![CDATA[Indeed, why not add such a convenient interface to the module? Here is our next article where we discuss the advantages and disadvantages of equipping the GGreg20_V3 ionizing radiation detector module with an I2C interface. Note that we really like the I2C serial bus for its simplicity, functionality, and reliability. You can check out our [&#8230;]]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2022/05/6-ggreg20_v3_iot-deviceslogo_i2c_publpic_eng-1024x683.png"><img loading="lazy" decoding="async" width="1024" height="683" src="https://iot-devices.com.ua/wp-content/uploads/2022/05/6-ggreg20_v3_iot-deviceslogo_i2c_publpic_eng-1024x683.png" alt="GGreg20_V3, I2C" class="wp-image-2008" srcset="https://iot-devices.com.ua/wp-content/uploads/2022/05/6-ggreg20_v3_iot-deviceslogo_i2c_publpic_eng-1024x683.png 1024w, https://iot-devices.com.ua/wp-content/uploads/2022/05/6-ggreg20_v3_iot-deviceslogo_i2c_publpic_eng-300x200.png 300w, https://iot-devices.com.ua/wp-content/uploads/2022/05/6-ggreg20_v3_iot-deviceslogo_i2c_publpic_eng-768x512.png 768w, https://iot-devices.com.ua/wp-content/uploads/2022/05/6-ggreg20_v3_iot-deviceslogo_i2c_publpic_eng-454x303.png 454w, https://iot-devices.com.ua/wp-content/uploads/2022/05/6-ggreg20_v3_iot-deviceslogo_i2c_publpic_eng.png 1500w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure></div>



<p class="wp-block-paragraph">Indeed, why not add such a convenient interface to the module? Here is our next article where we discuss the advantages and disadvantages of equipping the GGreg20_V3 ionizing radiation detector module with an I2C interface. </p>



<p class="wp-block-paragraph">Note that we really like the I2C serial bus for its simplicity, functionality, and reliability. You can check out our other publications where we look at this great bus: <br><a href="https://iot-devices.com.ua/en/how-to-choose-the-right-i2c-chips-en/">Як правильно вибрати I2C чіпи. Або про приховану програмну проблему вибору<br>апаратних модулів</a>  /  <a href="https://iot-devices.com.ua/en/how-to-choose-the-right-i2c-chips-en/">How to choose the right I2C chips. Or the hidden software problem of<br>choosing hardware modules</a></p>



<p class="wp-block-paragraph"><a href="https://iot-devices.com.ua/?p=1130">Application of I2C bus interface splitter</a> </p>



<p class="wp-block-paragraph">However, our goal in developing GGreg20_V3 was, and still is, to ensure that our product is as compatible as possible with various systems.</p>



<p class="wp-block-paragraph">Take a look at this:</p>



<p class="wp-block-paragraph"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-vivid-green-cyan-color">(1)</mark></strong> If any module or chip has an I2C (or SPI, UART) communication interface, this automatically requires a low-level driver-connector to be written for that device.</p>



<p class="wp-block-paragraph"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-vivid-green-cyan-color">(2)</mark></strong> Also, such a device cannot be integrated with other components that do not support a specific communication or control interface such as I2C. There are many projects that do not have I2C, or there are not enough free GPIOs for the I2C bus.</p>



<p class="wp-block-paragraph"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-vivid-green-cyan-color">(3)</mark></strong> The radiation measurement module, under certain conditions, should be capable of being used in the field, without connection to the main controller. The user should be able to use such a device regardless of the conditions in which he finds himself. Without programming or hardware rework.</p>



<p class="wp-block-paragraph"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-vivid-green-cyan-color">(4)</mark></strong> Equipping the module with an I2C interface requires an embedded controller-companion on the module, which provides data preparation for the consumer and data exchange in Slave Device mode in accordance with the I2C specification. Although it can be a common and inexpensive controller, its presence increases both the price and size of the module. It is also necessary to allocate additional space on the module board for the address selection pads. </p>



<p class="wp-block-paragraph"><strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-vivid-green-cyan-color">(5)</mark></strong> A module with an I2C interface requires a main controller and display so that the module can be used for its intended purpose. This is despite the fact that the module already has an embedded controller-companion. The main controllers are very different. Some use Raspberry Pi, or Arduino, and some want to be able to use ESP32/ESP8266. That&#8217;s why we don&#8217;t put the main controller on the GGreg20 module board. We believe that the user has the right to choose the controller, platform or development environment independently. And our task is to ensure the widest possible compatibility and versatility of our product.</p>



<p class="wp-block-paragraph">From an electrical point of view, equipping devices in this category with an I2C interface also has no advantages, since both the power and data interface in the I2C variant and the GGreg20_V3 pulse output variant require the same number of signal wires in the loop. Hot-swapping, supported by the I2C bus, is also hardly desirable for this type of module, not to mention the mandatory presence of this function.</p>



<p class="wp-block-paragraph">In Fig. Here are schematic images of two modules &#8211; the current version of GGreg20 without I2C, and the version with I2C interface to show how much you would have to change the module to the actual size (10&#215;10 mm) of the additional chip integrated controller-companion.</p>



<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2022/05/6-ggreg20_v3_iot-deviceslogo_i2c_publpic_eng-1024x683.png"><img loading="lazy" decoding="async" width="1024" height="566" src="https://iot-devices.com.ua/wp-content/uploads/2022/05/6-ggreg20_v3_publication_pic-1024x566.png" alt="GGreg20_V3" class="wp-image-2006" srcset="https://iot-devices.com.ua/wp-content/uploads/2022/05/6-ggreg20_v3_publication_pic-1024x566.png 1024w, https://iot-devices.com.ua/wp-content/uploads/2022/05/6-ggreg20_v3_publication_pic-300x166.png 300w, https://iot-devices.com.ua/wp-content/uploads/2022/05/6-ggreg20_v3_publication_pic-768x424.png 768w, https://iot-devices.com.ua/wp-content/uploads/2022/05/6-ggreg20_v3_publication_pic-1536x848.png 1536w, https://iot-devices.com.ua/wp-content/uploads/2022/05/6-ggreg20_v3_publication_pic-454x251.png 454w, https://iot-devices.com.ua/wp-content/uploads/2022/05/6-ggreg20_v3_publication_pic.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p class="wp-block-paragraph"><em><br>Fig. If GGreg20_V3 had an I2C interface (the built-in companion controller providing the I2C Slave Device mode is shown in red)</em>)</p>



<p class="wp-block-paragraph">The only advantages to justify equipping our radiation module with an I2C interface are:</p>



<ul class="wp-block-list"><li>the ability to connect multiple devices to the I2C interface of the main controller;</li><li>calculation of user values by means of the built-in controller-companion.</li></ul>



<p class="wp-block-paragraph">But if you carefully weigh the potential benefits and the very specific losses of implementing I2C in a given device, it becomes obvious that it is better to have a universal module with extensive driver support and the ability to use it in &#8220;manual&#8221; mode than to have a tones of I2C bus advantages that you need to be able to use.</p>



<figure class="wp-block-table is-style-regular"><table class="has-fixed-layout"><tbody><tr><td></td><td><strong>I2C interface</strong>                         </td><td><strong>GPIO pulse counter interface</strong></td></tr><tr><td>Autonomous use in &#8220;manual&#8221; mode</td><td>No</td><td>Yes</td></tr><tr><td>Requires a built-in controller-companion</td><td>Yes: <br>&#8211; higher cost;<br>&#8211; larger sizes.</td><td>No</td></tr><tr><td>Driver support</td><td>Not available / very limited</td><td>The broadest</td></tr><tr><td>Hardware dependency</td><td>High:<br>&#8211; main controller;<br>&#8211; display.</td><td>Low / none</td></tr><tr><td>User qualification requirements</td><td>High:<br>&#8211; embed programming .;<br>&#8211; administration / config;<br>&#8211; interfaces / protocols;<br>&#8211; electronics / integration.</td><td>Low / none</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">In addition to the above, here are two key problems we would like to highlight for potential users. GGreg20_V3 does not have these problems, but they are bound to occur (in some variations) in the radiation measurement module with the I2C interface:</p>



<h2 class="wp-block-heading"><strong>Problem # 1</strong> Field conditions / Emergency situation </h2>



<p class="wp-block-paragraph">Consider this situation: you have a radiation sensor in a drawer waiting for you to finally start programming it, and the next moment you need to leave the house as quickly as possible with one backpack in your hands and, perhaps, start measuring the level of radiation as soon as possible, because a situation of natural or man-made disaster has come, and you are near the epicenter of these events. </p>



<p class="wp-block-paragraph">We in Ukraine are very familiar with such circumstances, and we take into account the experience accumulated in the most difficult times for the country to make the system design of our products as good as possible.</p>



<p class="wp-block-paragraph">Our GGreg20_V3 module only needs to be powered by a powerbank (or even a few AA/AAA batteries), or a solar panel and that&#8217;s it: you can measure manually by LED flashes and a stopwatch or your own countdown. </p>



<p class="wp-block-paragraph">The number of flashes per minute, multiplied by the conversion factor, is the radiation level in μSv/h. </p>



<p class="wp-block-paragraph">The conversion factor for the SBM20 GM-tube is 0.0054. Thus, we have a simple formula: </p>



<p class="has-text-align-center wp-block-paragraph">CPM x 0.0054 = mkSv / hour. </p>



<p class="wp-block-paragraph">where CPM is the number of flashes per minute ( <em>Counts per Minute</em> ).</p>



<p class="wp-block-paragraph">For Kyiv[20 &#8211; 48] flashes is a normal level (0.10 &#8211; 0.26 mkSv / h).</p>



<p class="wp-block-paragraph">Unlike the GGreg20_V3, a module with an I2C interface will be very difficult to use in the field for its intended purpose. After all, such a module requires a main controller, display, programming tools, software code development and special knowledge and skills to interconnect the required components and program them. This means that the average user without specialist knowledge will not be able to make a measurement with an I2C sensor, even if he happens to have the available tools in his kit.</p>



<h2 class="wp-block-heading"><strong>Problem # 2</strong> Driver support</h2>



<p class="wp-block-paragraph">Even if the surrounding circumstances are fine and the radiation sensor module is operated in a civilization, there are still problems with the design option of the module having an I2C interface. Problems arise for users who want to use their favorite systems / platforms / environments / architectures for IoT development. </p>



<p class="wp-block-paragraph">There are many systems and user favors, but even the most advanced and popular systems do not have drivers for all the devices that consumers usually buy and try to connect. </p>



<p class="wp-block-paragraph">Due to the heterogeneity of integration protocols, sometimes you have to write a driver yourself, or wait several years for the system developers to pay attention to this particular commercial device and develop an appropriate driver connector.</p>



<p class="wp-block-paragraph">Here is a comparison table of common platforms with built-in I2C support for radiation sensors and platforms with GPIO pulse counter support, so that the reader can understand the extent of the problem.</p>



<figure class="wp-block-table"><table><tbody><tr><td><strong>Platform</strong>         </td><td class="has-text-align-center" data-align="center"><strong>Radiation sensor module with I2C, built-in driver platform support</strong>      </td><td class="has-text-align-center" data-align="center"><strong>Radiation sensor module with pulse output, built-in driver platform support (GPIO pulse counter, external ISR)</strong></td></tr><tr><td>Arduino</td><td class="has-text-align-center" data-align="center">No</td><td class="has-text-align-center" data-align="center">Yes</td></tr><tr><td>NodeMCU (Lua)</td><td class="has-text-align-center" data-align="center">No</td><td class="has-text-align-center" data-align="center">Yes</td></tr><tr><td>MicroPython</td><td class="has-text-align-center" data-align="center">No</td><td class="has-text-align-center" data-align="center">Yes</td></tr><tr><td>ESPHome / Home Assistant</td><td class="has-text-align-center" data-align="center">No</td><td class="has-text-align-center" data-align="center">Yes</td></tr><tr><td>Espressif ESP-IDF</td><td class="has-text-align-center" data-align="center">No</td><td class="has-text-align-center" data-align="center">Yes</td></tr><tr><td>STM32</td><td class="has-text-align-center" data-align="center">No</td><td class="has-text-align-center" data-align="center">Yes</td></tr><tr><td>Tasmota</td><td class="has-text-align-center" data-align="center">No</td><td class="has-text-align-center" data-align="center">Yes</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">This data indicates very eloquently that a sensor with a pulse output, such as the GGreg20_V3, is much easier to connect to any platform, or to use the module stand-alone, if necessary. </p>



<p class="wp-block-paragraph">Of course, each I2C module usually has its own libraries developed by the manufacturer or by concerned members of the open source software community. For example, the GGreg20_V3 module has several libraries for popular platforms:</p>



<figure class="wp-block-table is-style-stripes"><table><tbody><tr><td><strong>Platform</strong></td><td><strong>Link</strong></td></tr><tr><td>Arduino contributed library</td><td>https://www.arduino.cc/reference/en/libraries/ggreg20_v3/</td></tr><tr><td>ESPHome / Home Assistant example</td><td>https://github.com/iotdevicesdev/ggreg20-v3-homeassistant-esphome-example</td></tr><tr><td>Tasmota driver example</td><td>https://github.com/iotdevicesdev/ggreg20-v3-tasmota-esp32-driver</td></tr><tr><td>NodeMCU (Lua) example</td><td>https://github.com/iotdevicesdev/ggreg20-v3-nodemcu-lua-example</td></tr><tr><td>NodeMCU (Lua) full functional driver</td><td>https://alterstrategy.com/product/radcounter/</td></tr></tbody></table></figure>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><em><strong>Note.</strong> While every modern IoT platform typically provides I2C bus support, there must also be a driver for each specific hardware module (manufacturer, model, version). Support must be both on the platform side and on the side of the controller to which the module is connected.</em></p></blockquote>



<p class="wp-block-paragraph">Having libraries like the ones in the table is already a good thing. But this does not give any guarantee that these libraries are supported by their authors and are up-to-date, and also that the user will find such a library for his favorite platform and will be able to integrate it and program the end device.</p>



<p class="wp-block-paragraph">In the case of the pulse counter on the GPIO, the situation is completely different: all platforms support this function and are very easy to program.</p>



<h2 class="wp-block-heading"><strong>In lieu of conclusion.</strong></h2>



<p class="wp-block-paragraph">Despite the obvious advantages of the I2C bus, if in the future we decide to add I2C support to the GGreg20 module, it will be another, alternative device with these capabilities. And consumers will be able to choose which option suits them best.</p>



<p class="wp-block-paragraph">Buy a <a href="https://iot-devices.com.ua/en/product/ggreg20_v3-ionizing-radiation-detector-with-geiger-tube-sbm-20/">GGreg20_V3</a> ionizing radiation detector with pulse output.</p>



<p class="wp-block-paragraph">We wish you success!</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>New: I2CUI1 module &#8211; remote control panel and status display.</title>
		<link>https://iot-devices.com.ua/en/new-i2cui1-module-remote-control-panel-and-status-display/</link>
		
		<dc:creator><![CDATA[iot-guru]]></dc:creator>
		<pubDate>Sun, 17 Oct 2021 12:40:55 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[I2C]]></category>
		<category><![CDATA[PCA9538]]></category>
		<guid isPermaLink="false">https://iot-devices.com.ua/new-i2cui1-module-remote-control-panel-and-status-display/</guid>

					<description><![CDATA[We manufactured and started selling a new module I2CUI1 . 1. General overview. This is a panel that can be mounted on the wall of the case to control the device. A joystick is installed for control. An RGB LED is installed to indicate the status of the device and audio signals are output to [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">We manufactured and started selling a new module<a class="rank-math-link" href="https://iot-devices.com.ua/product/i2cuiv2-user-interface-module-4-in-1/"><strong> I2CUI1</strong></a> .</p>

<p class="wp-block-paragraph"><strong>1. General overview.</strong> This is a panel that can be mounted on the wall of the case to control the device. A joystick is installed for control. An RGB LED is installed to indicate the status of the device and audio signals are output to the buzzer. Interaction with the controller via the I2C digital interface; The module will be convenient to use in many custom projects based on ESP8266 or Arduino. The panel also has a connector with an I2C interface to make it easy to connect external devices &#8211; such as a digital thermometer.</p>

<p class="wp-block-paragraph"><strong>2.</strong> You may like this module as follows<strong> solutions</strong> :</p>

<ul class="wp-block-list"><li> During the design of one of our devices, the task was to place five buttons in a &#8220;tight&#8221; case. Accidentally found joystick prompted us to this elegant solution, which in practice did not disappoint us. So, instead of traditional buttons on I2CUI1 the compact joystick which in the case of the clock button unites 5 buttons (left, right, up, down, OK) is established; </li><li>The GPIO PCA9538 expander mounted on the board solves two tasks &#8211; convenient removal (for example, if necessary to install on the walls of the case) of the panel from the main controller with a compact two-wire bus I2c and simultaneously installed popular control and indication components;</li><li>A wide range of supply voltage allows to integrate the module in systems on ESP8266 and Arduino;</li><li>Hardware protection against &#8220;rattle&#8221; of joystick contacts;</li><li>Installed on the module<strong> buzzer</strong> is connected by a separate bus to the GPIO controller, because all the ports of the expander are occupied by the LED and the joystick. At first glance, this is a disadvantage, but in our experience, buzzer must be able to control the software (volume, sound effects). If the buzzer was connected to the GPIO of the expander, only software on / off would be available, because the PCA9538 port expander does not support the PWM mode required for control;</li><li>The INT bus is activated each time the joystick is pressed and initiates a software interrupt to handle the joystick states;</li><li>Compactness and quality of workmanship.</li></ul>

<div class="wp-block-media-text alignwide is-stacked-on-mobile"><figure class="wp-block-media-text__media"><video controls src="https://iot-devices.com.ua/wp-content/uploads/2020/08/i2ciui1.mp4"></video></figure><div class="wp-block-media-text__content">
<p class="has-normal-font-size wp-block-paragraph">instead of traditional buttons on I2CUI1 the compact joystick which in the case of the clock button unites 5 buttons (left, right, up, down, OK) is established</p>
</div></div>

<p class="wp-block-paragraph"><strong>3. Example of application of the module</strong> .</p>

<p class="wp-block-paragraph">In a few minutes we made the thermostat, using: </p>

<figure class="wp-block-table alignwide is-style-regular"><table><thead><tr><th class="has-text-align-left" data-align="left"><strong>Module name</strong></th><th><strong>Number</strong></th><th><strong>Link</strong></th></tr></thead><tbody><tr><td class="has-text-align-left" data-align="left">ESP12.OLED controller</td><td>1</td><td><a href="http://ESP12.OLED_V1.%20%D0%9A%D0%BE%D0%BC%D0%BF%D0%BB%D0%B5%D0%BA%D1%82%202.%20%D0%9A%D0%BE%D0%BD%D1%82%D1%80%D0%BE%D0%BB%D0%B5%D1%80%20IoT%20%D0%B1%D0%B5%D0%B7%20%D0%B4%D0%B8%D1%81%D0%BF%D0%BB%D0%B5%D1%8F%20%D0%BD%D0%B0%20%D0%BE%D1%81%D0%BD%D0%BE%D0%B2%D1%96%20ESP8266-12F" class="rank-math-link">ESP12.OLED_V1. Set 2. IoT controller without display based on ESP8266-12F</a>  </td></tr><tr><td class="has-text-align-left" data-align="left">I2CUI1</td><td>1</td><td><a href="https://iot-devices.com.ua/product/i2cuiv2-user-interface-module-4-in-1/" class="rank-math-link">I2CUI1 user interface module</a>  </td></tr><tr><td class="has-text-align-left" data-align="left">Digital temperature sensor on the LM75 chip</td><td>1</td><td>Made yourself</td></tr><tr><td class="has-text-align-left" data-align="left">Power supply module</td><td>1</td><td><a href="https://iot-devices.com.ua/?post_type=product&amp;p=779" class="rank-math-link">Power supply module on the battery 16340</a>  </td></tr><tr><td class="has-text-align-left" data-align="left">Relay module</td><td>1</td><td>In this test layout, the relay was simulated with a buzzer. To make a thermostat, you need to connect a relay with a winding and contacts in accordance with the power of household appliances to be controlled.</td></tr><tr><td class="has-text-align-left" data-align="left">Connection</td><td>12</td><td>Common among IoT-shniki connecting PLS tires mom-mom length of 10 cm.</td></tr></tbody></table></figure>

<p class="wp-block-paragraph">Of course, the thermostat requires the development of original software.</p>

<p class="wp-block-paragraph">We will be grateful for the support of our page at<a href="https://www.facebook.com/IoT-devices-114746816966582/" class="rank-math-link" target="_blank" rel="noopener"><img loading="lazy" decoding="async" width="50" height="50" class="wp-image-1266" style="width: 50px;" src="https://iot-devices.com.ua/wp-content/uploads/2020/07/fb.png" alt="" srcset="https://iot-devices.com.ua/wp-content/uploads/2020/07/fb.png 300w, https://iot-devices.com.ua/wp-content/uploads/2020/07/fb-100x100.png 100w, https://iot-devices.com.ua/wp-content/uploads/2020/07/fb-150x150.png 150w" sizes="(max-width: 50px) 100vw, 50px" /></a> and purchase of goods in our store.<a href="https://iot-devices.com.ua/en/shop-2/" class="rank-math-link"><strong> iot-devices.com.ua</strong></a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to choose the right I2C chips. Or the hidden software problem of choosing hardware modules</title>
		<link>https://iot-devices.com.ua/en/how-to-choose-the-right-i2c-chips-en/</link>
		
		<dc:creator><![CDATA[iot-guru]]></dc:creator>
		<pubDate>Tue, 14 Sep 2021 13:51:58 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[application-note]]></category>
		<category><![CDATA[GGreg20_V3]]></category>
		<category><![CDATA[I2C]]></category>
		<category><![CDATA[I2CUI4_V1]]></category>
		<category><![CDATA[MCP23017]]></category>
		<guid isPermaLink="false">https://iot-devices.com.ua/how-to-choose-the-right-i2c-chips-or-the-hidden-software-problem-of-choosing-hardware-modules/</guid>

					<description><![CDATA[IoT-devices constantly promote the use of I2C bus as one of the best serial digital interfaces. The I2C bus offers all the necessary functions: a simple physical interface: the SDA data and SCL synchronization signals require only two wires to connect to the bus; the addressing of devices on the bus with unique 7-bit addresses; [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">IoT-devices constantly promote the use of I2C bus as one of the best serial digital interfaces.</p>

<p class="wp-block-paragraph">The I2C bus offers all the necessary functions:</p>

<ul class="wp-block-list"><li>a simple physical interface: the SDA data and SCL synchronization signals require only two wires to connect to the bus;</li></ul>

<ul class="wp-block-list"><li>the addressing of devices on the bus with unique 7-bit addresses;</li><li>identification of devices on the bus by their address or by unique identifiers (if provided by the chip manufacturer);</li><li>hot device plugging / unplugging like Plug &amp; Play;</li><li>the unit is powered by the bus or by each module’s own power supply;</li><li>the support for different supply voltages of devices on the bus (provided that the signals are matched to the voltage level);</li><li>an advanced infrastructure of amplifiers, repeaters, splitters and multiplexers to build complex topologies offered by chip manufacturers;</li></ul>

<p class="wp-block-paragraph">All that allows about a hundred devices to be connected to the controller on a single interface at the same time. The I/O port budget of the main controller is minimal when the I2C bus is used to connect the sensors. </p>

<p class="wp-block-paragraph">Sensors or actuators might be on an extension cord, or all the chips might be concentrated on one module. Or all chips can be focused on one module. </p>

<p class="wp-block-paragraph">The master controller and slave devices can be powered independently. Or all devices on the bus can be powered from a common source. </p>

<p class="wp-block-paragraph">The I2C is supported by the vast majority of microelectronics manufacturers. All popular controllers, IoT / Smart Home platforms, and related development environments are compatible with the bus. </p>

<p class="wp-block-paragraph">Most IoT devices support the I2C interface as basic. Moreover, the support of the I2C bus is usually a decisive factor in the selection of chips in our projects. But any system has not only advantages. There are also shortcomings and hidden problems that we reveal in the publications.   </p>

<p class="wp-block-paragraph">Today we would like to talk about the software problem of choosing the right hardware sensors with I2C bus support. We will not go into the theory, but rather suggest a practical example using our devices. </p>

<p class="wp-block-paragraph">Let&#8217;s start with the popular radiation sensor module <a href="https://www.tindie.com/products/iotdev/ggreg20_v3-ionizing-radiation-detector/" target="_blank" data-type="URL" data-id="https://www.tindie.com/products/iotdev/ggreg20_v3-ionizing-radiation-detector/" rel="noreferrer noopener">GGreg20</a> . </p>

<h2 class="wp-block-heading">Example №1. GGreg20 and I2C GGreg20 and I2C </h2>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/09/ggreg20-1024x287.jpg"><img loading="lazy" decoding="async" width="1024" height="287" src="https://iot-devices.com.ua/wp-content/uploads/2021/09/ggreg20-1024x287.jpg" alt="ggreg20-i2c-chip" class="wp-image-1141" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/09/ggreg20-1024x287.jpg 1024w, https://iot-devices.com.ua/wp-content/uploads/2021/09/ggreg20-454x127.jpg 454w, https://iot-devices.com.ua/wp-content/uploads/2021/09/ggreg20-300x84.jpg 300w, https://iot-devices.com.ua/wp-content/uploads/2021/09/ggreg20-768x215.jpg 768w, https://iot-devices.com.ua/wp-content/uploads/2021/09/ggreg20.jpg 1529w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption>IoT-devices GGreg20_V3 Ionizing Radiation Sensor module with pulse counting output</figcaption></figure>

<p class="wp-block-paragraph">From time to time we are asked if it would be better to equip the GGreg20 module with the I2C interface and offer such a product as an alternative to the product with a pulse output, which is now GGreg20_V3.</p>

<p class="wp-block-paragraph">In short, no. Let’s try to justify our opinion in more detail. Let’s try to justify our opinion in more detail.  </p>

<p class="wp-block-paragraph">We really like the I2C bus. We, moreover, already have an I2C interface splitter module, I2CHUB, which would be well suited to a hypothetical GGreg20 with I2C interface. So we can take a budget microcontroller – a companion like STM32, which must perform the necessary pulse calculations and give calculated values of the power and dose of ionizing radiation to the main controller at a low level via I2C interface.   </p>

<p class="wp-block-paragraph">But let’s ask ourselves how many common and very popular IoT platforms and microcontrollers will have driver support for such an I2C sensor? The answer will be disappointing since it is not an industrial sensor with a huge sales market.</p>

<p class="wp-block-paragraph">The answer will be disappointing since it is not an industrial sensor with a huge sales market.</p>

<p class="wp-block-paragraph">Certainly, our company needs everyone to be able to connect our sensors. It is our customers who must choose the type of controller or platform. We need to provide versatility for Arduino, ESP32 / ESP8266, Raspberry Pi, or for NodeMCU, Node-RED and ESPHome in Home Assistant, and many other IoT development environments that we might not have even heard of.  </p>

<p class="wp-block-paragraph">GGreg20 is now supported by any controller, development environment, and IoT platform, precisely because it has a versatile pulse output. If we equipped the GGreg20 with an I2C interface, we would have a completely different result. </p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><em><strong>Note</strong> . What if you make two interfaces on the GGreg20 module at once &#8211; pulse output and I2C? It would be very convenient, but in this case we believe that these costs at the expense of customers would be unjustified. The companion controller occupies a certain area on the module board. The I2C bus takes up twice as many controller ports as the pulse output. All this significantly increases the unit cost of the product. While the Pulse interface takes up only one GPIO controller with an interrupt handler and is much easier to program. And if we talk about maximum simplification, the GGreg20 module can work without a controller at all. The user can measure radiation (in circumstances that require it) only with a clock to record the measurement time in minutes.        </em></p></blockquote>

<p class="wp-block-paragraph">We will next consider another example of two similar devices. They both have an I2C interface, but different application perspectives. </p>

<h2 class="wp-block-heading">Example №2. I2CUI3, I2CUI4 and I2C </h2>

<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/09/i2cui3_v1-e1634068090791.jpg"><img loading="lazy" decoding="async" src="https://iot-devices.com.ua/wp-content/uploads/2021/09/i2cui3_v1-e1634068090791.jpg" alt="i2cui3_v1-i2c-chip" class="wp-image-1142" width="341" height="371"/></a><figcaption>IoT-devices I2CUI3_V1 User Interface module with I2C (PCA9538 8-bit)</figcaption></figure></div>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/09/i2cui4-1024x928.jpg"><img loading="lazy" decoding="async" width="1024" height="928" src="https://iot-devices.com.ua/wp-content/uploads/2021/09/i2cui4-1024x928.jpg" alt="I2CUI4_V1-i2c-chip" class="wp-image-1143" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/09/i2cui4-1024x928.jpg 1024w, https://iot-devices.com.ua/wp-content/uploads/2021/09/i2cui4-454x411.jpg 454w, https://iot-devices.com.ua/wp-content/uploads/2021/09/i2cui4-300x272.jpg 300w, https://iot-devices.com.ua/wp-content/uploads/2021/09/i2cui4-768x696.jpg 768w, https://iot-devices.com.ua/wp-content/uploads/2021/09/i2cui4.jpg 1224w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption>IoT-devices I2CUI4_V1 User Interface module with I2C (MCP23017 16-bit)</figcaption></figure></div>
</div>
</div>

<p class="wp-block-paragraph">We first developed <a href="https://www.tindie.com/products/iotdev/i2cui3-ui-i2c-module-with-5-key-rgb-led-buzzer/" target="_blank" data-type="URL" data-id="https://www.tindie.com/products/iotdev/i2cui3-ui-i2c-module-with-5-key-rgb-led-buzzer/" rel="noreferrer noopener">I2CUI3</a> &#8211; a useful and reliable product. It is a universal module of user interfaces with the I2C interface, which provides input of user instructions with the help of five navigation buttons and output of data to the RGB LED and the bazaar about the status or events of the IoT device. It is based on the 8-bit NXP PCA9538 port expander. For many years we have been using this chip for various tasks, including as the main component of the I2CUI3 module. The PCA9538 port expander is convenient, as it works semi-automatically after power supply and for some tasks does not require pre-programming at all, and therefore can work even without the main microcontroller.  </p>

<p class="wp-block-paragraph">And then it became clear that we need not 8-bit, but 16-bit similar module for certain tasks. So we created a new product with an I2C interface – I2CUI4 module based on the MCP23017 port expander chip. </p>

<p class="wp-block-paragraph">For the new <a href="https://www.tindie.com/products/iotdev/i2cui4_v1-user-interface-i2c-module-with-5-keys/" target="_blank" data-type="URL" data-id="https://www.tindie.com/products/iotdev/i2cui4_v1-user-interface-i2c-module-with-5-keys/" rel="noreferrer noopener">I2CUI4,</a> we could use NXP&#8217;s older expander in the line. They have several 16-bit expander chips like PCA6416, PCA9539, PCA9575, PCA9673. But there are no official libraries for any of the chips either on the arduino.cc site or on the esphome.io site. There are also no drivers for the NodeMCU firmware.  </p>

<p class="wp-block-paragraph">There are only a few libraries for PCA9539 on Github, but neither Adafruit nor Seeed Studio has drivers for any NXP chip.</p>

<p class="wp-block-paragraph">That is why the new product I2CUI4 is compatible with common platforms and has probably the most popular chip MCP23017 from Microchip Technology with I2C interface.</p>

<p class="wp-block-paragraph">Thanks to that, our MCP23017-based product can boast a wide range of support by Arduino, NodeMCU, ESPHome / Home Assistant, Node-RED, Blynk, MicroPython, Raspberry Pi, STM32, and other brands. GitHub has hundreds of repositories with drivers in C / C ++, Python, JS, Lua, and other languages. </p>

<h2 class="wp-block-heading">Conclusion</h2>

<p class="wp-block-paragraph">We gave two examples of identifying and solving the problem of driver support for devices equipped with an I2C interface from our own experience.</p>

<p class="wp-block-paragraph">Unless you plan to provide on your own driver support for an I2C device you are about to buy, please pay attention to the hidden external risks described in this publication. You should choose a device, module, or chip with an I2C interface, which, in addition to other factors, will have the widest driver support among third-party systems.  Special attention concerning compatibility and support should be given to the target microcontrollers, platforms, development environments. You have to be sure that all of these systems will support your chip before using it in your designs. </p>

<p class="wp-block-paragraph">We have used these principles to develop two excellent products, GGreg20 and I2CUI4, to minimize the risks and avoid the problems mentioned above.</p>

<p class="wp-block-paragraph">We hope you find this material useful. </p>

<p class="wp-block-paragraph">Thank you for your attention.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
