<?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>emulator &#8211; IoT-devices, LLC &#8211; Electronics manufacturer for IoT</title>
	<atom:link href="https://iot-devices.com.ua/en/tag/emulator-en/feed/" rel="self" type="application/rss+xml" />
	<link>https://iot-devices.com.ua/en/</link>
	<description>From modules to complex devices</description>
	<lastBuildDate>Mon, 03 Apr 2023 14:44:24 +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>emulator &#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>Geiger counter emulator of GGreg20_V3 module by means of ESP8266 Part 3: Testing and Conclusion</title>
		<link>https://iot-devices.com.ua/en/geiger-counter-emulator-ggreg20_v3-module-by-means-of-esp8266-part3/</link>
		
		<dc:creator><![CDATA[iot-guru]]></dc:creator>
		<pubDate>Fri, 31 Mar 2023 12:58:07 +0000</pubDate>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[emulator]]></category>
		<category><![CDATA[ESP12.OLED]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[Expressive]]></category>
		<category><![CDATA[Geiger]]></category>
		<category><![CDATA[geiger-counter]]></category>
		<category><![CDATA[GGreg20_V3]]></category>
		<category><![CDATA[GPIO]]></category>
		<category><![CDATA[iot]]></category>
		<category><![CDATA[LUA]]></category>
		<category><![CDATA[NodeMCU]]></category>
		<category><![CDATA[SBM20]]></category>
		<category><![CDATA[tindie]]></category>
		<category><![CDATA[unit test]]></category>
		<guid isPermaLink="false">https://iot-devices.com.ua/?p=2867</guid>

					<description><![CDATA[Testing the emulator After we&#8217;ve built the emulator and programmed the ESP8266, we can test it to make sure it&#8217;s working correctly. Having made the physical diagram and developed and loaded/compiled the Lua code into the controllers, we run the emulator and the main controller to check how our testbed works. As you can see, [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading"><a></a> Testing the emulator</h2>

<p class="wp-block-paragraph">After we&#8217;ve built the emulator and programmed the ESP8266, we can test it to make sure it&#8217;s working correctly.</p>

<p class="wp-block-paragraph">Having made the physical diagram and developed and loaded/compiled the Lua code into the controllers, we run the emulator and the main controller to check how our testbed works.</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2023/01/esp12_oled_we_disp_ggreg20_hwemu-scaled.jpg"><img fetchpriority="high" decoding="async" width="1024" height="768" src="https://iot-devices.com.ua/wp-content/uploads/2023/01/esp12_oled_we_disp_ggreg20_hwemu-1024x768.jpg" alt="" class="wp-image-2589" srcset="https://iot-devices.com.ua/wp-content/uploads/2023/01/esp12_oled_we_disp_ggreg20_hwemu-1024x768.jpg 1024w, https://iot-devices.com.ua/wp-content/uploads/2023/01/esp12_oled_we_disp_ggreg20_hwemu-300x225.jpg 300w, https://iot-devices.com.ua/wp-content/uploads/2023/01/esp12_oled_we_disp_ggreg20_hwemu-768x576.jpg 768w, https://iot-devices.com.ua/wp-content/uploads/2023/01/esp12_oled_we_disp_ggreg20_hwemu-1536x1152.jpg 1536w, https://iot-devices.com.ua/wp-content/uploads/2023/01/esp12_oled_we_disp_ggreg20_hwemu-2048x1536.jpg 2048w, https://iot-devices.com.ua/wp-content/uploads/2023/01/esp12_oled_we_disp_ggreg20_hwemu-454x341.jpg 454w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption>Fig. GGreg20_V3 emulator testbed based on ESP12.OLED (MCU_B) connected to NodeMCU dev.board (MCU_A, not pictured)</figcaption></figure>

<p class="wp-block-paragraph">As you can see, the connection of the emulator is very simple: the micro USB power cable and the pulse output signal wires, and you can also connect the debug console via UART if desired.</p>

<p class="wp-block-paragraph">The following screenshots show the diagnostic data and their measurements. We also show an example of event distribution at the emulator output, that we built to clearly show how the random number generator of the ESP8266 controller works according to our proposed implementation via timers.</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_log_2022-12-01_222323.jpg"><img decoding="async" width="1024" height="631" src="https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_log_2022-12-01_222323-1024x631.jpg" alt="" class="wp-image-2591" srcset="https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_log_2022-12-01_222323-1024x631.jpg 1024w, https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_log_2022-12-01_222323-300x185.jpg 300w, https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_log_2022-12-01_222323-768x473.jpg 768w, https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_log_2022-12-01_222323-454x280.jpg 454w, https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_log_2022-12-01_222323.jpg 1421w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption>Fig. GGreg20_V3 emulator testbed based on ESP12.OLED (MCU_B) connected to NodeMCU dev.board (MCU_A, not pictured)</figcaption></figure>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_distribution_2022-12-01_222323.jpg"><img decoding="async" width="1024" height="397" src="https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_distribution_2022-12-01_222323-1024x397.jpg" alt="" class="wp-image-2593" srcset="https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_distribution_2022-12-01_222323-1024x397.jpg 1024w, https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_distribution_2022-12-01_222323-300x116.jpg 300w, https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_distribution_2022-12-01_222323-768x298.jpg 768w, https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_distribution_2022-12-01_222323-1536x595.jpg 1536w, https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_distribution_2022-12-01_222323-454x176.jpg 454w, https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_distribution_2022-12-01_222323.jpg 1610w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption>Fig. Console output of the emulator (MCU B, left) and main controller (MCU A, right) working together.</figcaption></figure>

<p class="wp-block-paragraph">As we can see, the events that the emulator generates at the output are chaotic, that is, they have a character where a cursory examination does not show a certain graphical pattern.</p>

<p class="wp-block-paragraph">Here is another graph of a test set of 175 events per minute, but in a slightly different format. Note the horizontal axis. The value of the initial sequence numbers of events in the loop are arranged chaotically on this graph, as they happened in reality at the output of the emulator:</p>

<figure class="wp-block-image size-large"><a href="https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_random_distribution_2022-12-07.jpg"><img loading="lazy" decoding="async" width="1024" height="476" src="https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_random_distribution_2022-12-07-1024x476.jpg" alt="" class="wp-image-2595" srcset="https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_random_distribution_2022-12-07-1024x476.jpg 1024w, https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_random_distribution_2022-12-07-300x139.jpg 300w, https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_random_distribution_2022-12-07-768x357.jpg 768w, https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_random_distribution_2022-12-07-454x211.jpg 454w, https://iot-devices.com.ua/wp-content/uploads/2023/01/10-ggreg20_v3_hwemu_esp12_oled_nodemcu_random_distribution_2022-12-07.jpg 1529w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption>Fig. Graphical representation of 175 random events at the emulator output (left axis) and free memory (right axis) of the ESP8266 controller during a 60-second cycle</figcaption></figure>

<p class="wp-block-paragraph">Of course, the verification of true randomness of events is not the goal of this publication and is far beyond its scope. We simply rely on the thesis that the ESP8266 has a hardware true random number generator.</p>

<h2 class="wp-block-heading"><a></a>Known limitations</h2>

<p class="wp-block-paragraph">Among the known limitations of this method of creating a Geiger counter emulator is the memory size of the ESP826 controller, in which we create in a loop the required number of one-shot timers with random times of firing. Each timer, in fact, is a function that takes a certain amount of RAM.</p>

<p class="wp-block-paragraph">When the timers are fired, the memory is immediately released. The execution of the code we developed resembles a spring, which in a cycle once a minute is sharply compressed and slowly uncompressed within the available memory of the controller.</p>

<p class="wp-block-paragraph">Thus, the maximum possible number of events generated by our chosen method of generating random events at the emulator output directly depends on the amount of free RAM and the speed of the controller.</p>

<p class="wp-block-paragraph">Experimentally we found that ESP8266 with NodeMCU firmware and Lua language can confidently generate about 260 events per minute. This is more than enough pulses per minute for the emulator project and the radiation levels it supposedly registers.</p>

<p class="wp-block-paragraph">That is all we planned to tell you about. Now you know our version of how you can make your own Geiger counter emulator, as well as what and who can benefit from such a device. However, if you want to buy a ready-made emulator, you can do it on our website or on Tindie.</p>

<p class="wp-block-paragraph">Site IoT-devices.com.ua: <a href="https://iot-devices.com.ua/en/product/gcemu20_v1-geiger-counter-emulator/">GCcemu20_V1</a></p>

<p class="wp-block-paragraph">tindie.com: <a href="https://www.tindie.com/products/iotdev/gcemu20_v1-geiger-counter-emulator/" target="_blank" rel="noreferrer noopener">GCcemu20_V1</a></p>

<p class="wp-block-paragraph">Overall, building a Geiger counter module emulator can be a fun and educational project. It allows you to simulate the readings of a Geiger counter module without the need for radioactive sources. We hope this guide has been helpful, and we encourage you to experiment with different components and programming techniques to customize your emulator further.</p>

<p class="wp-block-paragraph">The beginning of the article:</p>

<p class="wp-block-paragraph"><a href="https://iot-devices.com.ua/en/geiger-counter-emulator-ggreg20_v3-module-by-means-of-esp8266-part1/">Geiger counter emulator of GGreg20_V3 module by means of ESP8266 Part 1: Introduction and Overview</a></p>

<p class="wp-block-paragraph"><a href="http://%D0%95%D0%BC%D1%83%D0%BB%D1%8F%D1%82%D0%BE%D1%80%20%D0%BB%D1%96%D1%87%D0%B8%D0%BB%D1%8C%D0%BD%D0%B8%D0%BA%D0%B0%20%D0%93%D0%B5%D0%B9%D0%B3%D0%B5%D1%80%D0%B0%20GGreg20_V3%20%D0%B7%D0%B0%D1%81%D0%BE%D0%B1%D0%B0%D0%BC%D0%B8%20ESP8266">Geiger counter emulator of GGreg20_V3 module by means of ESP8266 Part 2 Building the Emulator</a></p>

<p class="wp-block-paragraph">Good luck!</p>

<p class="wp-block-paragraph">IoT-devices LLC Team.</p>

<p class="wp-block-paragraph"> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Geiger counter emulator of GGreg20_V3 module by means of ESP8266 Part 2 Building the Emulator</title>
		<link>https://iot-devices.com.ua/en/geiger-counter-emulator-ggreg20_v3-module-by-means-of-esp8266-part2/</link>
		
		<dc:creator><![CDATA[iot-guru]]></dc:creator>
		<pubDate>Wed, 29 Mar 2023 11:50:27 +0000</pubDate>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[emulator]]></category>
		<category><![CDATA[ESP12.OLED]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[Expressive]]></category>
		<category><![CDATA[Geiger]]></category>
		<category><![CDATA[geiger-counter]]></category>
		<category><![CDATA[GGreg20_V3]]></category>
		<category><![CDATA[GPIO]]></category>
		<category><![CDATA[iot]]></category>
		<category><![CDATA[LUA]]></category>
		<category><![CDATA[NodeMCU]]></category>
		<category><![CDATA[SBM20]]></category>
		<category><![CDATA[tindie]]></category>
		<category><![CDATA[unit test]]></category>
		<guid isPermaLink="false">https://iot-devices.com.ua/?p=2822</guid>

					<description><![CDATA[Geiger counter emulator: what we need To build the Geiger counter module emulator, we&#8217;ll need the following parts and materials: ESP8266 #1 as the main one (MCU_A, NodeMCU module); ESP8266 #2 as GGreg20_V3 emulator (MCU_B, ESP12.OLED module); Jumper wires; USB cable for programming and power. Next, we&#8217;ll need to program the main controller MCU_A and [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading" id="block-786c35cc-31be-43f0-a658-40945e2c73d7">Geiger counter emulator: what we need</h2>

<p class="wp-block-paragraph">To build the Geiger counter module emulator, we&#8217;ll need the following parts and materials:</p>

<ul class="wp-block-list"><li>ESP8266 #1 as the main one (MCU_A, NodeMCU module);</li><li>ESP8266 #2 as GGreg20_V3 emulator (MCU_B, ESP12.OLED module);</li><li>Jumper wires;</li><li>USB cable for programming and power.</li></ul>

<p class="wp-block-paragraph">Next, we&#8217;ll need to program the main controller MCU_A and emulation software script code GGreg20_V3 for MCU_B.</p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>Note 3</strong>. We will give examples in this publication with our own <a href="https://iot-devices.com.ua/en/product/esp12oled-universal-esp8266-mcuboard-oled-en/">ESP12.OLED</a> modules. However, if you do not have an ESP12.OLED module, you can also use an ESP8266-based development board such as the NodeMCU and develop the software yourself, following the examples in the text. If you wish to use an off-the-shelf device please read the rest of this article because we have provided a link to our ready-to-use emulator module which you can buy further on.</p></blockquote>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>Note 4.</strong> In this, as in other publications, we will give examples using the simple and powerful Lua scripting language available in the popular NodeMCU firmware.</p></blockquote>

<h2 class="wp-block-heading" id="block-fa9009c2-5b8c-41b0-bb8a-10108721c789">The budget of the inputs/outputs we need</h2>

<p class="wp-block-paragraph" id="block-72e01d54-951b-4117-8327-b53872654d3a">On the main layout controller, we must define the input/output ports that will perform the task of recording input pulses from the Geiger counter emulator module.</p>

<p class="wp-block-paragraph" id="block-dc43f265-c4cd-4a94-8940-0af029bf502d">On the Geiger counter emulator module we need a bit more ports. Here we need I/O ports: for emulation of output pulses, for RGB LED and for the switch button of the emulator operation mode.</p>

<figure class="wp-block-table"><table><tbody><tr><td><br/></td><td>MCU_A role (Main Contr.)</td><td>MCU_B role (GC emulator)</td></tr><tr><td>1 х GPIO of input pulse counter</td><td>NodeMCU</td><td>&#8211;</td></tr><tr><td>1 х GGreg20_V3 output emulation GPIO</td><td>&#8211;</td><td>ESP12.OLED</td></tr><tr><td>3 х RGB LED GPIO for GGreg20_V3 output pulses indication</td><td>&#8211;</td><td>ESP12.OLED</td></tr><tr><td>1х GPIO of the emulator mode switch button</td><td>&#8211;</td><td>ESP12.OLED</td></tr></tbody></table></figure>

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

<p class="wp-block-paragraph" id="block-c6b2cc85-b3fb-4407-a53a-677106212716">To make the interaction between the main controller and the GGreg20_V3 module emulator look realistic, we suggest taking advantage of the built-in properties of some I/O ports of the ESP12.OLED board and select the following GPIOs on the MCU_B emulator controller:</p>

<ul class="wp-block-list" id="block-f010198d-685b-4fee-b4d6-3e1d8f38aeb3"><li>we recommend using GPIO4/D2 (GPIO D-index in Lua) to emulate the pulse output of GGreg20_V3;</li><li>we can use the Flash button (GPIO0/D3) built into the ESP12.OLED board to switch the emulator operation modes;</li><li>the built-in RGB LED on the ESP12.OLED module takes GPIO14/D5; GPIO12/D6; GPIO13/D7;</li></ul>

<p class="wp-block-paragraph" id="block-2527070a-42a1-48e0-983b-6cfc16e216fc">On the main module of the MCU_A controller we propose to select the following port for the input pulse counter:</p>

<ul class="wp-block-list" id="block-c8feffc1-6e34-42d2-b70e-3b3631fb85fb"><li>GPIO14 / D5.</li></ul>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>Note 5</strong>. We recommend the following materials as background information on port numbering: </p><p>The standard for planning and applying pins was developed by alterstrategy.lab: <a href="https://alterstrategy.com/recommended-pin-use-standard/" target="_blank" rel="noopener">https://alterstrategy.com/recommended-pin-use-standard/</a> </p><p>NodeMCU firmware documentation: <a href="https://nodemcu.readthedocs.io/en/latest/modules/gpio/" target="_blank" rel="noopener">https://nodemcu.readthedocs.io/en/latest/modules/gpio/</a> </p><p>Documentation for the ESP12.OLED module is on the website: <a href="https://iot-devices.com.ua/en/product/esp12oled-universal-esp8266-mcuboard-oled-en/">https://iot-devices.com.ua/en/product/esp12oled-universal-esp8266-mcuboard-oled-en/</a> </p><p>and on Tindie: <a href="https://www.tindie.com/products/iotdev/esp12oled-universal-esp8266096oled-mcu-board/" target="_blank" rel="noopener">https://www.tindie.com/products/iotdev/esp12oled-universal-esp8266096oled-mcu-board/</a></p></blockquote>

<p class="wp-block-paragraph" id="block-0017d8d7-e663-4e4b-8d4e-d20072cdf305">Let&#8217;s update the table with the specific I/O ports we selected:</p>

<figure class="wp-block-table"><table><tbody><tr><td><br/></td><td>MCU_A role</td><td>MCU_B role</td></tr><tr><td>1 х GPIO of input pulse counter</td><td>NodeMCU GPIO14/ D5</td><td>&#8211;</td></tr><tr><td>1 х GGreg20_V3 output emulation GPIO</td><td>&#8211;</td><td>ESP12.OLED GPIO4 / D2</td></tr><tr><td>3 х RGB LED GPIO for GGreg20_V3 output pulses indication</td><td>&#8211;</td><td>ESP12.OLED GPIO14 / D5 GPIO12 / D6 GPIO13 / D7</td></tr><tr><td>1х GPIO of the emulator mode switch button</td><td>&#8211;</td><td>ESP12.OLED GPIO0 / D3</td></tr></tbody></table></figure>

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

<figure class="wp-block-image size-full" id="block-3e816c74-b488-4f9c-af8a-46e7b768c80c"><a href="https://iot-devices.com.ua/wp-content/uploads/2023/01/10-the-esp12.oled-geiger-counter-emulator-and-nodemcu-wiring-diagram.jpg"><img loading="lazy" decoding="async" width="960" height="540" src="https://iot-devices.com.ua/wp-content/uploads/2023/01/10-the-esp12.oled-geiger-counter-emulator-and-nodemcu-wiring-diagram.jpg" alt="" class="wp-image-2587" srcset="https://iot-devices.com.ua/wp-content/uploads/2023/01/10-the-esp12.oled-geiger-counter-emulator-and-nodemcu-wiring-diagram.jpg 960w, https://iot-devices.com.ua/wp-content/uploads/2023/01/10-the-esp12.oled-geiger-counter-emulator-and-nodemcu-wiring-diagram-300x169.jpg 300w, https://iot-devices.com.ua/wp-content/uploads/2023/01/10-the-esp12.oled-geiger-counter-emulator-and-nodemcu-wiring-diagram-768x432.jpg 768w, https://iot-devices.com.ua/wp-content/uploads/2023/01/10-the-esp12.oled-geiger-counter-emulator-and-nodemcu-wiring-diagram-800x450.jpg 800w, https://iot-devices.com.ua/wp-content/uploads/2023/01/10-the-esp12.oled-geiger-counter-emulator-and-nodemcu-wiring-diagram-454x255.jpg 454w" sizes="(max-width: 960px) 100vw, 960px" /></a><figcaption>Fig. Connection of modules using two ESP8266 hardware controllers. As MCU_B &#8211; ESP12.OLED module. As MCU_A &#8211; NodeMCU module.</figcaption></figure>

<h2 class="wp-block-heading" id="block-cb422977-8184-4a88-9c04-66d8e4c95e9d"><br/>Emulator operating modes</h2>

<p class="wp-block-paragraph" id="block-4228e826-79a4-4376-aad4-045e96815dc7">In order for our GGreg20_V3 emulator to be able to simulate operation under conditions of different radiation levels, we propose to implement the possibility to switch the radiation power range, which is as if measured by the device and fed to the pulse output.</p>

<p class="wp-block-paragraph" id="block-4e0350bb-494c-480f-b831-a6e3d0c4b3ce">By pressing the Flash button (D3), the user can alternately switch modes to select the desired one.</p>

<p class="wp-block-paragraph" id="block-8566cf3a-6d34-494a-a1c4-9783454ba6ad">To make the emulator easy to use, the ESP12.OLED&#8217;s RGB LED flashes in different colors that can be easily distinguished by the human eye. Each emulator operating mode has its own color assigned to it. Therefore, when the emulator gives the pulse output a signal about a simulated detection the LED will also blink in the color of the current mode of operation.</p>

<h2 class="wp-block-heading" id="block-63c378b0-b723-4c14-a913-697192337a31">Radiation level ranges</h2>

<p class="wp-block-paragraph" id="block-d791023e-f3f0-4cb0-a8d6-56b4f2d848c6">We propose to implement the emulation of the following ranges of ambient radiation, which MCU_B will simulate:</p>

<p class="wp-block-paragraph" id="block-b19d8848-2821-488d-9731-af30f8d6a932">Mode 0. No pulses (sensor error simulation);</p>

<p class="wp-block-paragraph" id="block-b78e9cf4-f0ce-4bb5-a037-2e465dbc7279">Mode 1. Natural background radiation: 0.1 &#8211; 0.2 µSv/h;</p>

<p class="wp-block-paragraph" id="block-fcdb4d5e-1a51-47d4-b7eb-656d53f9f600">Mode 2. Acceptable level: 0.2 &#8211; 0.3 µSv/h;</p>

<p class="wp-block-paragraph" id="block-2b79a053-b8bb-4548-ad17-d8f31bb58219">Mode 3. Increased level: 0.3 &#8211; 0.6 µSv/hour;</p>

<p class="wp-block-paragraph" id="block-555eda96-59ee-425b-b6bb-29b4d1775ecf">Mode 4. Dangerous level: 0.6 µSv/hour &#8211; 1.5 µSv/hour.</p>

<p class="wp-block-paragraph" id="block-636beefb-1875-4800-b434-371a282b0432">By default, the module will start after applying power, from &#8220;Mode 1&#8221;. We chose this mode as the initial one only because it is convenient when, after applying power, we immediately receive pulses at the level of background radiation.</p>

<p class="wp-block-paragraph" id="block-e688333a-52ff-469c-b8f4-9f9559f976a6">The real GGreg20_V3 module is equipped with a Soviet-made SBM-20 Geiger tube. This tube has the following conversion factor of pulses per minute to microsieverts per hour:</p>

<p class="has-text-align-center wp-block-paragraph" id="block-57d145ae-f971-436c-9dc2-ea5b1f3946aa">μSv per hour = CPM * 0.0057</p>

<p class="wp-block-paragraph" id="block-5f2d88d1-fa2a-4c1c-b998-6c2d35b5188d">Let’s perform the reverse operation to calculate for the radiation ranges the appropriate number of pulses per hour that the emulator would have to generate while operating in a certain mode:</p>

<p class="has-text-align-center wp-block-paragraph" id="block-1a1a2729-0148-4991-a7c5-b8d7190e5969">CPM = μSv per hour/ 0.0057</p>

<p class="wp-block-paragraph" id="block-939c0593-7e19-41fe-940b-0d34f5a5af24">We make a rough calculation so as to form power ranges which do not overlap in value:</p>

<p class="wp-block-paragraph" id="block-a0935c72-ddee-4500-92dd-caa443833e00">Mode 0. 0 CPM;</p>

<p class="wp-block-paragraph" id="block-bfbf37c0-e77a-40bb-a524-aecffb2f5ffc">Mode 1. 18 CPM to 35 CPM;</p>

<p class="wp-block-paragraph" id="block-9b5a7549-1217-4a21-862e-6123d5f1fcc0">Mode 2. 36 CPM to 52 CPM;</p>

<p class="wp-block-paragraph" id="block-a28b6f7b-2535-426d-97c5-289e31330abe">Mode 3. 53 CPM to 105 CPM;</p>

<p class="wp-block-paragraph" id="block-4d52fbd2-bff2-4f66-b1a7-44a17677efb3">Mode 4. від 106 CPM до 264 CPM.</p>

<p class="wp-block-paragraph" id="block-0761ad79-1104-4eb4-8586-2b413119bad9">The correlation of the color of the RGB LED flashes to a certain mode of operation is as follows:</p>

<figure class="wp-block-table"><table><tbody><tr><td><strong>Operation mode</strong></td><td><strong>Flash color</strong></td><td><strong>R</strong></td><td><strong>G</strong></td><td><strong>B</strong></td></tr><tr><td>Mode 0</td><td>no flashes black</td><td>0</td><td>0</td><td>0</td></tr><tr><td>Mode 1</td><td>cyan</td><td>0</td><td>1</td><td>1</td></tr><tr><td>Mode 2</td><td>green</td><td>0</td><td>1</td><td>0</td></tr><tr><td>Mode 3</td><td>red</td><td>1</td><td>0</td><td>0</td></tr><tr><td>Mode 4</td><td>magenta</td><td>1</td><td>0</td><td>1</td></tr></tbody></table></figure>

<p class="wp-block-paragraph">Now we have to write the appropriate Lua-code for the MCU_A role and for the MCU_B role.</p>

<h2 class="wp-block-heading" id="block-f6fa38ba-c4f6-4484-9e32-cb4c380574d4"><strong>Example</strong>. Geiger counter code for the main controller (MCU_A role)</h2>

<p class="wp-block-paragraph" id="block-923bc983-837f-4384-9148-96385e6b3e3b">We take this code from GitHub here:</p>

<p class="wp-block-paragraph"><a href="https://github.com/iotdevicesdev/ggreg20-v3-nodemcu-lua-example" target="_blank" rel="noopener">https://github.com/iotdevicesdev/ggreg20-v3-nodemcu-lua-example</a></p>

<p class="wp-block-paragraph" id="block-0979654a-2651-4027-abcd-2ff33ce599d4">The code from GitHub is completely ready to use. To run the code, you need to download it from the Internet and upload it to the controller, for example to the NodeMCU module, as in our case. You also need to write another Lua-script and load it into the controller as well:</p>

<pre class="wp-block-code"><code>-- filename: mcu_a.lua
-- MCU_A Lua code example
-- Copyright 2022 IoT-devices LLC, Kyiv, Ukraine
dofile('ggreg20_v3_nodemcu_firmware_lua_example.lua')
init(5, 1, 60000)

function snsrUpd()
ma5_rad_lvl, cpm, minutes = read()
print(ma5_rad_lvl, cpm, minutes)
end

snsrUpd_tmr = tmr.create()
snsrUpd_tmr:register(60000, tmr.ALARM_AUTO, function() snsrUpd() end)
snsrUpd_tmr:start()</code></pre>

<h2 class="wp-block-heading" id="block-245d7efc-1d20-42e3-b2d1-14d29e6b7cb1"><strong>Example</strong>. Code for the GGreg20_V3 module emulator (MCU_B role)</h2>

<p class="wp-block-paragraph" id="block-6f398d6f-0323-4900-81bf-fb082b4bb006">The Lua documentation tells us that in high-speed tasks we need to reassign global identifiers to local identifiers, which increases execution speed by a factor of ten. Therefore, we will do it as follows:</p>

<pre class="wp-block-code"><code>local gpio = gpio
local mode = gpio.mode
local trig = gpio.trig
local write = gpio.write
local read = gpio.read
local INT = gpio.INT
local OUTPUT = gpio.OUTPUT
local FLOAT = gpio.FLOAT
local HIGH = gpio.HIGH
local LOW = gpio.LOW
local PULLUP = gpio.PULLUP
local print = print

local tmr = tmr
local create = tmr.create
local now = tmr.now
local delay = tmr.delay
local alarm = tmr.alarm
local ALARM_SINGLE = tmr.ALARM_SINGLE
local ALARM_SEMI = tmr.ALARM_SEMI
local ALARM_AUTO = tmr.ALARM_AUTO
local register = tmr.register
local start = tmr.start
local stop = tmr.stop

local node = node
local heap = node.heap
local random = node.random</code></pre>

<p class="wp-block-paragraph" id="block-02068264-0668-452a-a175-d7f2197ecf05">We also need to configure the GPIOs that will be responsible for their functions (see above):</p>

<pre class="wp-block-code"><code>mode(3,INT,FLOAT)
mode(4,OUTPUT, PULLUP)
write(4, HIGH)</code></pre>

<p class="wp-block-paragraph" id="block-67fa4fe3-dab6-44c3-b317-89d685a65809">To generate pulses that simulate the output interface of GGreg20_V3, we need to randomly run the following function:</p>

<pre class="wp-block-code"><code>local function pulseOut()
	write(4, LOW)
	delay(10)
	write(4, HIGH)
end</code></pre>

<p class="wp-block-paragraph" id="block-76bde581-ad02-443e-9b0e-1b0b5a802151">But in order to fully emulate the Geiger counter, it is not enough to just run <code>pulseOut()</code> a certain number of times per minute. In fact it is more complicated and we need to run<code>pulseOut()</code>, in such a way that the real randomness of the appearance of pulses on the ESP8266 output is performed.</p>

<p class="wp-block-paragraph" id="block-45dc16f8-88b4-48cc-b315-92da5ffdc8af">Given the extensive capabilities of the platform, we could even suggest several ways to implement this functionality, but we will limit ourselves to one of them, the one that, in our opinion, reproduces the pulse randomness of the real Geiger counter module as much as possible.</p>

<p class="wp-block-paragraph" id="block-0b0c2c3e-e7e7-4aaf-a30c-395557aa8674">To do that we need to use a random number generator, which, according to the NodeMCU firmware documentation, is capable of generating real random numbers. The firmware has a ready-made method node.random() for this purpose. <code>node.random().</code></p>

<p class="wp-block-paragraph" id="block-c0c54a29-d8c5-4824-896e-cc3ce2eae785">To distribute a chosen number of pulses chaotically for one minute, we will use timers, which can be created in a theoretically unlimited number:</p>

<pre class="wp-block-code"><code>create():alarm(timer timeout, timer type, callback function)</code></pre>

<p class="wp-block-paragraph" id="block-a4766066-59e9-40ea-9b6e-8cfbb48c83e8">The only limitation is the amount of free RAM of the controller. Experimentally, we found that we can easily create about 260 pulses per minute in this way, which fits into our requirements for the maximum level of virtual radiation that our emulator can reproduce.</p>

<p class="wp-block-paragraph" id="block-cc004032-5661-4186-9c8c-e28b279f3726">Thus, the function that creates random<code>pulseOut(),</code> start timeouts in the loop looks like this</p>

<pre class="wp-block-code"><code>local t_start = 0
local count = 0
local function randGen(pulses)
	for i = 1, pulses do -- pulses
			create():alarm(random(60000), ALARM_SINGLE, 
				function()
						print(heap(), count, i, (now() - t_start)/1000000)
						pulseOut()
				end
			)
	end
end</code></pre>

<p class="wp-block-paragraph" id="block-2b32df03-eab1-4d84-b60f-00e71a4c3ead">Working together, our developed functions <code>randGen(<em>pulses</em>)</code> and <code>pulseOut()</code> create on the ESP8266 output the necessary number of absolutely random pulses of 10 microseconds each per one minute.</p>

<p class="wp-block-paragraph" id="block-70e9c748-19dd-4028-bbb7-5fe1f0280797">We set the number of pulses per minute with the parameter <em><code>pulses</code></em>.</p>

<p class="wp-block-paragraph" id="block-4a90ceb2-c169-4711-9d49-5b43bb34435e">In order for the emulator to work in different power modes of simulated radiation it is necessary to provide a random value of the number of impulses <code><em>pulses</em>,</code> falling as a task at the input of the randGen() function <code>randGen().</code> . This can be done as follows:</p>

<pre class="wp-block-code"><code>radMode = 1
rand_tmr = create()
rand_tmr:register(1000, ALARM_AUTO, 
	function()
		if radMode == 0 and running == 0 then 
			print(heap(), 'Mode0:Snsr Err emu')
			return 0
		end
		local num = 0
		if radMode == 1 then 
			num = random(math.ceil(18),math.ceil(35))
		elseif radMode == 2 then
			num = random(math.ceil(36),math.ceil(52))
		elseif radMode == 3 then
			num = random(math.ceil(53),math.ceil(105))
		elseif radMode == 4 then
			num = random(math.ceil(106),math.ceil(264))
		end
		if num ~= 0 then print('count:',count + 1,'mode:',radMode, 'num:',num); randGen(num) end
	end
)

rand_tmr:start()</code></pre>

<p class="wp-block-paragraph" id="block-e5b05b89-d43b-4a2d-8e18-2bffffe503be">By setting the value of the global variable <em><code>radMode</code></em>, the user can specify one of five modes of ionizing radiation power reproduced at the emulator output.</p>

<p class="wp-block-paragraph" id="block-601d0a86-27e4-4066-a9a4-61d3770b1b94">The last thing we need to provide in the emulator is to switch the radiation power mode using the built-in Flash/GPIO0/D3 button:</p>

<pre class="wp-block-code"><code>trig(3, 'down', 
	function(lvl, ts, cnt)
		if radMode &lt; 4 then radMode = radMode + 1 else radMode = 0 end
		print ('New radMode:', radMode)
	end
)</code></pre>

<h3 class="wp-block-heading" id="block-1b688a62-cea2-48b8-811d-2e5cde4c87b1">Full emulator software code</h3>

<p class="wp-block-paragraph" id="block-be1e5721-a28c-4eb4-9552-eb301bf23577">We don&#8217;t have a ready-made example for this controller role, as was the case with the main controller (MCU_A). So we will write the necessary code from scratch. Here is the minimum required code capable of emulating Geiger counter pulses.</p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>Note 6.</strong> The code in this section is an example. You can download and set up this example yourself in your own Geiger counter emulator, or purchase a ready-to-use hardware module with firmware and fully functional software from our shop or Tindie at the following links:</p><p>IoT-devices.com.ua: <a href="https://iot-devices.com.ua/en/product/gcemu20_v1-geiger-counter-emulator/">GCcemu20_V1</a></p><p>Tindie: <a href="https://www.tindie.com/products/iotdev/gcemu20_v1-geiger-counter-emulator/" target="_blank" rel="noopener">GCcemu20_V1</a></p></blockquote>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>Warning!</strong> This example code has its own limitations and differs significantly from the code we have developed for commercial use and sell as part of the emulator product on our website and other commercial sites.</p></blockquote>

<pre class="wp-block-code"><code>-- filename: mcu_b.lua
-- MCU_B Lua code example
-- Copyright 2022 IoT-devices LLC, Kyiv, Ukraine
local t_start = 0
local count = 0
radMode = 0

local gpio = gpio
local mode = gpio.mode
local trig = gpio.trig
local write = gpio.write
local read = gpio.read
local INT = gpio.INT
local OUTPUT = gpio.OUTPUT
local FLOAT = gpio.FLOAT
local HIGH = gpio.HIGH
local LOW = gpio.LOW
local PULLUP = gpio.PULLUP
local print = print

local tmr = tmr
local create = tmr.create
local now = tmr.now
local delay = tmr.delay
local alarm = tmr.alarm
local ALARM_SINGLE = tmr.ALARM_SINGLE
local ALARM_SEMI = tmr.ALARM_SEMI
local ALARM_AUTO = tmr.ALARM_AUTO
local register = tmr.register
local start = tmr.start
local stop = tmr.stop

local node = node
local heap = node.heap
local random = node.random

mode(3,INT,FLOAT)
mode(4,OUTPUT, PULLUP)
write(4, HIGH)

local function pulseOut()
	write(4, LOW)
	delay(10)
	write(4, HIGH)
end

local function randGen(pulses)
	for i = 1, pulses do -- pulses
			create():alarm(random(60000), ALARM_SINGLE, 
				function()
						print(heap(), count, i, (now() - t_start)/1000000)
						pulseOut()
				end
			)
	end
end

rand_tmr = create()
rand_tmr:register(1000, ALARM_AUTO, 
	function()
		if radMode == 0 and running == 0 then 
			print(heap(), 'Mode0:Snsr Err emu')
			return 0
		end
		local num = 0
		if radMode == 1 then 
			num = random(math.ceil(18),math.ceil(35))
		elseif radMode == 2 then
			num = random(math.ceil(36),math.ceil(52))
		elseif radMode == 3 then
			num = random(math.ceil(53),math.ceil(105))
		elseif radMode == 4 then
			num = random(math.ceil(106),math.ceil(264))
		end
		if num ~= 0 then print('count:',count + 1,'mode:',radMode, 'num:',num); randGen(num) end
	end
)

rand_tmr:start()

trig(3, 'down', 
	function(lvl, ts, cnt)
		if radMode &lt; 4 then radMode = radMode + 1 else radMode = 0 end
		print ('New radMode:', radMode)
	end
)</code></pre>

<p class="wp-block-paragraph">Початок статті: <a href="https://iot-devices.com.ua/en/geiger-counter-emulator-ggreg20_v3-module-by-means-of-esp8266-part1/">Geiger counter emulator of GGreg20_V3 module by means of ESP8266: Part 1. Introduction and Overview </a></p>

<p class="wp-block-paragraph">The conclusion of the article will be in the next publication in a few days:<br/>Geiger counter emulator of GGreg20_V3 module by means of ESP8266: Part 3. Testing and Conclusion</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Geiger counter emulator of GGreg20_V3 module by means of ESP8266</title>
		<link>https://iot-devices.com.ua/en/geiger-counter-emulator-ggreg20_v3-module-by-means-of-esp8266-part1/</link>
		
		<dc:creator><![CDATA[iot-guru]]></dc:creator>
		<pubDate>Mon, 27 Mar 2023 18:55:25 +0000</pubDate>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[emulator]]></category>
		<category><![CDATA[ESP12.OLED]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[Expressive]]></category>
		<category><![CDATA[Geiger]]></category>
		<category><![CDATA[geiger-counter]]></category>
		<category><![CDATA[GGreg20_V3]]></category>
		<category><![CDATA[GPIO]]></category>
		<category><![CDATA[iot]]></category>
		<category><![CDATA[LUA]]></category>
		<category><![CDATA[NodeMCU]]></category>
		<category><![CDATA[SBM20]]></category>
		<category><![CDATA[tindie]]></category>
		<category><![CDATA[unit test]]></category>
		<guid isPermaLink="false">https://iot-devices.com.ua/?p=2799</guid>

					<description><![CDATA[Welcome to our guide on building a hardware-software Geiger counter emulator of GGreg20_V3 module based on ESP8266 This emulator can be useful for testing and tuning Geiger counters or for educational purposes. Let&#8217;s get started! Updated: When writing this article, we decided to make a separate commercial product &#8211; the Geiger counter emulator GCemu20_V1. Part [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Welcome to our guide on building a hardware-software Geiger counter emulator of <a href="https://iot-devices.com.ua/en/product/ggreg20_v3-ionizing-radiation-detector-with-geiger-tube-sbm-20/">GGreg20_V3</a> module based on ESP8266 This emulator can be useful for testing and tuning Geiger counters or for educational purposes. Let&#8217;s get started!</p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>Updated: </strong> When writing this article, we decided to make a separate commercial product &#8211; the Geiger counter emulator <a href="https://iot-devices.com.ua/en/product/gcemu20_v1-geiger-counter-emulator/">GCemu20_V1</a>.</p></blockquote>

<h2 class="wp-block-heading">Part 1: Introduction and Overview</h2>

<p class="wp-block-paragraph">It is known that the Espressif ESP8266 module has a very high quality random number generator. We could not find any official details about the actual implementation of this generator, so we propose to read the material on this subject, published by a radio amateur and saved on the Internet:</p>

<p class="wp-block-paragraph"><a href="https://web.archive.org/web/20170321162556/http://esp8266-re.foogod.com/wiki/Random_Number_Generator" target="_blank" rel="noopener">https://web.archive.org/web/20170321162556/http://esp8266-re.foogod.com/wiki/Random_Number_Generator</a></p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>Warning</strong>. Two different concepts with the same name are used in the text. Historically, there is a NodeMCU hardware module on the market as well as NodeMCU software firmware. </p><p>The NodeMCU firmware is a compilable, open-source microprogram that can be written to hardware modules with Espressif&#8217;s ESP8266 controller. One of the many products based on the ESP8266 controller, is the NodeMCU hardware module. </p><p>Thus the NodeMCU firmware can be written to the NodeMCU hardware module. Later in this article we will try, if possible, to clarify what is meant by the name NodeMCU: module or firmware.</p></blockquote>

<h2 class="wp-block-heading"><a></a>What is a Geiger counter emulator for</h2>

<p class="wp-block-paragraph">Before proceeding to create a Geiger counter emulator, it is necessary to consider what for and who may need such a hardware-software device.</p>

<p class="wp-block-paragraph">The main idea of any emulator in the field of DIY electronics is to temporarily, at certain stages, use a virtual substitute component instead of a real module in the process of IoT device development or experimenting / learning to reproduce the operation and characteristics of a real device with high accuracy. The emulator should simplify and speed up development, as well as add convenience in the initial stages of a planned project or performing unit tests.</p>

<p class="wp-block-paragraph">Below we present some theses explaining our motives for developing the GGreg20_V3 Geiger counter module emulator.</p>

<h3 class="wp-block-heading">1.No high voltage</h3>

<p class="wp-block-paragraph">The GGreg20_V3 emulator, unlike the real module, has no high voltage on the board, so it is very convenient to use when developing on the table without fear of accidental electrocution.</p>

<p class="wp-block-paragraph">At the same time, in terms of the electrical interface of the outgoing pulses, the emulator is a completely similar radiation sensor module, generating random pulses of the same shape and duration as the genuine GGreg20_V3.</p>

<h3 class="wp-block-heading">2. Simplified learning process</h3>

<p class="wp-block-paragraph">The Geiger counter emulator is suitable for educational institutions. The instructor can gradually deepen practical lessons with students.</p>

<p class="wp-block-paragraph">First, all classes can be conducted using safe and cheap Geiger counter emulators, and then with real modules with Geiger tubes and high voltage on the tube side. Just like in the Army: familiarization and training is done first with blank cartridges, and only then with live ones.</p>

<p class="wp-block-paragraph">The emulator fully reproduces the results of the real GGreg20_V3 module, so there is no problem of insufficient number of real modules in the classroom: each student can work with his module independently and complete the learning process without dividing into groups or queues, as it usually happens when resources of training devices and stands in the lab are limited.</p>

<h3 class="wp-block-heading">3. Lower cost</h3>

<p class="wp-block-paragraph">The emulator has a lower cost than the real GGreg20_V3 module, so it is convenient to use it primarily for debugging and harmonizing the circuit or software of the system being designed or studied.</p>

<p class="wp-block-paragraph">Debugging a test bench or a project with such an emulator can be performed without the need for specially qualified personnel.</p>

<p class="wp-block-paragraph">If the emulators are used by students, then the teacher will not need to control the work with the devices, as would be necessary to do with the real Geiger counter module.</p>

<p class="wp-block-paragraph">Low-cost emulators can be purchased in large quantities and given to students for the duration of their studies, not just for the time they work in the school&#8217;s laboratory.</p>

<h3 class="wp-block-heading">4. No real source of radiation is needed</h3>

<p class="wp-block-paragraph">When we work with a real GGreg20_V3, we need a true source of radiation to reproduce the various situations that need to be considered in the software of the measurement system that is being designed or tested. In order to buy a test radiation source, the radio amateur must first solve a number of problems:</p>

<ul class="wp-block-list"><li>to determine by physical and chemical parameters which source is needed;</li><li>to find a supplier and buy a test source;</li><li>some countries require customs notification and an import permit;</li><li>the test source can only be of a certain power;</li><li>you must properly store and dispose of the radioactive source;</li><li>the price of the radiation source and its storage system exceeds many times the price of the Geiger counter.</li></ul>

<p class="wp-block-paragraph">With the emulator, none of these problems will occur. T he device can simulate 5 different modes of ionizing radiation power. The Geiger counter emulator generates output pulses similar to those of the real GGreg20_V3 module in the range from 0 to 1.5 µSv/h (taking the SBM-20 tube as a similar reference). At the output are generated chaotic (using a true random number generator ESP8266) pulses of the same amplitude with a total pulse period of 10 microseconds each.</p>

<h3 class="wp-block-heading">5. Emulator resource cannot be depleted</h3>

<p class="wp-block-paragraph">SBM-20 tube, installed in GGreg20_V3, has a relatively large, but still limited resource of particles, which it can detect during its lifetime.</p>

<p class="wp-block-paragraph">The resource of the SBM-20 tube declared in the documentation is at least 2*10<sup>10</sup> pulses.</p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>Note 1</strong>. With a background radiation of 0.15 μSv/h with a coefficient of 0.0057, the SBM-20 tube detects about 27 pulses per minute.</p></blockquote>

<p class="wp-block-paragraph">Thus, under normal conditions, the resource of the tube will be enough for 2*10<sup>10</sup> / (27 * 60 * 24) = 20 000 000 000 / (26 * 60 * 24) = 514403 days. And it would seem that this is quite a sufficient potential life of one tube.</p>

<p class="wp-block-paragraph">A completely different picture is observed when it comes to operating a tube with a test source of radiation.</p>

<p class="wp-block-paragraph">Here&#8217;s an example:</p>

<p class="wp-block-paragraph">On its website, Images Scientific Instruments provides a list of the radiation limits allowed for import for test sources:</p>

<p class="wp-block-paragraph"><a href="https://www.imagesco.com/geiger/radioactive-sources-int.html" target="_blank" rel="noopener">https://www.imagesco.com/geiger/radioactive-sources-int.html</a></p>

<p class="wp-block-paragraph">Let&#8217;s take two sources from the list at the link:</p>

<ol class="wp-block-list"><li>Co-60 1.00 uCi, 37000 Bq;</li><li>Cs-137 0.25 uCi, 9250 Bq;</li></ol>

<p class="wp-block-paragraph">If we assume that under the influence of such a test source, half of the particles from radioactive decays enter the Geiger tube SBM-20 then the lifetime of such a tube would be:</p>

<ol class="wp-block-list"><li>20 000 000 000 / (37000 / 2 * 60 * 60 * 24) = 12 days (for Co-60);</li><li>20 000 000 000 / (9250 / 2 * 60 * 60 * 24) = 50 days (for Cs-137).</li></ol>

<p class="wp-block-paragraph">As you can see, if we want to experiment (or test our devices that include a Geiger counter) on a real tube, then we deplete its available resource with a true source of radiation rather quickly.</p>

<p class="wp-block-paragraph">There is no such problem with the emulator. Using the emulator first instead of the tube is economically feasible.</p>

<h3 class="wp-block-heading">  6. Debugging data in the UART</h3>

<p class="wp-block-paragraph">The emulator of GGreg20_V3 module outputs operational data (pulses, time, counts, cycles, etc.) to the UART console port during operation, which, if necessary, can be recorded and processed by the student, developer or radio amateur for training or comparison with the measurements of his tested or developed system.</p>

<p class="wp-block-paragraph">Genuine GGreg20_V3 counter modules and similar modules of other manufacturers do not and cannot have such a built-in feature.</p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>Note 2</strong>. To connect to the UART console, the <a href="https://iot-devices.com.ua/product-uk/esp12-oled-komplekt-2-kontroler-iot-bez-displeya-na-osnovi-esp8266-12f/">ESP12.OLED module</a> , on which the emulator is based, has separately led UART interface lines (2.54 mm pitch holes for soldering) on the PCB. To connect the emulator to the computer the user additionally needs to have his own USB-UART converter. Further in the text the connection diagram will be given.</p></blockquote>

<p class="wp-block-paragraph">The article will be continued in the following publications:<br/><a href="https://iot-devices.com.ua/en/?p=2822">Geiger counter emulator of GGreg20_V3 module by means of ESP8266 Part 2 Building the Emulator</a><br/>Geiger counter emulator of GGreg20_V3 module by means of ESP8266 Part 3: Testing and Conclusion</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
