<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.nemeus.fr/index.php?action=history&amp;feed=atom&amp;title=NIS-NH3_Gas_Sensor</id>
		<title>NIS-NH3 Gas Sensor - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.nemeus.fr/index.php?action=history&amp;feed=atom&amp;title=NIS-NH3_Gas_Sensor"/>
		<link rel="alternate" type="text/html" href="https://wiki.nemeus.fr/index.php?title=NIS-NH3_Gas_Sensor&amp;action=history"/>
		<updated>2026-05-21T19:09:06Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.28.2</generator>

	<entry>
		<id>https://wiki.nemeus.fr/index.php?title=NIS-NH3_Gas_Sensor&amp;diff=732&amp;oldid=prev</id>
		<title>Arl: Created page with &quot;&lt;!-- Category:Sensors --&gt;  NH3 Gas Sensor  = General information = {{:NIS Overview}}  = Mechanics = * Dimensions 60 x 95 x 85mm (109mm including...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.nemeus.fr/index.php?title=NIS-NH3_Gas_Sensor&amp;diff=732&amp;oldid=prev"/>
				<updated>2021-10-11T09:34:25Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;!-- &lt;a href=&quot;/index.php/Category:Sensors&quot; title=&quot;Category:Sensors&quot;&gt;Category:Sensors&lt;/a&gt; --&amp;gt;  &lt;a href=&quot;/index.php?title=File:.png&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;File:.png (page does not exist)&quot;&gt;thumb|400px|NH3 Gas Sensor&lt;/a&gt;  = General information = {{:NIS Overview}}  = Mechanics = * Dimensions 60 x 95 x 85mm (109mm including...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!-- [[Category:Sensors]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:.png|thumb|400px|NH3 Gas Sensor]]&lt;br /&gt;
&lt;br /&gt;
= General information =&lt;br /&gt;
{{:NIS Overview}}&lt;br /&gt;
&lt;br /&gt;
= Mechanics =&lt;br /&gt;
* Dimensions 60 x 95 x 85mm (109mm including fixing brackets)&lt;br /&gt;
* 96mm spacing between brackets&lt;br /&gt;
* IP 65&lt;br /&gt;
* Solid ABS &amp;amp; PC material&lt;br /&gt;
&lt;br /&gt;
= NH3 Gas sensor properties =&lt;br /&gt;
&lt;br /&gt;
* 0 to 100ppm ± 8ppm ± 3% (Conditions : 25°C / Hygrometry : 50% / Pression 1013 mbar)&lt;br /&gt;
* Humidity Range 0 to 95% rh non-condensing&lt;br /&gt;
* Sensor Temperature Range -20°C to +50°C&lt;br /&gt;
* Temperature compensation&lt;br /&gt;
&lt;br /&gt;
= Magnetic Switch Protocol description =&lt;br /&gt;
{{:NIS Generic Magnetic Switch Protocol}}&lt;br /&gt;
&lt;br /&gt;
= Radio frames description =&lt;br /&gt;
{{:NIS Generic Application Protocol}}&lt;br /&gt;
&lt;br /&gt;
== Uplink data Frame format ==&lt;br /&gt;
&lt;br /&gt;
The uplink payload contains multiple fields: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;mask&amp;gt;: bit field on 1 byte indicating the presence of other fields. Bit 7 is always to 1 because the mask is never extended on next byte.&lt;br /&gt;
&lt;br /&gt;
bit 0 : indicates the presence of &amp;lt;nb_meas&amp;gt; field.&lt;br /&gt;
&lt;br /&gt;
bit 1 : indicates the presence of &amp;lt;analog_meas&amp;gt; field.&lt;br /&gt;
&lt;br /&gt;
bit 2 : indicates the presence of &amp;lt;voltage&amp;gt; field.&lt;br /&gt;
&lt;br /&gt;
bit 3 : indicates the presence of &amp;lt;internal_temp&amp;gt; field.&lt;br /&gt;
&lt;br /&gt;
bit 4 : is reserved.&lt;br /&gt;
&lt;br /&gt;
bit 5 : indicates the presence of &amp;lt;cause&amp;gt; field.&lt;br /&gt;
&lt;br /&gt;
When bit 0 is not set, it means that other fields are present only once (nb_meas = 1).&lt;br /&gt;
&lt;br /&gt;
if (mask.bit0 == 1) :&lt;br /&gt;
    &amp;lt;nb_meas&amp;gt;: 1 byte containing the number of measurements which follows.&lt;br /&gt;
&lt;br /&gt;
if (mask.bit1 == 1) :&lt;br /&gt;
    &amp;lt;analog_meas&amp;gt;: 2*&amp;lt;nb_meas&amp;gt; bytes containing the analog measure values in ppm. Each measure value is a signed integer on 16 bits in big endian [-32768..+32767].&lt;br /&gt;
&lt;br /&gt;
if (mask.bit2 == 1) :&lt;br /&gt;
    &amp;lt;voltage&amp;gt;: 2*&amp;lt;nb_meas&amp;gt; bytes containing the voltage values measured by the sensor in millivolts. Each voltage value is an unsigned integer on 16 bits in big endian.&lt;br /&gt;
&lt;br /&gt;
if (mask.bit3 == 1)&lt;br /&gt;
   &amp;lt;internal_temp&amp;gt;: 1*&amp;lt;nb_meas&amp;gt; bytes containing the internal temperature values (using MCU internal sensor). Each temperature value is a signed integer on 8 bits in big endian in °C [-128..+127].&lt;br /&gt;
&lt;br /&gt;
if (mask.bit5 == 1) :&lt;br /&gt;
    &amp;lt;cause&amp;gt;: 1 byte containing the cause of the uplink frame. It is a bit field:&lt;br /&gt;
        Bit 0 indicates a periodic measure&lt;br /&gt;
        Bit 1 indicates the high threshold exceeding (analog_meas &amp;gt; high threshold)&lt;br /&gt;
        Bit 2 indicates the high hysteresis exceeding (analog_meas &amp;lt; high threshold - high hysteresis)&lt;br /&gt;
        Bit 3 indicates the low threshold exceeding (analog_meas &amp;lt; low threshold)&lt;br /&gt;
        Bit 4 indicates the low hysteresis exceeding (analog_meas &amp;gt; low threshold + low hysteresis)&lt;br /&gt;
        Bit 5 indicates the measure has been forced manually (with magnetic switch)&lt;br /&gt;
    Usually &amp;lt;cause&amp;gt; field is absent when threshold detections are disabled (periodic measures only)&lt;br /&gt;
&lt;br /&gt;
Thus the uplink frame format is &amp;lt;mask&amp;gt;&amp;lt;nb_meas&amp;gt;&amp;lt;analog_meas1&amp;gt;...&amp;lt;analog_measN&amp;gt;&amp;lt;voltage1&amp;gt;...&amp;lt;voltageN&amp;gt;&amp;lt;internal_temp1&amp;gt;...&amp;lt;internal_tempN&amp;gt;&amp;lt;cause&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Default &amp;lt;mask&amp;gt; value is 0x8A which means that the default frame is &amp;lt;mask&amp;gt;&amp;lt;analog_meas&amp;gt;&amp;lt;internal_temp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some examples (in hexadecimal):&lt;br /&gt;
&lt;br /&gt;
    “8A000113”: the frame indicates one analog measurement of 1ppm, with an internal temperature of 19°C.&lt;br /&gt;
    “8A000E14”: the frame indicates one analog measurement of 14ppm, with an internal temperature of 20°C.&lt;br /&gt;
&lt;br /&gt;
== Downlink Frame format ==&lt;br /&gt;
&lt;br /&gt;
The sensor configuration contains the following fields:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;up_frame_mask&amp;gt;: the mask identifying the different fields present in uplink frames (possible values are described in “Uplink data Frame format” section)&lt;br /&gt;
    &amp;lt;nb_meas_for_tx&amp;gt;: the number of measures required to trigger a transmission (possible values are [1..8]&lt;br /&gt;
    &amp;lt;meas_period&amp;gt;: the period of the measures in &amp;lt;perdiod_unit&amp;gt; seconds(possible values are [600..65535]&lt;br /&gt;
    &amp;lt;period_unit&amp;gt;: the unit of &amp;lt;meas_period&amp;gt; in seconds, the resulting period is &amp;lt;meas_perios&amp;gt;*&amp;lt;period_unit&amp;gt; seconds&lt;br /&gt;
    &amp;lt;mode&amp;gt;: bit field enabling/disabling the measures (threshold detections and periodic measures)&lt;br /&gt;
    &amp;lt;subperiod&amp;gt;: subdivision of period for threshold detection, actual measurement period is (&amp;lt;meas_period&amp;gt;*&amp;lt;period_unit&amp;gt;)/&amp;lt;subperiod&amp;gt; seconds&lt;br /&gt;
    &amp;lt;high_threshold&amp;gt;: value of high threshold&lt;br /&gt;
    &amp;lt;high_hysteresis&amp;gt;: value of high hysteresis&lt;br /&gt;
    &amp;lt;low_threshold&amp;gt;: value of low threshold&lt;br /&gt;
    &amp;lt;low_hysteresis&amp;gt;: value of low hysteresis&lt;br /&gt;
    &amp;lt;pwr_on_duration&amp;gt;: value in ms to wait between sensor power-on and measure reading&lt;br /&gt;
&lt;br /&gt;
It is possible to change the sensor configuration using the Nemeus downlink protocol. The downlink frame must be sent on the MS008 LoRaWAN port (11).&lt;br /&gt;
&lt;br /&gt;
The downlink frame has the following format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cmd&amp;gt;: 1 byte containing WRITE_CFG_CMD=0x02&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mask&amp;gt;: bit field on 1 byte indicating the presence of other fields. Most significant bit (bit7) is always to 1 because the mask is never extended on next byte.&lt;br /&gt;
&lt;br /&gt;
Bit0 indicates the presence of &amp;lt;up_frame_mask&amp;gt; field&lt;br /&gt;
&lt;br /&gt;
Bit1 indicates the presence of &amp;lt;nb_meas_for_tx&amp;gt; field&lt;br /&gt;
&lt;br /&gt;
Bit2 indicates the presence of &amp;lt;meas_period&amp;gt; and &amp;lt;period_unit&amp;gt; fields&lt;br /&gt;
&lt;br /&gt;
Bit3 indicates the presence of &amp;lt;mode&amp;gt; and &amp;lt;subperiod&amp;gt; fields&lt;br /&gt;
&lt;br /&gt;
Bit4 indicates the presence of &amp;lt;high_threshold&amp;gt; and &amp;lt;high_hysteresis&amp;gt; fields&lt;br /&gt;
&lt;br /&gt;
Bit5 indicates the presence of &amp;lt;low_threshold&amp;gt; and &amp;lt;low_hysteresis&amp;gt; fields&lt;br /&gt;
&lt;br /&gt;
Bit6 indicates the presence of &amp;lt;pwr_on_duration&amp;gt; field&lt;br /&gt;
&lt;br /&gt;
If (mask.bit0 == 1):&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;up_frame_mask&amp;gt;: 1 byte containing the uplink frame mask&lt;br /&gt;
&lt;br /&gt;
If (mask.bit1 == 1):&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nb_meas_for_tx&amp;gt;: 1 byte containing the number of measurements required to trigger a transmission&lt;br /&gt;
&lt;br /&gt;
If (mask.bit2 == 1):&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;meas_period&amp;gt;: 2 bytes in little endian (LSB first) containing the period of measurements in &amp;lt;period_unit&amp;gt; seconds&lt;br /&gt;
    &amp;lt;period_unit&amp;gt;: 1 byte containing the unit of &amp;lt;meas_period&amp;gt; in seconds (default value is 1 second)&lt;br /&gt;
&lt;br /&gt;
If (mask.bit3 == 1):&lt;br /&gt;
    RESERVED&lt;br /&gt;
&lt;br /&gt;
If (mask.bit4 == 1):&lt;br /&gt;
    RESERVED&lt;br /&gt;
&lt;br /&gt;
If (mask.bit5 == 1):&lt;br /&gt;
    RESERVED&lt;br /&gt;
&lt;br /&gt;
If (mask.bit6 == 1):&lt;br /&gt;
    RESERVED&lt;br /&gt;
&lt;br /&gt;
Thus the downlink frame format is &amp;lt;cmd&amp;gt;&amp;lt;mask&amp;gt;&amp;lt;up_frame_mask&amp;gt;&amp;lt;nb_meas_for_tx&amp;gt;&amp;lt;meas_period&amp;gt;&amp;lt;period_unit&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Some examples in hexadecimal:&lt;br /&gt;
&lt;br /&gt;
    “028182”: set the &amp;lt;up_frame_mask&amp;gt; to 0x82 =&amp;gt; the next uplink frames will include the &amp;lt;analog_meas&amp;gt; field only&lt;br /&gt;
&lt;br /&gt;
    &amp;quot;028604605401&amp;quot; set &amp;lt;nb_meas_for_tx&amp;gt; to 4, &amp;lt;meas_period&amp;gt; to 21600*&amp;lt;period_unit&amp;gt; seconds, &amp;lt;period_unit&amp;gt; to 1 second&lt;br /&gt;
&lt;br /&gt;
== Power consumption ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Power consumption calculator based on the number of measurements and transmissions.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;/div&gt;</summary>
		<author><name>Arl</name></author>	</entry>

	</feed>