<?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>application-note &#8211; IoT-devices, LLC &#8211; Electronics manufacturer for IoT</title>
	<atom:link href="https://iot-devices.com.ua/en/tag/application-note-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 17:23:37 +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>application-note &#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 note on the use of the high-voltage converter DCDC_3V3_400V_V1 as a power supply for the Geiger-Muller tube</title>
		<link>https://iot-devices.com.ua/en/high-voltage-converter-dcdc-3v3-400v-v1-application-note/</link>
					<comments>https://iot-devices.com.ua/en/high-voltage-converter-dcdc-3v3-400v-v1-application-note/#respond</comments>
		
		<dc:creator><![CDATA[iot-guru]]></dc:creator>
		<pubDate>Mon, 21 Oct 2024 16:08:53 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[application-note]]></category>
		<category><![CDATA[DCDC_3V3_400V_V1]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[Geiger-Muller tube]]></category>
		<category><![CDATA[high voltage generator]]></category>
		<category><![CDATA[high-voltage-converter]]></category>
		<category><![CDATA[technical-note]]></category>
		<guid isPermaLink="false">https://iot-devices.com.ua/high-voltage-converter-dcdc-3v3-400v-v1-application-note/</guid>

					<description><![CDATA[Note on the use of the DCDC_3V3_400V_V1 high voltage converter by the user to power the Geiger-Muller tube or in other DIY / IoT projects]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="683" src="https://iot-devices.com.ua/wp-content/uploads/2024/10/DCDC_3V3_400V_V1_Application_Note-1024x683.jpg" alt="dcdc_3v3_400v_v1 high-voltage converter application note" class="wp-image-3663" srcset="https://iot-devices.com.ua/wp-content/uploads/2024/10/DCDC_3V3_400V_V1_Application_Note-1024x683.jpg 1024w, https://iot-devices.com.ua/wp-content/uploads/2024/10/DCDC_3V3_400V_V1_Application_Note-300x200.jpg 300w, https://iot-devices.com.ua/wp-content/uploads/2024/10/DCDC_3V3_400V_V1_Application_Note-768x512.jpg 768w, https://iot-devices.com.ua/wp-content/uploads/2024/10/DCDC_3V3_400V_V1_Application_Note-454x303.jpg 454w, https://iot-devices.com.ua/wp-content/uploads/2024/10/DCDC_3V3_400V_V1_Application_Note.jpg 1500w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>

<p class="wp-block-paragraph">The <a href="https://iot-devices.com.ua/en/product/peretvoruvach-naprugy-postijnogo-strumu-dcdc_3v3_400v_v1-3-3-vv-naprugu-400-v-dlya-zhyvlennya-trubky-gejgera-myullera/">DCDC_3V3_400V_V1</a> module is a high voltage source for powering a wide range of Geiger-Muller tubes with different anode-cathode voltage levels, and can also be used as a low-power high voltage source in other DIY projects.</p>

<p class="wp-block-paragraph">The need to set different output voltage levels is one of the reasons for installing a tuning potentiometer in the module.</p>

<p class="wp-block-paragraph">The other adjustment components are resistor R1 and capacitor C1.</p>

<p class="wp-block-paragraph">For explanation, please see the block diagram below.</p>

<p class="wp-block-paragraph">The left part of the block diagram shows the structure of the high-voltage converter DCDC_3V3_400_V1 module.</p>

<figure data-wp-context="{&quot;imageId&quot;:&quot;6a420ea5b5a8c&quot;}" data-wp-interactive="core/image" data-wp-key="6a420ea5b5a8c" class="wp-block-image size-large wp-lightbox-container"><img decoding="async" width="1024" height="227" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://iot-devices.com.ua/wp-content/uploads/2024/10/DCDC3V3_400BLOK_Fig1-1024x227.jpg" alt="dcdc_3v3_400v_v1 high-voltage converter application note Fig1 - Block Diagram" class="wp-image-3660" srcset="https://iot-devices.com.ua/wp-content/uploads/2024/10/DCDC3V3_400BLOK_Fig1-1024x227.jpg 1024w, https://iot-devices.com.ua/wp-content/uploads/2024/10/DCDC3V3_400BLOK_Fig1-300x66.jpg 300w, https://iot-devices.com.ua/wp-content/uploads/2024/10/DCDC3V3_400BLOK_Fig1-768x170.jpg 768w, https://iot-devices.com.ua/wp-content/uploads/2024/10/DCDC3V3_400BLOK_Fig1-454x100.jpg 454w, https://iot-devices.com.ua/wp-content/uploads/2024/10/DCDC3V3_400BLOK_Fig1.jpg 1500w" sizes="(max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>

<p class="wp-block-paragraph">The right part of the block diagram shows the components of the power consumers from the DCDC_3V3_400_V1 module integrated into the DIY project, according to the user&#8217;s design.</p>

<p class="wp-block-paragraph">The output cascade of the DCDC_3V3_400_V1 module is a high-voltage multiplier. In projects of radiation detectors based on the Geiger-Muller counter, the tube receives a high voltage of 300 to 2000 volts through the R1C1 circuit.  </p>

<p class="wp-block-paragraph">The resistance, capacitance and voltage values for R1 and C1 depend on the type of tube or DIY circuitry. For this reason, R1 and C1 are not installed on the DCDC_3V3_400_V1 module.  </p>

<p class="wp-block-paragraph">Another reason for the absence of R1 and C1 on the module is the possibility of damage (electrical breakdown) of C1 when adjusting the voltage with a potentiometer. </p>

<p class="wp-block-paragraph">Taking these factors into account, we recommend that when testing the DCDC_3V3_400_V1 module, you solder or connect a circuit to the output contacts according to the following scheme:</p>

<figure data-wp-context="{&quot;imageId&quot;:&quot;6a420ea5b5de0&quot;}" data-wp-interactive="core/image" data-wp-key="6a420ea5b5de0" class="wp-block-image size-large wp-lightbox-container"><img decoding="async" width="1024" height="343" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://iot-devices.com.ua/wp-content/uploads/2024/10/DCDC3V3_400BLOK_Fig2-1024x343.jpg" alt="dcdc_3v3_400v_v1 high-voltage converter application note Fig2 - Block Diagram - Load wiring" class="wp-image-3658" srcset="https://iot-devices.com.ua/wp-content/uploads/2024/10/DCDC3V3_400BLOK_Fig2-1024x343.jpg 1024w, https://iot-devices.com.ua/wp-content/uploads/2024/10/DCDC3V3_400BLOK_Fig2-300x101.jpg 300w, https://iot-devices.com.ua/wp-content/uploads/2024/10/DCDC3V3_400BLOK_Fig2-768x258.jpg 768w, https://iot-devices.com.ua/wp-content/uploads/2024/10/DCDC3V3_400BLOK_Fig2-454x152.jpg 454w, https://iot-devices.com.ua/wp-content/uploads/2024/10/DCDC3V3_400BLOK_Fig2.jpg 1500w" sizes="(max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>

<p class="wp-block-paragraph">The voltage adjustment and measurement should be performed similarly to the steps described in the <a href="https://iot-devices.com.ua/en/technical-note-on-initial-diagnostics-of-ggreg20-v3/" target="_blank" rel="noreferrer noopener">Initial Diagnostics Manual for the Geiger counter module GGreg20_V3</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://iot-devices.com.ua/en/high-voltage-converter-dcdc-3v3-400v-v1-application-note/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Connecting the GGreg20_V3 Radiation Sensor to the Home Assistant Server via ESP Home Integration – part 3</title>
		<link>https://iot-devices.com.ua/en/pidklyuchennya-sensora-radiacziyi-ggreg20_v3-do-servera-home-assistant-cherez-integracziyu-esp-home-3/</link>
		
		<dc:creator><![CDATA[iot-guru]]></dc:creator>
		<pubDate>Sat, 17 Sep 2022 05:39:21 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[application-note]]></category>
		<category><![CDATA[ESP32]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[ESPHome]]></category>
		<category><![CDATA[GGreg20_V3]]></category>
		<category><![CDATA[Home Assistant]]></category>
		<guid isPermaLink="false">https://iot-devices.com.ua/pidklyuchennya-sensora-radiacziyi-ggreg20_v3-do-servera-home-assistant-cherez-integracziyu-esp-home-3/</guid>

					<description><![CDATA[We offer you the the last, third part of the description of the procedure of connecting the detector (sensor) GGreg20 in combination with the main controller ESP8266 or ESP32 to the Home Assistant server via the ESP Home plug-in. Second part of the description, see the link: Connecting the GGreg20_V3 Radiation Sensor to the Home [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">We offer you the the last, <strong>third part of the description</strong> of the procedure of connecting the detector (sensor) GGreg20 in combination with the main controller ESP8266 or ESP32 to the Home Assistant server via the ESP Home plug-in.</p>

<p class="wp-block-paragraph"><strong>Second part of the description,</strong> see the link: <strong><a href="https://iot-devices.com.ua/en/connecting-ggreg20_v3-radiation-sensor-to-home-assistant-server-via-esp-home-integration-part2/" class="rank-math-link">Connecting the GGreg20_V3 Radiation Sensor to the Home Assistant Server via ESP Home Integration &#8211; part 2</a></strong></p>

<p class="wp-block-paragraph"> </p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>Note</strong> . This publication is suitable for all versions of the ionizing radiation detector manufactured by IoT-devices: GGreg20_V1, GGreg20_V2, GGreg20_V3 <br/>Since the entire line of these detectors is focused on the SBM-20 tube, all versions of the devices have the same algorithm and coefficients for calculating the power level and dose of ionizing radiation.<br/>The accuracy of the measurement is affected only by the individual properties of the SBM-20 tube installed in each GGreg20_V3 detector. The specifications of the tube manufacturer indicate a limit range of measurement accuracy of <a rel="noreferrer noopener" href="https://zapadpribor.com/sbm20/" target="_blank">20%</a> . On practice, this means that two identical GGreg20 devices, but with different SBM-20 tubes, can give results (not more than) with the specified deviation in the number of pulses.</p></blockquote>

<h2 class="wp-block-heading">Steps to connect GGreg20 to Home Assistant – continued.</h2>

<h5 class="wp-block-heading">Step 8. Check the log of the new ESP8266 controller with GGreg20 connected<br/>Step 9. Check for new entities on the server side<br/>Step 10. Add GGreg20 radiation sensor widgets to the Dashboard<br/>Step 11. Add a push notification automation script to the Home Assistant application for crossing thresholds</h5>

<h3 class="wp-block-heading">Entities and values of the device on the server</h3>

<h4 class="wp-block-heading"><strong>Step 8</strong> . Check the log of the new ESP8266 controller with GGreg20 connected</h4>

<p class="wp-block-paragraph">Here is an example of an active device console with GGreg20 and yaml settings similar to the ones we developed above.</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-13-1024x661.png"><img loading="lazy" decoding="async" width="1024" height="661" src="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-13-1024x661.png" alt="" class="wp-image-1097" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-13-1024x661.png 1024w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-13-454x293.png 454w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-13-300x194.png 300w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-13-768x496.png 768w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-13.png 1393w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>

<p class="wp-block-paragraph">Fig. Output to the device console (Logs) via the ESP Home interface</p>

<h4 class="wp-block-heading"><strong>Step 9</strong> . Check for new entities on the server side</h4>

<p class="wp-block-paragraph">There are two ways to verify that the corresponding GGreg20 entities are formed in the ESP Home plug-in and that the Home Assistant server sees them:</p>

<ul class="wp-block-list"><li>go to the Developer Tools menu on the sidebar of the Home Assistant interface and search for the relevant data as shown in Fig.</li></ul>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-15-1024x778.png"><img loading="lazy" decoding="async" width="1024" height="778" src="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-15-1024x778.png" alt="" class="wp-image-1100" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-15-1024x778.png 1024w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-15-454x345.png 454w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-15-300x228.png 300w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-15-768x584.png 768w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-15.png 1104w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>

<p class="wp-block-paragraph">Fig. Find the right entities through the Developer Tools menu</p>

<ul class="wp-block-list"><li>or go to the menu Configuration -&gt; Integration and search as shown in the following figures.</li></ul>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-17-1024x514.png"><img loading="lazy" decoding="async" width="1024" height="514" src="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-17-1024x514.png" alt="" class="wp-image-1102" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-17-1024x514.png 1024w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-17-454x228.png 454w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-17-300x151.png 300w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-17-768x385.png 768w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-17-1536x771.png 1536w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-17.png 1670w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>

<p class="wp-block-paragraph">Fig. Search for the desired entities through the menu Configuration -&gt; Integration</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-18-1024x475.png"><img loading="lazy" decoding="async" width="1024" height="475" src="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-18-1024x475.png" alt="" class="wp-image-1104" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-18-1024x475.png 1024w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-18-454x211.png 454w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-18-300x139.png 300w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-18-768x356.png 768w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-18-1536x712.png 1536w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-18.png 1673w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>

<p class="wp-block-paragraph">Fig. Search for the required entities through the menu Configuration -&gt; Integration : Devices / Entities</p>

<h3 class="wp-block-heading">Visualization and Automation</h3>

<h4 class="wp-block-heading"><strong>Step 10</strong> . Add GGreg20 radiation sensor widgets to the Dashboard</h4>

<p class="wp-block-paragraph">Here is an example of a demo tab from an active server for two devices GGreg20_V1 and GGreg20_V3 located in different coordinate axes. Each device uses the same yaml file as we created above.</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-14-1024x547.png"><img loading="lazy" decoding="async" width="1024" height="547" src="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-14-1024x547.png" alt="" class="wp-image-1098" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-14-1024x547.png 1024w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-14-454x243.png 454w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-14-300x160.png 300w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-14-768x410.png 768w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-14.png 1415w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>

<p class="wp-block-paragraph">Fig. The dashboard shows widgets with radiation level data from two sensors GGreg20_V1 and GGreg20_V3 located on different coordinate axes.</p>

<h4 class="wp-block-heading"><strong>Step 11</strong> . Add a push notification automation script to the Home Assistant application for crossing thresholds</h4>

<p class="wp-block-paragraph">Once we have made sure that the new device works and sends reliable data, it is possible to move on to the main task &#8211; Automation. This powerful tool is available to the administrator through the menu Configuration -&gt; Automation.</p>

<p class="wp-block-paragraph">Because the entities with the power and dose of ionizing radiation created by ESP Home are available through all components and functions of Home Assistant, the administrator can create any events, functions, scenarios with their use.</p>

<p class="wp-block-paragraph">For example, it is possible to create an automated exceeding notification of the normal power threshold of ionizing radiation with a message on a smartphone. And so on.</p>

<p class="wp-block-paragraph">However, these topics go far beyond this publication and we do not have the opportunity to consider them here.</p>

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

<p class="wp-block-paragraph">In parts <strong><a href="https://iot-devices.com.ua/en/connecting-ggreg20-radiation-sensor-to-home-assistant-server-via-esp-home-integration/" class="rank-math-link">one</a></strong> and <strong><a href="https://iot-devices.com.ua/en/connecting-ggreg20_v3-radiation-sensor-to-home-assistant-server-via-esp-home-integration-part2/" class="rank-math-link">two</a></strong> , we covered the steps</p>

<p class="wp-block-paragraph">Server<br/>Step 1. Install (or start) the Home Assistant server<br/><br/>ESP Home plugin for Home Assistant<br/>Step 2. Connect the ESP Home extension for the Home Assistant server via the Supervisor -&gt; Add-on Store menu<br/><br/>YAML-config of the new ESP device with GGreg<br/>Step 3. Download the ready example of a batch yaml-configuration file of the GGreg20_V3 device for ESP8266 from our website<br/>Step 4. Create (based on the example) in ESP Home the appropriate yaml configuration file<br/><br/>Hardware connection GGreg20_V3 and controller<br/>Step 5. Select the GPIO pin on the controller that will register the pulses from GGreg20<br/>Step 6. Connect the GGreg20_V3 radiation detector to the ESP8266 controller via the Out connector to the selected GPIO of the controller<br/><br/>Flashing the ESP device with GGreg<br/>Step 7. Build and write firmware for the controller</p>

<p class="wp-block-paragraph">Next, we performed the following steps to connect GGreg20 to Home Assistant:</p>

<h5 class="wp-block-heading">Step 8. Check the log of the new ESP8266 controller with GGreg20 connected<br/>Step 9. Check for new entities on the server side<br/>Step 10. Add GGreg20 radiation sensor widgets to the Dashboard<br/>Step 11. Add a push notification automation script to the Home Assistant application for crossing thresholds</h5>

<p class="wp-block-paragraph">We have considered in detail the easiest way to connect the GGreg20 detector with the ESP8266 controller to the Home Assistant server with the ESP Home plug-in.</p>

<p class="wp-block-paragraph">And we made sure that it is not difficult at all, because all the work for us is performed by :</p>

<ul class="wp-block-list"><li>Detector GGreg20_V3 &#8211; Immediately registers the pulses and transmits them to ESP8266;</li><li>ESP Home plugin &#8211; provides an interface for building firmware and programming ESP8266;</li><li>Ready-to-use yaml-file frees us from self-writing guidelines for sensor GGreg20;</li><li>The Home Assistant server allows us to conveniently connect, administer and receive information from any of our devices.</li></ul>

<p class="wp-block-paragraph">That&#8217;s all. Good luck!</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Connecting the GGreg20_V3 Radiation Sensor to the Home Assistant Server via ESP Home Integration &#8211; part 2</title>
		<link>https://iot-devices.com.ua/en/connecting-ggreg20_v3-radiation-sensor-to-home-assistant-server-via-esp-home-integration-part2/</link>
		
		<dc:creator><![CDATA[iot-guru]]></dc:creator>
		<pubDate>Thu, 15 Sep 2022 21:09:12 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[application-note]]></category>
		<category><![CDATA[ESP32]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[ESPHome]]></category>
		<category><![CDATA[GGreg20_V3]]></category>
		<category><![CDATA[Home Assistant]]></category>
		<guid isPermaLink="false">https://iot-devices.com.ua/connecting-the-ggreg20_v3-radiation-sensor-to-the-home-assistant-server-via-esp-home-integration-part-2/</guid>

					<description><![CDATA[We offer you the second part of the description of the procedure of connecting the detector (sensor) GGreg20 in combination with the main controller ESP8266 or ESP32 to the Home Assistant server via the ESP Home plug-in. First part of the description, see the linkConnecting the GGreg20_V3 Radiation Sensor to the Home Assistant Server via [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">We offer you <strong>the second</strong> <strong>part of the description</strong> of the procedure of connecting the detector (sensor) GGreg20 in combination with the main controller ESP8266 or ESP32 to the Home Assistant server via the ESP Home plug-in.</p>

<p class="wp-block-paragraph"><strong>First part</strong> of the description, see the link<strong><a href="https://iot-devices.com.ua/en/connecting-ggreg20-radiation-sensor-to-home-assistant-server-via-esp-home-integration/" class="rank-math-link">Connecting the GGreg20_V3 Radiation Sensor to the Home Assistant Server via ESP Home Integration</a></strong></p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>Note</strong> . This publication is suitable for all versions of the ionizing radiation detector manufactured by IoT-devices: GGreg20_V1, GGreg20_V2, GGreg20_V3 </p><p>Since the entire line of these detectors is focused on the SBM-20 tube, all versions of the devices have the same algorithm and coefficients for calculating the power level and dose of ionizing radiation.</p><p>The accuracy of the measurement is affected only by the individual properties of the SBM-20 tube installed in each GGreg20_V3 detector. The specifications of the tube manufacturer indicate a limit range of measurement accuracy of <a href="https://zapadpribor.com/sbm20/" target="_blank" rel="noopener">20%</a> . On practice, this means that two identical GGreg20 devices, but with different SBM-20 tubes, can give results (not more than) with the specified deviation in the number of pulses.</p></blockquote>

<h2 class="wp-block-heading">Steps to connect GGreg20 to Home Assistant – continued.</h2>

<h4 class="wp-block-heading">Step 5. Select the GPIO pin on the controller that will register the pulses from GGreg20<br/>Step 6. Connect the GGreg20_V3 radiation detector to the ESP8266 controller via the Out connector to the selected GPIO of the controller<br/>Step 7. Build and write firmware for the controller</h4>

<h3 class="wp-block-heading">Hardware connection GGreg20_V3 and controller</h3>

<p class="wp-block-paragraph">In steps 5 and 6, we give an example of a connection for ESP8266. For the ESP32 controller, everything is the same. The only difference is the number, purpose and numbering of ESP32&#8217;s GPIOs as a more powerful hardware platform. But the general technological logic is identical.</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-6.png"><img loading="lazy" decoding="async" width="960" height="540" src="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-6.png" alt="" class="wp-image-1075" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-6.png 960w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-6-454x255.png 454w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-6-300x169.png 300w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-6-768x432.png 768w" sizes="(max-width: 960px) 100vw, 960px" /></a></figure>

<p class="wp-block-paragraph">Fig. Connecting GGreg20_V3 to a classic NodeMCU board with ESP8266</p>

<h4 class="wp-block-heading"><strong>Step 5</strong>. Select the GPIO pin on the controller that will register the pulses from GGreg20</h4>

<p class="wp-block-paragraph">If this is your first time dealing with ESP8266 and you do not know which GPIO is best to use for a pulse counter, we recommend using <a class="rank-math-link" href="https://alterstrategy.com/recommended-pin-use-standard/" target="_blank" rel="noopener">Сthe GPIO Planning and Application Standard for ESP8266-12 / NodeMCU / Lua projects</a>, developed by <a class="rank-math-link" href="https://alterstrategy.com/alterstrategy-about/" target="_blank" rel="noopener">alterstrategy.lab</a> .</p>

<p class="wp-block-paragraph">For example, it could be GPIO0 (D3). This pin is convenient because it has a built-in Flash button in most devices and boards based on the ESP8266 module &#8211; in case you need to check how the controller counts pulses without a sensor, it is possible to simulate pulses with a button. That is why all the examples in this publication are for GPIO0 (D3).</p>

<h4 class="wp-block-heading"><strong>Step 6.</strong>. Connect the GGreg20_V3 radiation detector to the ESP8266 controller via the Out connector to the selected GPIO of the controller</h4>

<p class="wp-block-paragraph">As you can see, the connection is quite simple &#8211; you only need to supply power from the NodeMCU for the GGreg20 module, and connect the output (Out) of the sensor to the input (D3) of the controller and supply 5V to the micro USB connector of the NodeMCU.</p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>Note.</strong> Note that you may not have GGreg20 at all &#8211; in this case, you can simulate the pulses by simply pressing the Flash button (GPIO0 / D3) a certain number of times per minute.</p></blockquote>

<h3 class="wp-block-heading">Flashing the ESP device with GGreg</h3>

<h4 class="wp-block-heading"><strong>Step 7</strong>. Build and write firmware for the controller</h4>

<p class="wp-block-paragraph">Before building the firmware, you need to validate the yaml file we created. This will protect us from file errors that we may have accidentally made.</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-7-1024x727.png"><img loading="lazy" decoding="async" width="1024" height="727" src="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-7-1024x727.png" alt="" class="wp-image-1076" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-7-1024x727.png 1024w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-7-454x322.png 454w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-7-300x213.png 300w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-7-768x545.png 768w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-7.png 1470w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>

<p class="wp-block-paragraph">Fig. YAML code of the counter, which is planned to be flashed to the controller ESP8266</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-8-1024x651.png"><img loading="lazy" decoding="async" width="1024" height="651" src="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-8-1024x651.png" alt="" class="wp-image-1077" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-8-1024x651.png 1024w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-8-454x289.png 454w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-8-300x191.png 300w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-8-768x488.png 768w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-8.png 1411w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>

<p class="wp-block-paragraph">Fig. Yaml code validation was successful</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-9-1024x656.png"><img loading="lazy" decoding="async" width="1024" height="656" src="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-9-1024x656.png" alt="" class="wp-image-1078" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-9-1024x656.png 1024w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-9-454x291.png 454w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-9-300x192.png 300w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-9-768x492.png 768w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-9.png 1402w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>

<p class="wp-block-paragraph">Fig. Start compiling the firmware binary for a specific yaml code</p>

<p class="wp-block-paragraph">If the controller is new &#8211; you need to compile and download to the PC a binary firmware bin-file in the ESP Home interface &#8211; click DOWNLOAD BINARY after successful compilation.</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-10-1024x656.png"><img loading="lazy" decoding="async" width="1024" height="656" src="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-10-1024x656.png" alt="" class="wp-image-1079" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-10-1024x656.png 1024w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-10-454x291.png 454w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-10-300x192.png 300w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-10-768x492.png 768w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-10.png 1402w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>

<p class="wp-block-paragraph">Fig. Compilation completed successfully</p>

<p class="wp-block-paragraph">Next you need to write the firmware to the controller (ESP8266 / ESP32). This can be done by means of the ESPHome-Flasher utility. It can be freely found and downloaded via the Internet.</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-11.png"><img loading="lazy" decoding="async" width="711" height="643" src="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-11.png" alt="" class="wp-image-1083" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-11.png 711w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-11-454x411.png 454w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-11-300x271.png 300w" sizes="(max-width: 711px) 100vw, 711px" /></a></figure>

<p class="wp-block-paragraph">Fig. General view of the esphome-flasher utility</p>

<p class="wp-block-paragraph">If the controller has already been flashed with ESP Home &#8211; just fill in the updated firmware over the air via OTA Update. But note that we deliberately do not consider this option to update the firmware, because the purpose of the article is to show how to connect the new GGreg20 with the new ESP8266 to Home Assistant.</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-12-1024x363.png"><img loading="lazy" decoding="async" width="1024" height="363" src="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-12-1024x363.png" alt="" class="wp-image-1084" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-12-1024x363.png 1024w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-12-454x161.png 454w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-12-300x106.png 300w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-12-768x272.png 768w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-12.png 1416w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>

<p class="wp-block-paragraph">Fig. Launch of an alternative procedure for updating the firmware via WiFi-air &#8211; OTA Update</p>

<p class="wp-block-paragraph">After flashing the firmware and restarting the new device, it is recommended to restart the Home Assistant server too.</p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>Important! </strong> After starting the server you need to go to the menu Configuration -&gt; Integration. Find there a new device that we flashed and connect it to the server configuration, if it is not connected automatically.</p></blockquote>

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

<p class="wp-block-paragraph">We&#8217;ve completed the following steps to connect GGreg20 to Home Assistant:</p>

<h5 class="wp-block-heading">Step 5. Select the GPIO pin on the controller that will register the pulses from GGreg20<br/>Step 6. Connect the GGreg20_V3 radiation detector to the ESP8266 controller via the Out connector to the selected GPIO of the controller<br/>Step 7. Build and write firmware for the controller</h5>

<p class="wp-block-paragraph">Next, we look at the following steps in detail &#8211; <a href="https://iot-devices.com.ua/en/pidklyuchennya-sensora-radiacziyi-ggreg20_v3-do-servera-home-assistant-cherez-integracziyu-esp-home-3/">part 3</a> :</p>

<h5 class="wp-block-heading">Step 8. Check the log of the new ESP8266 controller with GGreg20 connected<br/>Step 9. Check for new entities on the server side<br/>Step 10. Add GGreg20 radiation sensor widgets to the Dashboard<br/>Step 11. Add a push notification automation script to the Home Assistant application for crossing thresholds</h5>

<p class="wp-block-paragraph">That&#8217;s all. Good luck!</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Connecting the GGreg20_V3 Radiation Sensor to the Home Assistant Server via ESP Home Integration</title>
		<link>https://iot-devices.com.ua/en/connecting-ggreg20-radiation-sensor-to-home-assistant-server-via-esp-home-integration/</link>
		
		<dc:creator><![CDATA[iot-guru]]></dc:creator>
		<pubDate>Thu, 15 Sep 2022 18:27:42 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[application-note]]></category>
		<category><![CDATA[ESP32]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[ESPHome]]></category>
		<category><![CDATA[GGreg20_V3]]></category>
		<category><![CDATA[Home Assistant]]></category>
		<guid isPermaLink="false">https://iot-devices.com.ua/connecting-the-ggreg20_v3-radiation-sensor-to-the-home-assistant-server-via-esp-home-integration/</guid>

					<description><![CDATA[We offer you the procedure of connecting the GGreg20 Geiger counter (sensor) in combination with the main controller ESP8266 or ESP32 to the Home Assistant server via the ESP Home plug-in. If you already have experience setting up and deploying devices in ESP Home running Home Assistant, you can skip the introductory sections and go [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">We offer you the procedure of connecting the GGreg20 Geiger counter (sensor) in combination with the main controller ESP8266 or ESP32 to the Home Assistant server via the ESP Home plug-in.</p>

<p class="wp-block-paragraph">If you already have experience setting up and deploying devices in ESP Home running Home Assistant, you can skip the introductory sections and go straight to the example of a configuration yaml file that you can use as a basis for your own system and devices.</p>

<p class="wp-block-paragraph">All sample files are working and run on a real-deployed server and controller ESP8266 with a GGreg20 Geiger counter. ESP32 is also supported by ESP Home and on the example of ESP8266, the reader can make a variant of the yaml file for the ESP32 platform. In this publication, we demonstrate how to work with ESP32 in a limited way, because in terms of ESP Home and Home Assistant settings, the ESP8266 and ESP32 platforms are almost the same.</p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>Note</strong> . This publication is suitable for all versions of the ionizing radiation detector manufactured by IoT-devices: GGreg20_V1, GGreg20_V2, GGreg20_V3 </p><p>Since the entire line of these detectors is focused on the SBM-20 tube, all versions of the devices have the same algorithm and coefficients for calculating the power level and dose of ionizing radiation.</p><p>The accuracy of the measurement is affected only by the individual properties of the SBM-20 tube installed in each GGreg20_V3 detector. The specifications of the tube manufacturer indicate a limit range of measurement accuracy of <a href="https://zapadpribor.com/sbm20/" target="_blank" rel="noopener">20%</a> . On practice, this means that two identical GGreg20 devices, but with different SBM-20 tubes, can give results (not more than) with the specified deviation in the number of pulses.</p></blockquote>

<h2 class="wp-block-heading">Steps to connect GGreg20 to Home Assistant</h2>

<p class="wp-block-paragraph">Next, we consider in detail the steps for connecting a detector (sensor) GGreg20. Honestly, we have to cite a lot of text and pictures to explain some important points &#8211; because of this, the publication seems procedural horror. It does not! All these steps are simple, automated and performed in 15-20 minutes.</p>

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

<h4 class="wp-block-heading"><strong>Step 1</strong> . Install (or start) the Home Assistant server</h4>

<p class="wp-block-paragraph">If you already have a server installed, just start it. If you need to deploy the server, we recommend that you review the <a class="rank-math-link" href="https://alterstrategy.com/2021/05/03/home-assistant-server-instructions-for-deploying-to-a-windows-virtual-machine/" target="_blank" rel="noopener">instructions we developed for deploying Home Assistant in a virtual machine running Windows 10</a></p>

<h3 class="wp-block-heading">ESP Home plugin for Home Assistant</h3>

<h4 class="wp-block-heading"><strong>Step 2</strong> . Connect the ESP Home extension for the Home Assistant server via the Supervisor -&gt; Add-on Store menu</h4>

<p class="wp-block-paragraph">The procedure for installing an official plugin, such as ESP Home, in Home Assistant is quite simple. We recommend that you review <a class="rank-math-link" href="https://alterstrategy.com/2021/05/03/home-assistant-server-instructions-for-deploying-to-a-windows-virtual-machine/" target="_blank" rel="noopener">Step 8. Installing the ESP Home Plugin (Option)</a> the instructions mentioned earlier.</p>

<h3 class="wp-block-heading">YAML-config of the new ESP device with GGreg</h3>

<p class="wp-block-paragraph">This is a key part of this publication, which interests us more than any other general data on the preparatory steps of the environment. In steps 3 and 4, we will develop our own config for ESP with GGreg based on real-world examples from our Home Assistant test server.</p>

<h4 class="wp-block-heading"><strong>Step 3.</strong> Download the ready example of a batch yaml-configuration file of the GGreg20_V3 device for ESP8266 from our website</h4>

<p class="wp-block-paragraph">The YAML file is a common text script file in Home Assistant, in this case with instructions for ESP Home, which are used when building the firmware.</p>

<p class="wp-block-paragraph">We have developed such a file for ESP8266 and GGreg20 and posted it on our website for free download and use by anyone who needs to connect GGreg20 to Home Assistant via ESP Home. You can download the file by following this <a href="https://github.com/iotdevicesdev/ggreg20-v3-homeassistant-esphome-example/blob/main/ggreg20_esp8266_esphome.yaml" target="_blank" rel="noopener">link</a> .</p>

<p class="wp-block-paragraph">The full file you just downloaded has the following content:</p>

<p class="wp-block-paragraph"><a href="https://github.com/iotdevicesdev/ggreg20-v3-homeassistant-esphome-example/blob/main/ggreg20_esp8266_esphome.yaml" target="_blank" rel="noopener">Open YAML text</a></p>

<p class="wp-block-paragraph">Let&#8217;s consider the main parts of the ggreg20_esp8266_esphome.yaml file prepared by us.</p>

<p class="wp-block-paragraph">To calculate the value of the ionizing radiation power of microsieverts per hour, use Pulse Counter Sensor &#8211; an API-component of the ESP Home plug-in:</p>

<p class="wp-block-paragraph"><a class="rank-math-link" href="https://esphome.io/components/sensor/pulse_counter.html" target="_blank" rel="noopener">https://esphome.io/components/sensor/pulse_counter.html</a></p>

<p class="wp-block-paragraph">This part of the yaml code is responsible for that:</p>

<pre class="EnlighterJSRAW" data-enlighter-language="yaml" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sensor:
- platform: pulse_counter
 pin: D3
 unit_of_measurement: 'mkSv/Hour'
 name: 'Ionizing Radiation Power'
 count_mode: 
 rising_edge: DISABLE
 falling_edge: INCREMENT
 update_interval: 60s
 accuracy_decimals: 3
 id: my_doze_meter
 filters:
 - sliding_window_moving_average: # 5-minutes moving average (MA5) here
 window_size: 5
 send_every: 5 
 - multiply: 0.0054 # SBM20 tube conversion factor of pulses into mkSv/Hour </pre>

<p class="wp-block-paragraph">To calculate the total radiation dose received in microsieverts, the Integration Sensor, also a component of the ESP Home API, is used:</p>

<p class="wp-block-paragraph"><a href="https://esphome.io/components/sensor/integration.htm" class="rank-math-link" target="_blank" rel="noopener">https://esphome.io/components/sensor/integration.htm</a></p>

<p class="wp-block-paragraph">This part of the yaml code is responsible for that:</p>

<pre class="EnlighterJSRAW" data-enlighter-language="yaml" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">- platform: integration
 name: "Total Ionizing Radiation Dose"
 unit_of_measurement: "mkSv"
 sensor: my_dose_meter # link entity id to the pulse_counter values above
 icon: "mdi:radioactive"
 accuracy_decimals: 5
 time_unit: min # integrate values every next minute
 filters:
 # obtained dose. Converting from mkSv/hour into mkSv/minute: [mkSv/h / 60] OR [mkSv/h * 0.0166666667].
 # if my_dose_meter in CPM, then [0.0054 / 60 minutes] = 0.00009; so CPM * 0.00009 = dose every next minute, mkSv.
 - multiply: 0.0166666667</pre>

<p class="wp-block-paragraph">Also, in order to be able to test the pulse counter without the GGreg20 sensor, a discrete Flash sensor ESP8266 has been added to the configuration &#8211; on the same GPIO0 (D3) as the Pulse Counter &#8211; but another ESP Home API component, GPIO Binary Sensor, is already used:</p>

<p class="wp-block-paragraph"><a href="https://esphome.io/components/binary_sensor/gpio.html" target="_blank" rel="noopener">https://esphome.io/components/binary_sensor/gpio.html</a></p>

<p class="wp-block-paragraph">This part of the yaml code is responsible for that:</p>

<pre class="EnlighterJSRAW" data-enlighter-language="yaml" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">binary_sensor:
 - platform: gpio
 name: "D3 Input Button"
 pin:
 number: 0
 inverted: True
 mode: INPUT_PULLUP</pre>

<p class="wp-block-paragraph">The ESP Home plugin has sufficient documentation for these components with examples, so we will not go into detailed explanations. Where we saw fit, we added comments inside the yaml code.</p>

<h4 class="wp-block-heading"><strong>Step 4.</strong> Create (based on the example) in ESP Home the appropriate yaml configuration file</h4>

<p class="wp-block-paragraph">After downloading the file, we suggest you open it with any text editor and become familiar with its contents.</p>

<p class="wp-block-paragraph">Next, in the interface of the ESP Home plugin on the Home Assistant web page with administrator access rights, you need to create your own yaml file by clicking &#8220;+&#8221; and answering a few initial questions of the wizard.</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-1024x550.png"><img loading="lazy" decoding="async" width="1024" height="550" src="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-1024x550.png" alt="" class="wp-image-1063" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-1024x550.png 1024w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-454x244.png 454w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-300x161.png 300w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-768x412.png 768w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-1536x825.png 1536w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image.png 1676w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>

<p class="wp-block-paragraph">Fig. General view of the ESP Home plugin interface in Home Assistant</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-1-1024x652.png"><img loading="lazy" decoding="async" width="1024" height="652" src="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-1-1024x652.png" alt="" class="wp-image-1065" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-1-1024x652.png 1024w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-1-454x289.png 454w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-1-300x191.png 300w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-1-768x489.png 768w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-1.png 1419w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>

<p class="wp-block-paragraph">Fig. We give the name to our new device</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-2-1024x652.png"><img loading="lazy" decoding="async" width="1024" height="652" src="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-2-1024x652.png" alt="" class="wp-image-1066" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-2-1024x652.png 1024w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-2-454x289.png 454w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-2-300x191.png 300w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-2-768x489.png 768w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-2.png 1417w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>

<p class="wp-block-paragraph">Fig. Choose the right platform according to the type of controller</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-3-1024x651.png"><img loading="lazy" decoding="async" width="1024" height="651" src="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-3-1024x651.png" alt="" class="wp-image-1067" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-3-1024x651.png 1024w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-3-454x289.png 454w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-3-300x191.png 300w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-3-768x488.png 768w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-3.png 1409w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>

<p class="wp-block-paragraph">Fig. Specify the parameters of the WiFi router and password for OTA update</p>

<p class="wp-block-paragraph">After completing the &#8220;wizard&#8221;, a file with the basic parameters that we have already configured appears in the ESP Home interface. Now you need to add to this file the parts that you will find in the <a href="https://github.com/iotdevicesdev/ggreg20-v3-homeassistant-esphome-example/blob/main/ggreg20_esp8266_esphome.yaml" target="_blank" rel="noopener">ggreg20_esp8266_esphome.yaml </a> file.</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-4-1024x651.png"><img loading="lazy" decoding="async" width="1024" height="651" src="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-4-1024x651.png" alt="" class="wp-image-1069" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-4-1024x651.png 1024w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-4-454x289.png 454w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-4-300x191.png 300w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-4-768x488.png 768w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-4.png 1409w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>

<p class="wp-block-paragraph">Fig. Basic configuration for ESP8266 / NodeMCU created by the &#8220;wizard&#8221;.</p>

<p class="wp-block-paragraph">For example, here is a similar initial yaml file for ESP32. As you can see, it is almost no different from the file for ESP8266.</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-5-1024x653.png"><img loading="lazy" decoding="async" width="1024" height="653" src="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-5-1024x653.png" alt="" class="wp-image-1070" srcset="https://iot-devices.com.ua/wp-content/uploads/2021/07/image-5-1024x653.png 1024w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-5-454x289.png 454w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-5-300x191.png 300w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-5-768x490.png 768w, https://iot-devices.com.ua/wp-content/uploads/2021/07/image-5.png 1404w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>

<p class="wp-block-paragraph">Fig. Basic configuration for ESP32 / WROVER that creates a &#8220;wizard&#8221;.</p>

<p class="wp-block-paragraph">If you compile the firmware with such an initial file &#8211; it will work and do the basics &#8211; connect to the server, raise the access point for settings and so on. But such a controller will not perform any application tasks.</p>

<p class="wp-block-paragraph">That&#8217;s why you need the file we developed &#8211; you need to copy the rest of the settings from our file to yours. You can also completely replace the contents of your file with data from ggreg20_esp8266_esphome.yaml, of course, if you have an ESP8266 controller. If you have a different controller &#8211; you need to replace the relevant parts of the file, and leave the rest unchanged.</p>

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

<p class="wp-block-paragraph">We&#8217;ve completed the following steps to connect GGreg20 to Home Assistant:</p>

<h5 class="wp-block-heading">Step 1. Install (or start) the Home Assistant server<br/>Step 2. Connect the ESP Home extension for the Home Assistant server via the Supervisor -&gt; Add-on Store menu<br/>Крок 3. Download the ready example of a batch yaml-configuration file of the GGreg20_V3 device for ESP8266 from our website<br/>Step 4. Create (based on the example) in ESP Home the appropriate yaml configuration file</h5>

<p class="wp-block-paragraph">Next, we consider the following steps in detail:</p>

<p class="wp-block-paragraph"><a href="https://iot-devices.com.ua/en/connecting-ggreg20_v3-radiation-sensor-to-home-assistant-server-via-esp-home-integration-part2/" class="rank-math-link">Part 2:</a></p>

<h5 class="wp-block-heading">Step 5. Select the GPIO pin on the controller that will register the pulses from GGreg20<br/>Step 6. Connect the GGreg20_V3 radiation detector to the ESP8266 controller via the Out connector to the selected GPIO of the controller<br/>Step 7. Build and write firmware for the controller</h5>

<p class="wp-block-paragraph"><a href="https://iot-devices.com.ua/en/pidklyuchennya-sensora-radiacziyi-ggreg20_v3-do-servera-home-assistant-cherez-integracziyu-esp-home-3/" class="rank-math-link">Part 3:</a></p>

<h5 class="wp-block-heading">Step 8. Check the log of the new ESP8266 controller with GGreg20 connected<br/>Step 9. Check for new entities on the server side<br/>Step 10. Add GGreg20 radiation sensor widgets to the Dashboard<br/>Step 11. Add a push notification automation script to the Home Assistant application for crossing thresholds</h5>

<p class="wp-block-paragraph">That&#8217;s all. Good luck!</p>
]]></content:encoded>
					
		
		
			</item>
		<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 loading="lazy" 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 loading="lazy" 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 loading="lazy" 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>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>
