Chapterبەش 5 · Lectureوانە 5.2

Accuracy, Precision, Range: Reading a Sensor's Data Sheetڕاستیی پێوان، وردیی پێوان و مەودای پێوان: خوێندنەوەی پەڕەی تایبەتمەندییەکانی هەستەوەرێک

The numbers that describe how good a sensor is: accuracy and precision with their official (VIM) meanings and the four-target picture, which errors calibration and averaging fix, resolution and why it is not precision, range with the Pt100, sensitivity as a slope, drift and calibration, two real data sheets (TMP36, DHT22), the 14 most used IoT sensors, proximity sensors and a checklist for choosing a sensor.

ئەو ژمارانەی دەڵێن چەند باشە: و بە واتا فەرمییەکانیان ⁦(VIM)⁩ و وێنەی چوار نیشانەکە، ئەو هەڵانەی و تێکڕا چاکیان دەکەن، و بۆچی نییە، بە ⁦Pt100⁩، وەک ، و ، دوو ڕاستەقینە (⁦TMP36⁩، ⁦DHT22⁩)، ⁦14⁩ باوی IoT، و لیستێکی پشکنین بۆ هەڵبژاردنی .

20 min read22 خولەک خوێندنەوە · 19 stepsهەنگاو

What you will learnچی فێر دەبیت

  • Explain accuracy and precision with the VIM definitions and tell them apart on the four-target picture.
  • Explain resolution, range and sensitivity, and compute a sensitivity from two readings.
  • Say which errors calibration can remove, what drift is, and how to calibrate at one or two points.
  • Read the key lines of a real data sheet (TMP36, DHT22): typical and maximum values.
  • Name the most used IoT sensors and choose a sensor for a job with a checklist.
  • و بە پێناسەکانی VIM ڕوون بکەیتەوە و لەسەر وێنەی چوار نیشانەکە لە یەکتریان جیا بکەیتەوە.
  • ، و ڕوون بکەیتەوە و لە دوو خوێندنەوەوە هەژمار بکەیت.
  • بڵێیت کام هەڵانە لا دەبات، چییە و چۆن بە یەک یان دوو خاڵ دەکرێت.
  • دێڕە گرنگەکانی ڕاستەقینە بخوێنیتەوە (⁦TMP36⁩، ⁦DHT22⁩): نرخی ئاسایی و زۆرترین.
  • باوترین IoT ناو ببەیت و بە لیستێکی پشکنین بۆ کارێک هەڵبژێریت.

Two thermometers, two answersدوو گەرماپێو، دوو وەڵام

In a classroom in Duhok, two cheap thermometers hang side by side. One says 24 °C, the other 27 °C. Which one is right — and how right does it need to be? To trust a sensor, or to choose one for a project, you read a few numbers from its data sheet: the maker's document for the part.

لە پۆلێکی دهۆکدا دوو گەرماپێوی هەرزان لە تەنیشت یەکەوە هەڵواسراون. یەکێکیان دەڵێت ⁦24 °C⁩ و ئەوی تر ⁦27 °C⁩. کامیان ڕاستە — و پێویستە چەند ڕاست بێت؟ بۆ متمانەکردن بە ، یان بۆ هەڵبژاردنی یەکێک بۆ پڕۆژەیەک، چەند ژمارەیەک لە دەخوێنیتەوە: ئەو بەڵگەنامەیەی دروستکەر بۆ پارچەکەی نووسیوە.

This lesson explains those numbers one by one — accuracy, precision, resolution, range and sensitivity — then drift and calibration. At the end you read two real data sheets and choose a sensor for a job. The sensors themselves were introduced in Sensors: How Things Feel the World.

ئەم وانەیە ئەو ژمارانە یەک بە یەک ڕوون دەکاتەوە — ، ، ، و — پاشان و . لە کۆتاییدا دوو ڕاستەقینە دەخوێنیتەوە و بۆ کارێک هەڵدەبژێریت. خودی لە هەستەوەرەکان: شتەکان چۆن هەست بە جیهان دەکەنـدا ناسێنران.

Left: a data-sheet card for a temperature sensor with five lines: range −40 to +125 °C, accuracy ±2 °C, repeatability ±0.2 °C, resolution 0.1 °C and sensitivity 10 mV/°C. Arrows from each line point to the question it answers: where does it work, how close to the truth, same answer every time, smallest step it shows, how much does the output move.چەپ: کارتی پەڕەی تایبەتمەندییەکانی هەستەوەری پلەی گەرمییەک بە پێنج دێڕ: مەودای پێوان −40 تا +125 °C، ڕاستیی پێوان ±2 °C، وردیی پێوان ±0.2 °C، توانای جیاکردنەوە 0.1 °C و هەستیاری 10 mV/°C. لە هەر دێڕێکەوە تیرێک دەچێت بۆ ئەو پرسیارەی وەڵامی دەداتەوە: لە کوێدا کار دەکات، چەند نزیکە لە ڕاستی، هەمیشە هەمان وەڵام، بچووکترین هەنگاو کە پیشانی دەدات، دەرخستە چەند دەجووڵێت.
Five lines, five questions.پێنج دێڕ، پێنج پرسیار.CêIT

Accuracy: how close to the truth?ڕاستیی پێوان: چەند نزیکە لە ڕاستی؟

Accuracy is the ability of a measuring instrument to give a result close to the true value of the quantity. The international vocabulary of measurement (VIM, JCGM 200) defines it as the closeness of agreement between a measured value and a true value. A thermometer that shows 25.1 °C in a room that is really at 25.0 °C is accurate; one that shows 27 °C is not.

توانای ئامێرێکی پێوانە بۆ دانی ئەنجامێک کە نزیک بێت لە نرخە ڕاستەقینەکەی بڕەکە. فەرهەنگی نێودەوڵەتیی پێوان (VIM، ⁦JCGM 200⁩) وا پێناسەی دەکات: نزیکیی نێوان نرخێکی پێوراو و نرخێکی ڕاستەقینە. گەرماپێوێک کە لە ژوورێکدا ⁦25.1 °C⁩ پیشان دەدات کە بەڕاستی ⁦25.0 °C⁩ـە ڕاستە؛ ئەوەی ⁦27 °C⁩ پیشان دەدات ڕاست نییە.

Accuracy itself is not a number. A data sheet gives an error limit instead: "±2 °C" means a reading may be up to 2 °C above or below the true temperature. The error is simply the reading minus the true value, and a smaller error means a more accurate sensor.

خۆی ژمارە نییە. لە جیاتی ئەوە سنووری هەڵە دەدات: «⁦±2 °C⁩» واتە خوێندنەوەیەک دەکرێت تا ⁦2 °C⁩ لە سەرووی یان لە خوارەوەی پلەی گەرمیی ڕاستەقینەوە بێت. هەڵە تەنیا خوێندنەوەکەیە کەمکراوە لە نرخە ڕاستەقینەکە و هەڵەی بچووکتر واتە ڕاستتر.

error=reading−true value=27.0 ∘C−25.0 ∘C=+2.0 ∘C\text{error} = \text{reading} - \text{true value} = 27.0\,^\circ\text{C} - 25.0\,^\circ\text{C} = +2.0\,^\circ\text{C}

A positive error means the sensor reads too high.

هەڵەی ئەرێنی واتە زیاتر دەخوێنێتەوە.

A temperature line from 20 to 30 °C. A red line marks the true value, 25.0 °C, and a green band from 23 to 27 °C shows what the data sheet allows, ±2 °C. A blue dot at 25.1 °C: error +0.1 °C, inside the limit. An orange dot at 27.6 °C: error +2.6 °C, outside the limit. Footer: error = reading − true value.هێڵێکی پلەی گەرما لە 20 تا 30 °C. هێڵێکی سوور نرخە ڕاستەقینەکە نیشان دەدات (25.0 °C) و پشتێنەیەکی سەوز لە 23 تا 27 °C ئەوە پیشان دەدات کە پەڕەی تایبەتمەندییەکان ڕێگەی پێ دەدات، ±2 °C. خاڵێکی شین لە 25.1 °C: هەڵە +0.1 °C، لە ناو سنووردا. خاڵێکی پرتەقاڵی لە 27.6 °C: هەڵە +2.6 °C، لە دەرەوەی سنوور. لە خوارەوە: هەڵە = خوێندنەوە − نرخی ڕاستەقینە.
A data sheet's ±2 °C is the band in which every reading must stay.⁦±2 °C⁩ـی ئەو پشتێنەیەیە کە هەموو خوێندنەوەیەک دەبێت تێیدا بمێنێتەوە.CêIT

Precision: the same answer again and againوردیی پێوان: هەمان وەڵام جار لە دوای جار

Precision is the capacity of an instrument to give the same reading when it measures the same quantity again and again under the same conditions. VIM calls it the closeness of agreement between readings obtained by replicate measurements. It says nothing about the truth: it only asks whether the readings agree with each other.

توانای ئامێرێکە بۆ دانی هەمان خوێندنەوە کاتێک هەمان بڕ جار لە دوای جار لە هەمان بارودۆخدا دەپێوێت. VIM پێی دەڵێت نزیکیی نێوان ئەو خوێندنەوانەی لە پێوانی دووپاتەوە دەستدەکەون. هیچ شتێک لەبارەی ڕاستی ناڵێت: تەنیا دەپرسێت ئایا خوێندنەوەکان لەگەڵ یەکتر دەگونجێن.

Example: in a room at exactly 25.0 °C a sensor gives 27.1, 27.0, 27.1, 26.9 and 27.0 °C. The readings agree within 0.2 °C, so the sensor is precise — but every one is about 2 °C too high, so it is not accurate. Data sheets give precision as a spread, often called repeatability, or as a standard deviation (Variance and standard deviation).

نموونە: لە ژوورێکدا کە ڕێک ⁦25.0 °C⁩ـە، ⁦27.1⁩، ⁦27.0⁩، ⁦27.1⁩، ⁦26.9⁩ و ⁦27.0 °C⁩ دەدات. خوێندنەوەکان لە ناو ⁦0.2 °C⁩ـدا یەک دەگرنەوە، بۆیە وردە — بەڵام هەموویان نزیکەی ⁦2 °C⁩ زیاترن، بۆیە ڕاست نییە. وەک بڵاوبوونەوەیەک دەدەن، کە زۆرجار پێی دەوترێت دووپاتەبوونەوە، یان وەک (لێکنەچوون و لادانی پێوانەیی).

A temperature line from 24 to 28 °C. A red line marks the true value, 25.0 °C. Five blue dots sit close together near 27 °C, the readings 27.1, 27.0, 27.1, 26.9 and 27.0. An orange arrow from 25 to 27 says: offset about +2 °C, not accurate. A green note says: spread only 0.2 °C, precise.هێڵێکی پلەی گەرما لە 24 تا 28 °C. هێڵێکی سوور نرخە ڕاستەقینەکە نیشان دەدات، 25.0 °C. پێنج خاڵی شین نزیک لە یەک لە دەوری 27 °Cـدان، خوێندنەوەکانی 27.1، 27.0، 27.1، 26.9 و 27.0. تیرێکی پرتەقاڵی لە 25ەوە بۆ 27 دەڵێت: لادانی نزیکەی +2 °C، ڕاست نییە. تێبینییەکی سەوز دەڵێت: بڵاوبوونەوە تەنیا 0.2 °C، وردە.
Close together, far from the truth: precise but not accurate.نزیک لە یەکتر، دوور لە ڕاستی: ورد، بەڵام ڕاست نییە.CêIT

Precision: the same answer again and againوردیی پێوان: هەمان وەڵام جار لە دوای جار

The four-target pictureوێنەی چوار نیشانەکە

Think of each reading as a dart and the true value as the centre of a target. Precise means the darts land close together; accurate means they land close to the centre.

هەر خوێندنەوەیەک وەک تیرێکی داڕت وێنا بکە و نرخە ڕاستەقینەکە وەک ناوەڕاستی نیشانەیەک. ورد واتە تیرەکان نزیک لە یەک دەکەون؛ ڕاست واتە نزیک لە ناوەڕاست دەکەون.

  1. accurate and precise — a tight group on the centre: the goal;
  2. precise, not accurate — a tight group off to one side: a constant offset;
  3. not precise — darts scattered around the centre: their average may be right (VIM calls that trueness), but single readings are not;
  4. neither — scattered and off the centre.
  1. ڕاست و ورد — گرووپێکی چڕ لەسەر ناوەڕاست: ئامانجەکە؛
  2. ورد، بەڵام ڕاست نییە — گرووپێکی چڕ لە لایەکەوە: لادانێکی جێگیر؛
  3. ورد نییە — تیرەکان لە دەوری ناوەڕاست بڵاو بوونەتەوە: لەوانەیە تێکڕاکەیان ڕاست بێت (VIM پێی دەڵێت ڕاستیی تێکڕا)، بەڵام تاکە خوێندنەوەکان ڕاست نین؛
  4. هیچیان — بڵاو و دوور لە ناوەڕاست.
Four targets with blue darts. 1, accurate and precise: a tight group in the centre. 2, precise, not accurate: a tight group up and to the right. 3, accurate on average, not precise: darts scattered all around the centre. 4, neither: darts scattered and off the centre. Footer: centre = true value; accurate, close to the centre; precise, close to each other.چوار نیشانە بە تیری شین. 1، ڕاست و ورد: گرووپێکی چڕ لە ناوەڕاستدا. 2، ورد، بەڵام ڕاست نییە: گرووپێکی چڕ لە سەرەوە و لای ڕاست. 3، بە تێکڕا ڕاست، بەڵام ورد نییە: تیرەکان لە دەوری ناوەڕاست بڵاو بوونەتەوە. 4، هیچیان: تیرەکان بڵاون و لە ناوەڕاست دوورن. لە خوارەوە: ناوەڕاست = نرخی ڕاستەقینە؛ ڕاست، نزیک لە ناوەڕاست؛ ورد، نزیک لە یەکتر.
Accuracy is about the centre; precision is about the group. لەبارەی ناوەڕاستە؛ لەبارەی گرووپەکەیە.CêIT

Precision: the same answer again and againوردیی پێوان: هەمان وەڵام جار لە دوای جار

Which error can you fix?کام هەڵە چاک دەکرێت؟

The two kinds of error behave differently. A constant offset — the same +2 °C on every reading — is a systematic error. Once you know it you can remove it: subtract 2 °C in the program. Finding that number is what calibration does (Drift and calibration).

دوو جۆرەکەی هەڵە بە دوو شێوەی جیاواز ڕەفتار دەکەن. لادانێکی جێگیر — هەمان ⁦+2 °C⁩ لە هەموو خوێندنەوەیەکدا — هەڵەیەکی سیستەماتیکە. کاتێک زانیت دەتوانیت لای ببەیت: لە ⁦2 °C⁩ کەم بکەرەوە. دۆزینەوەی ئەو ژمارەیە کاری (لادانی هەستەوەر و ڕێکخستنی پێوان).

Scatter — readings jumping up and down — is a random error. No correction removes it, but averaging helps: the average of several readings jumps much less than one reading. If the jumps are random, the average of 4 readings scatters half as much, and of 16 a quarter as much:

بڵاوبوونەوە — خوێندنەوەکان کە سەر و خوار دەکەن — هەڵەیەکی هەڕەمەکییە. هیچ ڕاستکردنەوەیەک لای نابات، بەڵام تێکڕا یارمەتی دەدات: تێکڕای چەند خوێندنەوەیەک زۆر کەمتر لە یەک خوێندنەوە باز دەدات. ئەگەر بازدانەکان هەڕەمەکی بن، تێکڕای 4 خوێندنەوە نیوەی ئەوەندە بڵاو دەبێتەوە و تێکڕای ⁦16⁩ خوێندنەوە چارەکی ئەوەندە:

σaverage=σn\sigma_{\text{average}} = \frac{\sigma}{\sqrt{n}}

σ is the scatter of single readings and n the number of readings averaged.

σ بڵاوبوونەوەی تاکە خوێندنەوەکانە و n ژمارەی ئەو خوێندنەوانەیە کە تێکڕایان وەردەگیرێت.

An animation in six steps with a target on the left. 1, sensor A is precise but not accurate: a tight group of readings, 27.1, 27.0, 27.1, 26.9 and 27.0 °C, up and to the right of the centre, which is the true value 25.0 °C. 2, compare with a reference: a trusted thermometer shows 25.0 °C, sensor A 27.0 °C, so the offset is +2.0 °C. 3, after calibration subtract 2.0 °C: the group moves to the centre, accurate and precise. 4, sensor B shows random scatter: the darts are spread all around the centre and no correction removes this. 5, the average of 4 readings: the group shrinks to half. 6, the average of 16 readings: a quarter. Offset: calibrate; scatter: average.
An animation in six steps with a target on the left. 1, sensor A is precise but not accurate: a tight group of readings, 27.1, 27.0, 27.1, 26.9 and 27.0 °C, up and to the right of the centre, which is the true value 25.0 °C. 2, compare with a reference: a trusted thermometer shows 25.0 °C, sensor A 27.0 °C, so the offset is +2.0 °C. 3, after calibration subtract 2.0 °C: the group moves to the centre, accurate and precise. 4, sensor B shows random scatter: the darts are spread all around the centre and no correction removes this. 5, the average of 4 readings: the group shrinks to half. 6, the average of 16 readings: a quarter. Offset: calibrate; scatter: average.
An offset is removed by calibration; scatter shrinks by averaging.لادان بە لا دەچێت؛ بڵاوبوونەوە بە تێکڕا بچووک دەبێتەوە.CêIT

Resolution: the smallest step you can seeتوانای جیاکردنەوە: بچووکترین هەنگاو کە دەبینرێت

Resolution is the smallest change in the measured quantity that makes the reading change (VIM). A ruler with only centimetre marks cannot show 2 mm; one with millimetre marks can. A display that steps 24, 25, 26 °C has a resolution of 1 °C; one that shows 24.37 °C has 0.01 °C. Resolution is an important line when you select a sensor.

بچووکترین گۆڕانە لە بڕی پێوراودا کە خوێندنەوەکە دەگۆڕێت ⁦(VIM)⁩. ڕاستەیەک کە تەنیا نیشانەی سانتیمەتری هەیە ناتوانێت ⁦2 mm⁩ پیشان بدات؛ ڕاستەیەک بە نیشانەی ملیمەتر دەتوانێت. شاشەیەک کە بە ⁦24⁩، ⁦25⁩، ⁦26 °C⁩ هەنگاو دەنێت ⁦1 °C⁩ـە؛ ئەوەی ⁦24.37 °C⁩ پیشان دەدات ⁦0.01 °C⁩. دێڕێکی گرنگە لە کاتی هەڵبژاردنی .

Two real examples: the DHT11 reports humidity in whole percent (1 % RH), the DHT22 in tenths (0.1 % RH). When a board reads an analog sensor, the step of its converter usually sets the resolution: on an Arduino UNO one step is about 4.9 mV (How big is one step?).

دوو نموونەی ڕاستەقینە: تەنیا وەک دەدات ⁦(1 % RH)⁩ و ⁦DHT22⁩ بە دەیەک ⁦(0.1 % RH)⁩. کاتێک بۆردێک دەخوێنێتەوە، زۆرجار هەنگاوی گۆڕەرەکەی دیاری دەکات: لەسەر UNO یەک هەنگاو نزیکەی ⁦4.9 mV⁩ـە (یەک هەنگاو چەند گەورەیە؟).

Two rulers measure the same pencil. Left: a ruler with centimetre marks only; the pencil ends between 7 and 8, so it reads about 7 cm: resolution 1 cm. Right: a ruler with millimetre marks; it reads 7.3 cm: resolution 1 mm. Footer: humidity too, the DHT11 shows whole percent, 1 % RH, the DHT22 tenths, 0.1 % RH.دوو ڕاستە هەمان قەڵەم دەپێون. چەپ: ڕاستەیەک تەنیا بە نیشانەی سانتیمەتر؛ قەڵەمەکە لە نێوان 7 و 8دا کۆتایی دێت، بۆیە نزیکەی 7 cm دەخوێندرێتەوە: توانای جیاکردنەوە 1 cm. ڕاست: ڕاستەیەک بە نیشانەی ملیمەتر؛ 7.3 cm دەخوێندرێتەوە: توانای جیاکردنەوە 1 mm. لە خوارەوە: بۆ شێ هەروایە، DHT11 وەک ژمارەی تەواو پیشانی دەدات، واتە 1 % RH و DHT22 بە دەیەک، واتە 0.1 % RH.
Finer marks, finer resolution.نیشانەی وردتر، وردتر.CêIT

Resolution: the smallest step you can seeتوانای جیاکردنەوە: بچووکترین هەنگاو کە دەبینرێت

Many digits do not make a good sensorژمارەی زۆری دوای فاریزە هەستەوەرێکی باش دروست ناکات

A finer resolution lets you see smaller changes, but it does not make the sensor precise or accurate. A cheap thermometer can show 24.37 °C while its accuracy is ±2 °C: the true temperature could be anywhere from 22.4 to 26.4 °C, so the last two digits mean nothing. Its readings may also jump by half a degree from one second to the next.

وردتر ڕێگە دەدات گۆڕانی بچووکتر ببینیت، بەڵام ورد یان ڕاست ناکات. گەرماپێوێکی هەرزان دەتوانێت ⁦24.37 °C⁩ پیشان بدات لە کاتێکدا ⁦±2 °C⁩ـە: پلەی گەرمیی ڕاستەقینە دەکرێت لە هەر شوێنێکی نێوان ⁦22.4⁩ و ⁦26.4 °C⁩ـدا بێت، بۆیە دوو ژمارەی کۆتایی هیچ واتایەکیان نییە. لەوانەیە خوێندنەوەکانیشی لە چرکەیەکەوە بۆ چرکەیەکی تر نیو پلە باز بدەن.

So "the higher the resolution, the better the precision" is not true. They are three different questions. Resolution: how small a step can I see? Precision: do repeated readings agree? Accuracy: are they close to the truth? A good habit: write only the digits you can trust, for example 24 °C ± 2 °C (Why we round, decimal places).

بۆیە «هەتا بەرزتر بێت، باشترە» ڕاست نییە. سێ پرسیاری جیاوازن. : چ هەنگاوێکی بچووک دەبینم؟ : خوێندنەوە دووپاتەکان یەک دەگرنەوە؟ : نزیکن لە ڕاستی؟ نەریتێکی باش: تەنیا ئەو ژمارانە بنووسە کە متمانەیان پێ دەکەیت، بۆ نموونە ⁦24 °C ± 2 °C⁩ (بۆچی نزیککردنەوە دەکەین، خانە دەییەکان).

A display shows 24.37 °C, the last two digits faded. Under it: resolution 0.01 °C, accuracy ±2 °C. A temperature line from 21 to 28 °C has an orange band from 22.4 to 26.4 °C around the reading. Footer: the true temperature is somewhere from 22.4 to 26.4 °C; write 24 °C ± 2 °C.شاشەیەک 24.37 °C پیشان دەدات و دوو ژمارەی کۆتایی کاڵ کراونەتەوە. لە ژێریدا: توانای جیاکردنەوە 0.01 °C، ڕاستیی پێوان ±2 °C. هێڵێکی پلەی گەرما لە 21 تا 28 °C پشتێنەیەکی پرتەقاڵیی لە 22.4 تا 26.4 °C لە دەوری خوێندنەوەکە هەیە. لە خوارەوە: پلەی گەرمیی ڕاستەقینە لە شوێنێکی نێوان 22.4 و 26.4 °Cـدایە؛ بنووسە 24 °C ± 2 °C.
Digits beyond the accuracy are only decoration.ئەو ژمارانەی لە وردترن تەنیا ڕازاندنەوەن.CêIT

Range: where the sensor worksمەودای پێوان: ئەو ناوچەیەی هەستەوەرەکە تێیدا کار دەکات

The range is the span between the lowest and the highest value of the quantity that a sensor can really measure; beyond these values there is no useful response. VIM calls it the measuring interval. Ranges differ a lot: a platinum RTD such as the Pt100, which has 100 Ω at 0 °C, measures from about −200 °C to +850 °C (Endress+Hauser, the IEC 60751 range) — from liquid nitrogen to the inside of an industrial oven.

ئەو ناوچەیەیە کە لە نێوان نزمترین و بەرزترین نرخی بڕەکەدایە و بەڕاستی دەتوانێت بیپێوێت؛ لە دەرەوەی ئەم نرخانە هیچ وەڵامێکی بەسوود نییە. VIM پێی دەڵێت ماوەی پێوان. زۆر جیاوازن: پلاتینی وەک ⁦Pt100⁩، کە لە ⁦0 °C⁩ـدا ⁦100 Ω⁩ـە، لە نزیکەی ⁦−200 °C⁩ تا ⁦+850 °C⁩ دەپێوێت (⁦Endress+Hauser⁩، بەپێی ستانداردی ⁦IEC 60751⁩) — لە نایترۆجینی شلەوە تا ناو کورەیەکی پیشەسازی.

Small IoT sensors are much narrower, so read the range line first: the DHT11 measures −20 to +60 °C in its maker's current manual (0–50 °C in older data sheets), the DHT22 −40 to +80 °C and the TMP36 −40 to +125 °C (their data sheets). Choose a range that covers the job with room to spare: a freezer at −18 °C is only 2 °C above the DHT11's lowest value, so it needs another sensor.

بچووکی IoT زۆر تەسکتریان هەیە، بۆیە سەرەتا دێڕی بخوێنەوە: بەپێی ڕێنمایی نوێی دروستکەرەکەی لە ⁦−20⁩ تا ⁦+60 °C⁩ دەپێوێت (لە کۆنەکاندا ⁦0–50 °C⁩)، ⁦DHT22⁩ لە ⁦−40⁩ تا ⁦+80 °C⁩ و ⁦TMP36⁩ لە ⁦−40⁩ تا ⁦+125 °C⁩ (). هەڵبژێرە کە کارەکە بگرێتەوە و هێشتا شوێنی زیادەی هەبێت: سەهۆڵدانێکی ⁦−18 °C⁩ تەنیا ⁦2 °C⁩ لە سەرووی نزمترین نرخی ، بۆیە تری دەوێت.

Top: a temperature axis from −200 to 900 °C with a long green bar, the Pt100 platinum RTD, from about −200 to +850 °C; marks at liquid nitrogen (−196 °C), water boils (100 °C) and a bread oven (250 °C). Below, a zoom from −50 to +150 °C: DHT11 from −20 to +60 °C, DHT22 from −40 to +80 °C and TMP36 from −40 to +125 °C, with red dashed lines at a freezer, −18 °C, and an Erbil summer, 50 °C.سەرەوە: تەوەرەیەکی پلەی گەرما لە −200 تا 900 °C بە شریتێکی سەوزی درێژ، RTDـی پلاتینی Pt100، لە نزیکەی −200 تا +850 °C؛ نیشانە لە نایترۆجینی شل (−196 °C)، کوڵانی ئاو (100 °C) و تەنووری نان (250 °C). لە خوارەوە، نزیکتر لە −50 تا +150 °C: DHT11 لە −20 تا +60 °C، DHT22 لە −40 تا +80 °C و TMP36 لە −40 تا +125 °C، بە هێڵی پچڕپچڕی سوور لە سەهۆڵدانێک (−18 °C) و هاوینی هەولێر (50 °C).
Pick a sensor whose range covers the job. هەڵبژێرە کە کارەکە بگرێتەوە.CêIT

Sensitivity: how much the output movesهەستیاری: دەرخستە چەند دەجووڵێت

Sensitivity is the ratio of a small change in the sensor's output to the small change in its input that caused it — the slope of its graph (VIM: change in indication ÷ change in the measured quantity). The TMP36 has a sensitivity, which its data sheet calls the scale factor, of 10 mV per °C: warm it from 20 °C to 30 °C and its output rises from 0.70 V to 0.80 V.

ڕێژەی گۆڕانێکی بچووکی بۆ ئەو گۆڕانە بچووکەی کە هۆکاری بووە — گرافەکەی (VIM: گۆڕانی نیشاندان ÷ گۆڕانی بڕی پێوراو). ⁦TMP36⁩، کە پێی دەڵێت فاکتەری پێوەر، ⁦10 mV⁩ بۆ هەر °Cـێکە: لە ⁦20 °C⁩ـەوە بۆ ⁦30 °C⁩ گەرمی بکە و لە ⁦0.70 V⁩ـەوە بۆ ⁦0.80 V⁩ بەرز دەبێتەوە.

S=ΔVΔT=0.80 V−0.70 V30 ∘C−20 ∘C=0.10 V10 ∘C=10 mV/∘CS = \frac{\Delta V}{\Delta T} = \frac{0.80\,\text{V} - 0.70\,\text{V}}{30\,^\circ\text{C} - 20\,^\circ\text{C}} = \frac{0.10\,\text{V}}{10\,^\circ\text{C}} = 10\,\text{mV}/^\circ\text{C}

Its whole line is V = 0.5 V + 0.010 V/°C × T, so 0 °C gives 0.50 V and 25 °C gives 0.75 V, the data sheet's 750 mV. Turned around, the line gives the temperature from a voltage. A higher sensitivity gives a bigger signal for the same change, which is easier to measure.

هەموو هێڵەکەی ⁦V = 0.5 V + 0.010 V/°C × T⁩ـە، بۆیە ⁦0 °C⁩ دەبێتە ⁦0.50 V⁩ و ⁦25 °C⁩ دەبێتە ⁦0.75 V⁩، واتە ⁦750 mV⁩ـی . بە پێچەوانەوە، هێڵەکە پلەی گەرمی لە دەدات. بەرزتر بۆ هەمان گۆڕان گەورەتر دەدات کە ئاسانتر دەپێورێت.

T=V−0.5 V0.010 V/∘Ce.g. 0.81 V−0.5 V0.010 V/∘C=31 ∘CT = \frac{V - 0.5\,\text{V}}{0.010\,\text{V}/^\circ\text{C}} \qquad \text{e.g. } \frac{0.81\,\text{V} - 0.5\,\text{V}}{0.010\,\text{V}/^\circ\text{C}} = 31\,^\circ\text{C}

You use this line in the TMP36 sketch of the next lesson.

ئەم هێڵە لە ⁦TMP36⁩ـی وانەی داهاتوودا بەکار دەهێنیت.

A graph of the TMP36's output voltage against temperature from −40 to 125 °C: a straight line from 0.1 V to 1.75 V. Marked points: 0 °C gives 0.50 V and 25 °C gives 0.75 V. A triangle on the line shows ΔT = 40 °C and ΔV = 0.40 V. A box says: sensitivity = ΔV ÷ ΔT = 0.40 V ÷ 40 °C = 10 mV/°C.گرافی ڤۆڵتیەی دەرخستەی TMP36 بەرامبەر بە پلەی گەرما لە −40 تا 125 °C: هێڵێکی ڕاست لە 0.1 Vـەوە تا 1.75 V. خاڵە نیشانکراوەکان: 0 °C دەبێتە 0.50 V و 25 °C دەبێتە 0.75 V. سێگۆشەیەک لەسەر هێڵەکە ΔT = 40 °C و ΔV = 0.40 V پیشان دەدات. خانەیەک دەڵێت: هەستیاری = ΔV ÷ ΔT = 0.40 V ÷ 40 °C = 10 mV/°C.
Sensitivity is the slope: 10 mV for every °C. : ⁦10 mV⁩ بۆ هەر °C.CêIT

Reading a real data sheet: the TMP36خوێندنەوەی پەڕەی تایبەتمەندییەکانی ⁦TMP36⁩

The TMP36 is a small analog temperature sensor. The three-legged (TO-92) part sold for labs is the G grade; a more accurate F grade exists only as a small 8-pin chip. These are lines from its data sheet (Analog Devices) and what each one tells you:

⁦TMP36⁩ بچووکە. ئەو جۆرەی سێ قاچی هەیە ⁦(TO-92)⁩ و بۆ تاقیگە دەفرۆشرێت جۆری Gـیە؛ جۆری F کە ڕاستترە تەنیا وەک بچووکی 8 قاچی هەیە. ئەمانە دێڕگەلێکن لە ⁦(Analog Devices)⁩ و ئەوەی هەریەکەیان پێت دەڵێت:

TMP36 data sheet (Analog Devices), checked November 2026 ⁦TMP36 (Analog Devices)⁩، پشکنراو لە تشرینی دووەمی ⁦2026⁩
Data-sheet lineدێڕی ValueنرخIt tells youپێت دەڵێت
Supply range 2.7–5.5 Vworks on 3.3 V and 5 V boardsلەسەر بۆردی ⁦3.3 V⁩ و ⁦5 V⁩ کار دەکات
Scale factorفاکتەری پێوەر10 mV/°Cthe sensitivity
Output at 25 °C لە ⁦25 °C⁩750 mVone point of its line (0 °C → 500 mV)خاڵێکی هێڵەکەی ⁦(0 °C: 500 mV)⁩
Accuracy at 25 °C لە ⁦25 °C⁩±1 °C typical, ±3 °C max (G grade; F grade ±2 °C)⁦±1 °C⁩ ئاسایی، ⁦±3 °C⁩ زۆرترین (جۆری G؛ جۆری ⁦F ±2 °C⁩)the accuracy near room temperature نزیک لە پلەی گەرمیی ژوور
Accuracy, −40 to +125 °C، ⁦−40⁩ تا ⁦+125 °C⁩±2 °C typical, ±4 °C max (G grade; F grade ±3 °C)⁦±2 °C⁩ ئاسایی، ⁦±4 °C⁩ زۆرترین (جۆری G؛ جۆری ⁦F ±3 °C⁩)the accuracy over the whole range لە هەموو
Linearityهێڵیبوون±0.5 °Chow straight its line isهێڵەکەی چەند ڕاستە
Specified range دیاریکراو−40 to +125 °C (works to +150 °C)⁦−40⁩ تا ⁦+125 °C⁩ (تا ⁦+150 °C⁩ کار دەکات)the range
Supply current سەرچاوەbelow 50 µAکەمتر لە ⁦50 µA⁩very low power; it heats itself by less than 0.1 °Cوزەی زۆر کەم؛ خۆی کەمتر لە ⁦0.1 °C⁩ گەرم دەکات

Typical is what most parts do; max is the maker's promise for every part. Design with the max: a project that needs ±1 °C everywhere cannot rely on a TMP36.

ئاسایی ئەوەیە کە زۆربەی پارچەکان دەیکەن؛ زۆرترین بەڵێنی دروستکەرە بۆ هەموو پارچەیەک. بە زۆرترین دیزاین بکە: پڕۆژەیەک کە لە هەموو شوێنێک پێویستی بە ⁦±1 °C⁩ هەیە ناتوانێت پشت بە ⁦TMP36⁩ ببەستێت.

Reading a real data sheet: the TMP36خوێندنەوەی پەڕەی تایبەتمەندییەکانی ⁦TMP36⁩

A digital sensor: the DHT22 (AM2302) data sheetهەستەوەرێکی دیجیتاڵ: پەڕەی تایبەتمەندییەکانی ⁦DHT22 (AM2302)⁩

The DHT22, also sold as the AM2302, measures humidity and temperature and sends the result as bits. Its data sheet has three numbers that students often mix up, each on its own line:

⁦DHT22⁩، کە بە ناوی ⁦AM2302⁩یش دەفرۆشرێت، و پلەی گەرمی دەپێوێت و ئەنجامەکە وەک دەنێرێت. سێ ژمارەی تێدایە کە قوتابیان زۆرجار تێکەڵیان دەکەن، هەریەکەیان لە دێڕێکی خۆیدا:

AM2302 (DHT22) data sheet, checked November 2026 ⁦AM2302 (DHT22)⁩، پشکنراو لە تشرینی دووەمی ⁦2026⁩
LineدێڕHumidityTemperatureپلەی گەرمی
Range0–100 % RH−40 … +80 °C
Accuracy±2 % RH (max ±5 % RH)⁦±2 % RH⁩ (زۆرترین ⁦±5 % RH⁩)±0.5 °C
Resolution0.1 % RH0.1 °C
Repeatability (precision)دووپاتەبوونەوە ()±1 % RH±0.2 °C
Long-term stability (drift)جێگیریی درێژخایەن ()±0.5 % RH per year⁦±0.5 % RH⁩ لە ساڵێکدا—
Supply, reading time، کاتی خوێندنەوە3.3–5.5 Vone reading every 2 sهەر 2 چرکە جارێک

Read the temperature column: the display steps in 0.1 °C (resolution), repeated readings agree within ±0.2 °C (precision), and the maker promises ±0.5 °C from the truth (accuracy) — three numbers for three questions. The DHT11 of this course's lab has a data sheet of the same shape with wider limits (Temperature and Humidity: the DHT11 and a 16×2 LCD).

ستوونی پلەی گەرمی بخوێنەوە: شاشەکە بە ⁦0.1 °C⁩ هەنگاو دەنێت ()، خوێندنەوە دووپاتەکان لە ناو ⁦±0.2 °C⁩ـدا یەک دەگرنەوە () و دروستکەر بەڵێنی ⁦±0.5 °C⁩ دەدات لە ڕاستییەوە () — سێ ژمارە بۆ سێ پرسیار. تاقیگەی ئەم کۆرسە هەمان شێوەی هەیە بە سنووری فراوانتر (پلەی گەرمی و شێ: ⁦DHT11⁩ و LCDـی ⁦16×2⁩).

A temperature axis from 20.5 to 22.0 °C with 0.1 °C ticks. A wide orange band from 20.8 to 21.8 °C: accuracy ±0.5 °C, the truth is in here. Inside it a smaller blue box with five dots from 21.1 to 21.5 °C: repeatability ±0.2 °C. A blue line marks the reading shown, 21.3. A small double arrow between two ticks: resolution 0.1 °C. Footer: resolution, the step it shows; precision, how readings agree; accuracy, how close to the truth.تەوەرەیەکی پلەی گەرما لە 20.5 تا 22.0 °C بە نیشانەی 0.1 °C. پشتێنەیەکی پرتەقاڵیی پان لە 20.8 تا 21.8 °C: ڕاستیی پێوان ±0.5 °C، ڕاستییەکە لێرەدایە. لە ناویدا سندووقێکی شینی بچووکتر بە پێنج خاڵەوە لە 21.1 تا 21.5 °C: وردیی پێوان ±0.2 °C. هێڵێکی شین ئەو خوێندنەوەیە نیشان دەدات کە پیشان دراوە، 21.3. تیرێکی دوولایەنەی بچووک لە نێوان دوو نیشانەدا: توانای جیاکردنەوە 0.1 °C. لە خوارەوە: توانای جیاکردنەوە، هەنگاوی پیشاندان؛ وردیی پێوان، یەکگرتنەوەی خوێندنەوەکان؛ ڕاستیی پێوان، نزیکی لە ڕاستی.
Resolution 0.1, repeatability ±0.2, accuracy ±0.5: three different numbers. ⁦0.1⁩، ⁦±0.2⁩، ⁦±0.5⁩: سێ ژمارەی جیاواز.CêIT

Drift and calibrationلادانی هەستەوەر و ڕێکخستنی پێوان

Sensors age. Dust, heat, damp air and time slowly change the sensing element, so the reading creeps away from the truth even when the measured thing stays the same. This is drift — VIM: a slow change in the indication caused by changes in the instrument itself. Data sheets give it as long-term stability: the DHT22's humidity reading may drift by ±0.5 % RH a year.

پیر دەبن. تۆز، گەرما، هەوای شێدار و کات وردە وردە پارچە هەستکەرەکە دەگۆڕن، بۆیە خوێندنەوەکە هێواش هێواش لە ڕاستی دوور دەکەوێتەوە، تەنانەت کاتێک ئەو شتەی دەپێورێت وەک خۆی ماوەتەوە. ئەمە — VIM: گۆڕانێکی هێواش لە نیشاندانەکەدا کە هۆکارەکەی گۆڕانی خودی ئامێرەکەیە. وەک جێگیریی درێژخایەن دەینووسن: خوێندنەوەی ⁦DHT22⁩ دەکرێت ساڵانە ⁦±0.5 % RH⁩ لا بدات.

Calibration catches it: compare the sensor's readings with a trusted reference and work out the correction to use from then on. A one-point calibration fixes an offset: in a glass of crushed ice and water (0 °C) your sensor reads 1.2 °C, so the program subtracts 1.2 °C. A two-point calibration, at two known temperatures, also corrects a wrong slope. Many digital sensors are calibrated in the factory, but drift means they need checking again after a year or two.

دەیگرێت: خوێندنەوەکانی لەگەڵ پێوەرێکی متمانەپێکراو بەراورد بکە و ئەو ڕاستکردنەوەیە بدۆزەرەوە کە لەوە بەدواوە بەکاری دەهێنیت. بە یەک خاڵ لادانێکی جێگیر چاک دەکات: لە پەرداخێک سەهۆڵی وردکراو و ئاو ⁦(0 °C)⁩ـدا ⁦1.2 °C⁩ دەخوێنێتەوە، بۆیە ⁦1.2 °C⁩ کەم دەکاتەوە. بە دوو خاڵ، لە دوو پلەی گەرمیی ناسراودا، هەڵەش ڕاست دەکاتەوە. زۆر لە کارگەدا دەکرێن، بەڵام واتە پێویستە دوای ساڵێک یان دوو ساڵ دووپاتە بپشکنرێنەوە.

A graph of a humidity reading over 24 months. A red dashed line: the true humidity, 50 %. A blue line starts at 50 % and climbs slowly to 50.5 % at month 12. A box at month 12 says: calibration, correction −0.5 % RH, and a green arrow brings the reading back to 50 %. After that, a green line climbs again to 50.5 % at month 24, while a dashed blue line, not calibrated, reaches 51 %. Footer: DHT22 data sheet, long-term stability ±0.5 % RH per year.گرافی خوێندنەوەیەکی شێ بە درێژایی 24 مانگ. هێڵێکی سووری پچڕپچڕ: شێی ڕاستەقینە، 50 %. هێڵێکی شین لە 50 %ـەوە دەست پێ دەکات و هێواش هێواش بەرز دەبێتەوە بۆ 50.5 % لە مانگی 12. خانەیەک لە مانگی 12 دەڵێت: ڕێکخستنی پێوان، ڕاستکردنەوە −0.5 % RH. تیرێکی سەوز خوێندنەوەکە دەگەڕێنێتەوە بۆ 50 %. دوای ئەوە هێڵێکی سەوز دیسان بەرز دەبێتەوە بۆ 50.5 % لە مانگی 24، لە کاتێکدا هێڵێکی شینی پچڕپچڕ، بێ ڕێکخستنی پێوان، دەگاتە 51 %. لە خوارەوە: پەڕەی تایبەتمەندییەکانی DHT22، جێگیریی درێژخایەن ±0.5 % RH لە ساڵێکدا.
Drift creeps; calibration resets. هێواش دەڕوات؛ دەیگەڕێنێتەوە.CêIT

The 14 most used IoT sensors⁦14⁩ هەستەوەری باوی IoT

A popular list of the sensors that IoT devices use most, with one typical job for each:

لیستێکی ناسراوی ئەو ئامێرەکانی IoT زۆرتر بەکاریان دەهێنن، لەگەڵ کارێکی ئاسایی بۆ هەریەکەیان:

Fourteen tiles with an icon, a name and a typical job: accelerometer, steps, tilt, crashes; air quality, CO₂ and dust indoors; biomedical, heart rate, oxygen; camera, plates, crops, counting; chemical, gas leaks, water quality; electric current, the energy use of a machine; flow, water or fuel in a pipe; gyroscope, turning in phones and drones; humidity, greenhouses and stores; level, water in a tank; motion (PIR), someone walked in; pressure, tyres, weather, pipes; proximity, near without touching; temperature, almost everywhere.چواردە خانە بە وێنۆچکە، ناو و کارێکی ئاسایی: ئەکسێلەرۆمیتەر، هەنگاو، لاربوونەوە، پێکدادان؛ جۆریی هەوا، CO₂ و تۆز لە ژووردا؛ پزیشکی، لێدانی دڵ، ئۆکسجین؛ کامێرا، ژمارەی ئۆتۆمبێل، کشتوکاڵ، ژماردن؛ کیمیایی، دزەی غاز، جۆریی ئاو؛ تەزوو، بەکارهێنانی وزەی ئامێرێک؛ ڕەوت، ئاو یان سووتەمەنی لە بۆرییەکدا؛ جایرۆسکۆپ، سووڕانەوە لە مۆبایل و درۆنەکاندا؛ شێ، سەوزەخانە و کۆگا؛ ئاست، ئاو لە تانکێکدا؛ جووڵە (PIR)، کەسێک هاتە ژوورەوە؛ پەستان، تایە، کەشوهەوا، بۆری؛ نزیکی، نزیک بەبێ دەستلێدان؛ پلەی گەرما، نزیکەی لە هەموو شوێنێک.
Fourteen sensors, one typical job each.چواردە ، هەریەکەیان کارێکی ئاسایی.CêIT

Several of them measure the same thing in different ways: the accelerometer, the gyroscope and the PIR motion sensor all notice movement. Most of these work as analog or digital sensors exactly as in Analog or digital output?.

چەند دانەیەکیان هەمان شت بە شێوەی جیاواز دەپێون: ، و هەموویان هەست بە جووڵە دەکەن. زۆربەیان وەک یان کار دەکەن ڕێک وەک دەرخستەی ئەنالۆگ یان دیجیتاڵ؟.

The 14 most used IoT sensors⁦14⁩ هەستەوەری باوی IoT

Biomedical sensors: one night, many sensorsهەستەوەرەکانی پزیشکی: شەوێک، چەندین هەستەوەر

A sleep study in a hospital shows biomedical sensors working together. While the patient sleeps, electrodes on the scalp record brain activity and electrodes on the legs record muscle movements; a belt around the chest records breathing, a thin tube under the nose measures the airflow, a clip on a finger measures the oxygen level and a microphone records snoring. Together they show, for example, whether breathing stops during the night.

لێکۆڵینەوەی خەو لە نەخۆشخانەدا پزیشکی پیشان دەدات کە پێکەوە کار دەکەن. تا نەخۆشەکە دەخەوێت، ئەلیکترۆدەکانی سەر چالاکیی مێشک تۆمار دەکەن و ئەلیکترۆدەکانی قاچ جووڵەی ماسوولکە؛ پشتێنێک لە دەوری سنگ هەناسەدان تۆمار دەکات، بۆرییەکی باریک لە ژێر لووتەوە ڕەوتی هەوا دەپێوێت، گیرەیەک لەسەر پەنجە ئاستی ئۆکسجین دەپێوێت و پرخە تۆمار دەکات. پێکەوە پیشان دەدەن، بۆ نموونە، ئایا هەناسەدان لە شەودا دەوەستێت.

The same kinds of sensors, much smaller, sit in smartwatches and fitness bands (Fitness, health and wearable electronics).

هەمان جۆرەکانی ، زۆر بچووکتر، لە کاتژمێری هۆشمەند و بازنەی وەرزشیدا هەن (وەرزش، تەندروستی و ئەلیکترۆنیاتی لەبەرکراو).

A sleeper lies on a bed under a blanket, drawn as simple shapes. Red dots with labels mark the sensors: scalp electrodes, brain activity; a microphone on a stand, snoring; a chest belt, breathing; a tube under the nose, airflow; a finger clip, oxygen level; leg electrodes, muscle movements. Footer: together the readings show, for example, whether breathing stops in the night.کەسێک لەسەر جێگایەک لە ژێر بەتانییەکدا خەوتووە، بە شێوەی سادە کێشراوە. خاڵی سوور بە ناونووسەوە هەستەوەرەکان نیشان دەدەن: ئەلیکترۆدی سەر، چالاکیی مێشک؛ مایکێک لەسەر پایەیەک، پرخە؛ پشتێنی سنگ، هەناسەدان؛ بۆرییەکی ژێر لووت، ڕەوتی هەوا؛ گیرەی پەنجە، ئاستی ئۆکسجین؛ ئەلیکترۆدی قاچ، جووڵەی ماسوولکە. لە خوارەوە: خوێندنەوەکان پێکەوە پیشان دەدەن، بۆ نموونە، ئایا هەناسەدان لە شەودا دەوەستێت.
Six biomedical sensors on one sleeper.شەش پزیشکی لەسەر یەک کەس.CêIT

The 14 most used IoT sensors⁦14⁩ هەستەوەری باوی IoT

Proximity sensors: near, without touchingهەستەوەرەکانی نزیکی: نزیک، بەبێ دەستلێدان

A proximity sensor detects that an object is near, or present, without touching it. It sends out a field or a beam and watches for a change. Which kind you choose depends on the target:

هەست دەکات تەنێک نزیکە، یان هەیە، بەبێ ئەوەی دەستی لێ بدات. بوارێک یان تیشکێک دەنێرێت و چاوەڕێی گۆڕانێک دەکات. ئەوەی کام جۆر هەڵدەبژێریت پەیوەستە بە ئامانجەکەوە:

  • inductive — a magnetic field; it notices only metal, so factories use it to count metal parts or check that a machine part is in place;
  • capacitive — notices almost any material, even water or a finger through plastic;
  • infrared — a small light and a detector; a phone uses one to switch its screen off at your ear;
  • ultrasonic — sound and its echo, as in parking sensors.
  • ئیندەکتیڤ — بوارێکی موگناتیسی؛ تەنیا هەست بە کانزا دەکات، بۆیە کارگەکان بەکاری دەهێنن بۆ ژماردنی پارچە کانزاییەکان یان پشکنینی ئەوەی کە پارچەیەکی ئامێرەکە لە شوێنی خۆیدایە؛
  • کاپاسیتیڤ — هەست بە نزیکەی هەموو کەرەستەیەک دەکات، تەنانەت ئاو یان پەنجەیەک لە پشت پلاستیکەوە؛
  • — ڕووناکییەکی بچووک و دۆزەرەوەیەک؛ مۆبایل یەکێکی بەکار دەهێنێت بۆ کوژاندنەوەی شاشەکەی لە نزیک گوێت؛
  • سەروودەنگی — دەنگ و دەنگدانەوەکەی، وەک لە پارککردندا.

The inductive sensor in the photo has an 18 mm screw thread so it can be fixed into a machine, and it notices metal up to 8 mm away.

ئەو ئیندەکتیڤەی ناو وێنەکە پێچێکی ⁦18 mm⁩ـی هەیە بۆ ئەوەی لە ئامێرێکدا جێگیر بکرێت و هەست بە کانزا دەکات تا ⁦8 mm⁩ دوور.

Choosing a sensor: a checklistهەڵبژاردنی هەستەوەرێک: لیستێکی پشکنین

Put the numbers together. A greenhouse near Halabja must stay between 18 and 30 °C, and the farmer wants readings within ±1 °C:

ژمارەکان پێکەوە دابنێ. سەوزەخانەیەک نزیک هەڵەبجە دەبێت لە نێوان ⁦18⁩ و ⁦30 °C⁩ـدا بمێنێتەوە و جووتیارەکە خوێندنەوەی دەوێت کە لە ناو ⁦±1 °C⁩ـدا بێت:

  1. Range — does it cover the job with room to spare? DHT11 −20 to +60 °C ✓, DHT22 −40 to +80 °C ✓, TMP36 ✓.
  2. Accuracy — good enough? DHT11 ±2 °C ✗, TMP36 ±3 °C max at 25 °C ✗, DHT22 ±0.5 °C ✓.
  3. Resolution — fine enough to see the changes that matter? DHT22 0.1 °C ✓.
  4. Supply — 3.3–5.5 V works on the UNO and the MKR WAN 1310 (5 V boards and 3.3 V boards).
  5. Speed, power, price and size — one reading every 2 s is plenty for a greenhouse.
  1. — کارەکە دەگرێتەوە و شوێنی زیادەی هەیە؟ ⁦−20⁩ تا ⁦+60 °C⁩ ✓، ⁦DHT22 −40⁩ تا ⁦+80 °C⁩ ✓، ⁦TMP36⁩ ✓.
  2. — بەسە؟ ⁦±2 °C⁩ ✗، ⁦TMP36 ±3 °C⁩ زۆرترین لە ⁦25 °C⁩ ✗، ⁦DHT22 ±0.5 °C⁩ ✓.
  3. — ئەوەندە وردە کە گۆڕانە گرنگەکان ببینێت؟ ⁦DHT22 0.1 °C⁩ ✓.
  4. — ⁦3.3⁩ تا ⁦5.5 V⁩ لەسەر UNO و ⁦MKR WAN 1310⁩ کار دەکات (بۆردەکانی ⁦5 V⁩ و بۆردەکانی ⁦3.3 V⁩).
  5. خێرایی، وزە، نرخ و قەبارە — هەر 2 چرکە خوێندنەوەیەک بۆ سەوزەخانەیەک زۆرە.
A comparison table for a greenhouse at 18–30 °C within ±1 °C, with three columns: DHT11, TMP36 and DHT22, the last one highlighted. Range covers 18–30 °C: all three yes. Accuracy within ±1 °C: DHT11 ±2 °C no, TMP36 ±3 °C no, DHT22 ±0.5 °C yes. Resolution fine enough: DHT11 0.1 or 1 °C depending on the version, borderline, TMP36 set by the ADC, DHT22 0.1 °C yes. Works on 3.3 V and 5 V: all yes. Bottom: choose the DHT22 for this job; also check speed, power, price, size.خشتەیەکی بەراوردکاری بۆ سەوزەخانەیەک لە 18 تا 30 °C بە ±1 °C، بە سێ ستوون: DHT11، TMP36 و DHT22، کە دوایینیان دیار کراوە. مەودای پێوان 18 تا 30 °C دەگرێتەوە: هەر سێکیان بەڵێ. ڕاستیی پێوان لە ناو ±1 °C: DHT11 ±2 °C نەخێر، TMP36 ±3 °C نەخێر، DHT22 ±0.5 °C بەڵێ. توانای جیاکردنەوە بەسە: DHT11 بەپێی وەشانەکەی 0.1 یان 1 °C، لەسەر سنوورە، TMP36 بە ADC دیاری دەکرێت، DHT22 0.1 °C بەڵێ. لەسەر 3.3 V و 5 V کار دەکات: هەموویان بەڵێ. لە خوارەوە: بۆ ئەم کارە DHT22 هەڵبژێرە؛ هەروەها خێرایی، وزە، نرخ و قەبارە بپشکنە.
The checklist picks the DHT22 for this greenhouse.لیستی پشکنینەکە ⁦DHT22⁩ بۆ ئەم سەوزەخانەیە هەڵدەبژێرێت.CêIT

Common mistakesهەڵە باوەکان

MistakeهەڵەBetterباشتر
Accurate and precise mean the same.ڕاست و ورد هەمان واتایان هەیە.Accurate: close to the truth. Precise: close to each other.ڕاست: نزیک لە ڕاستی. ورد: نزیک لە یەکتر.
More digits on the display mean a better sensor.ژمارەی زیاتر لەسەر شاشە واتە باشتر.Resolution only shows small steps; check the accuracy line. تەنیا هەنگاوی بچووک پیشان دەدات؛ دێڕی بپشکنە.
"The higher the resolution, the better the precision."«هەتا بەرزتر بێت، باشترە.»Three different questions: smallest step, agreement, truth.سێ پرسیاری جیاواز: بچووکترین هەنگاو، یەکگرتنەوە، ڕاستی.
Averaging fixes every error.تێکڕا هەموو هەڵەیەک چاک دەکات.Averaging reduces random scatter; a constant offset needs calibration.تێکڕا بڵاوبوونەوەی هەڕەمەکی کەم دەکاتەوە؛ لادانی جێگیر پێویستی بە هەیە.
Calibrating once, forever. یەک جار، بۆ هەمیشە.Sensors drift; check them again, for example every year. لادەدەن؛ دووپاتە بیانپشکنەوە، بۆ نموونە هەموو ساڵێک.
Designing with the typical value.دیزاینکردن بە نرخی ئاسایی.Use the maximum, the maker's promise.زۆرترین بەکار بهێنە، بەڵێنی دروستکەر.
Using a sensor outside its range.بەکارهێنانی لە دەرەوەی .Pick a range that covers the job with room to spare. هەڵبژێرە کە کارەکە بگرێتەوە و شوێنی زیادەی هەبێت.
Reading the scale factor as the accuracy.خوێندنەوەی فاکتەری پێوەر وەک .Scale factor is the sensitivity: mV per °C.فاکتەری پێوەر : mV بۆ هەر °C.

Exercisesڕاهێنانەکان

ExerciseڕاهێنانPrecise or accurate?ورد یان ڕاست؟

In a room at 25.0 °C a sensor reads 24.6, 24.9, 24.7, 24.8 and 24.5 °C. Work out the average, the offset and the spread (largest minus smallest). Is it precise? Is it accurate within ±0.5 °C?

لە ژوورێکی ⁦25.0 °C⁩ـدا ⁦24.6⁩، ⁦24.9⁩، ⁦24.7⁩، ⁦24.8⁩ و ⁦24.5 °C⁩ دەخوێنێتەوە. تێکڕا، لادان و بڵاوبوونەوە (گەورەترین کەم بچووکترین) بدۆزەرەوە. وردە؟ لە ناو ⁦±0.5 °C⁩ـدا ڕاستە؟

Show answerوەڵامەکە پیشان بدە
average=24.6+24.9+24.7+24.8+24.55=123.55=24.70 ∘Coffset=24.70−25.0=−0.30 ∘Cspread=24.9−24.5=0.4 ∘C\begin{aligned} \text{average} &= \frac{24.6 + 24.9 + 24.7 + 24.8 + 24.5}{5} = \frac{123.5}{5} = 24.70\,^\circ\text{C} \\ \text{offset} &= 24.70 - 25.0 = -0.30\,^\circ\text{C} \\ \text{spread} &= 24.9 - 24.5 = 0.4\,^\circ\text{C} \end{aligned}

Fairly precise (spread 0.4 °C) and, on average, 0.3 °C too low: inside ±0.5 °C, so accurate enough for that limit. A one-point calibration (+0.3 °C) would make it better.

تا ڕادەیەک وردە (بڵاوبوونەوە ⁦0.4 °C⁩) و بە تێکڕا ⁦0.3 °C⁩ کەمتر دەخوێنێتەوە: لە ناو ⁦±0.5 °C⁩ـدایە، بۆیە بۆ ئەو سنوورە بە ئەندازەی پێویست ڕاستە. بە یەک خاڵ ⁦(+0.3 °C)⁩ باشتری دەکات.

ExerciseڕاهێنانSensitivity from two pointsهەستیاری لە دوو خاڵەوە

A pressure sensor gives 0.50 V at 0 kPa and 4.50 V at 100 kPa, on a straight line. What is its sensitivity, and what pressure does 2.10 V mean?

پەستان لە ⁦0 kPa⁩ـدا ⁦0.50 V⁩ و لە ⁦100 kPa⁩ـدا ⁦4.50 V⁩ دەدات، لەسەر هێڵێکی ڕاست. چەندە و ⁦2.10 V⁩ واتای چ پەستانێکە؟

Show answerوەڵامەکە پیشان بدە
S=4.50 V−0.50 V100 kPa=0.040 V/kPa=40 mV/kPap=2.10 V−0.50 V0.040 V/kPa=40 kPa\begin{aligned} S &= \frac{4.50\,\text{V} - 0.50\,\text{V}}{100\,\text{kPa}} = 0.040\,\text{V/kPa} = 40\,\text{mV/kPa} \\ p &= \frac{2.10\,\text{V} - 0.50\,\text{V}}{0.040\,\text{V/kPa}} = 40\,\text{kPa} \end{aligned}
ExerciseڕاهێنانChoose for a freezerبۆ سەهۆڵدانێک هەڵبژێرە

A shop freezer runs at −18 °C and must be logged within ±1 °C. Which of the DHT11, the TMP36 and the DHT22 fits, and why?

سەهۆڵدانی دووکانێک لە ⁦−18 °C⁩ـدا کار دەکات و دەبێت لە ناو ⁦±1 °C⁩ـدا تۆمار بکرێت. کام لە ، ⁦TMP36⁩ و ⁦DHT22⁩ دەگونجێت و بۆچی؟

Show answerوەڵامەکە پیشان بدە
  • DHT11: −20 to +60 °C (0–50 °C in older data sheets): −18 °C is at the very edge, with no room to spare, and ±2 °C is not within ±1 °C.
  • TMP36: range ✓, but ±2 °C typical and ±4 °C max away from 25 °C (the three-legged G grade) — not within ±1 °C.
  • DHT22: range −40 to +80 °C ✓ and ±0.5 °C ✓ — it fits.
  • : ⁦−20⁩ تا ⁦+60 °C⁩ (لە کۆنەکاندا ⁦0–50 °C): −18 °C⁩ ڕێک لەسەر لێوارە و شوێنی زیادەی نییە، هەروەها ⁦±2 °C⁩ لە ناو ⁦±1 °C⁩ـدا نییە.
  • ⁦TMP36⁩: ✓، بەڵام دوور لە ⁦25 °C ±2 °C⁩ ئاسایی و ⁦±4 °C⁩ زۆرترینە (جۆری G کە سێ قاچی هەیە) — لە ناو ⁦±1 °C⁩ـدا نییە.
  • ⁦DHT22⁩: ⁦−40⁩ تا ⁦+80 °C⁩ ✓ و ⁦±0.5 °C⁩ ✓ — دەگونجێت.
ExerciseڕاهێنانTwo-point calibrationڕێکخستنی پێوان بە دوو خاڵ

In ice water (0.0 °C) a sensor reads 0.6 °C; in water checked with a reference thermometer at 40.0 °C it reads 40.8 °C. Find a formula that corrects its readings, and correct a reading of 20.0 °C.

لە ئاوی سەهۆڵاویدا ⁦(0.0 °C)⁩ ⁦0.6 °C⁩ دەخوێنێتەوە؛ لە ئاوێکدا کە بە گەرماپێوێکی پێوەر ⁦40.0 °C⁩ـە، ⁦40.8 °C⁩ دەخوێنێتەوە. بدۆزەرەوە کە خوێندنەوەکانی ڕاست بکاتەوە و خوێندنەوەی ⁦20.0 °C⁩ ڕاست بکەرەوە.

Hintئاماژە

First subtract the offset at 0 °C, then scale so that the second point comes out right.

سەرەتا لادانەکەی ⁦0 °C⁩ کەم بکەرەوە، پاشان پێوەرەکە بگۆڕە تا خاڵی دووەم دروست دەربچێت.

Show answerوەڵامەکە پیشان بدە
T=(reading−0.6)×40.0−0.040.8−0.6=(reading−0.6)×0.995T(20.0)=19.4×0.99502≈19.30 ∘C\begin{aligned} T &= (\text{reading} - 0.6) \times \frac{40.0 - 0.0}{40.8 - 0.6} = (\text{reading} - 0.6) \times 0.995 \\ T(20.0) &= 19.4 \times 0.99502 \approx 19.30\,^\circ\text{C} \end{aligned}

Check: 0.6 gives 0.0 and 40.8 gives 40.0, the two reference points. The offset is removed and the slope corrected.

پشکنین: ⁦0.6⁩ دەبێتە ⁦0.0⁩ و ⁦40.8⁩ دەبێتە ⁦40.0⁩، دوو خاڵە پێوەرەکە. لادانەکە لا دەچێت و ڕاست دەکرێتەوە.

ExerciseڕاهێنانRead the DHT22 tableخشتەی ⁦DHT22⁩ بخوێنەوە

In the DHT22 table: which line is precision, which is drift, and what does "±2 % RH (max ±5 % RH)" mean?

لە خشتەی ⁦DHT22⁩ـدا: کام دێڕ ، کام و «⁦±2 % RH⁩ (زۆرترین ⁦±5 % RH⁩)» واتای چییە؟

Show answerوەڵامەکە پیشان بدە

Repeatability (±1 % RH, ±0.2 °C) is the precision; long-term stability (±0.5 % RH a year) is the drift. "±2 % RH (max ±5 % RH)": humidity readings are usually within 2 % RH of the truth, and the maker promises never more than 5 % RH.

دووپاتەبوونەوە (⁦±1 % RH⁩، ⁦±0.2 °C⁩) ؛ جێگیریی درێژخایەن (⁦±0.5 % RH⁩ لە ساڵێکدا) . «⁦±2 % RH⁩ (زۆرترین ⁦±5 % RH⁩)»: خوێندنەوەکانی بە زۆری لە ناو ⁦2 % RH⁩ لە ڕاستییەوەن و دروستکەر بەڵێن دەدات هەرگیز زیاتر لە ⁦5 % RH⁩ نەبێت.

Summaryپوختە

  • Accuracy: closeness to the true value (VIM 2.13); a data sheet gives an error limit such as ±2 °C. Error = reading − true value.
  • Precision: closeness of repeated readings to each other (VIM 2.15), given as repeatability or a standard deviation. Precise is not accurate.
  • A constant offset is fixed by calibration; random scatter shrinks by averaging (σ/√n).
  • Resolution: the smallest change that changes the reading (VIM 4.14). It is not precision, and digits beyond the accuracy mean nothing.
  • Range: where the sensor really measures — Pt100 about −200 to +850 °C, DHT11 −20 to +60 °C, TMP36 −40 to +125 °C.
  • Sensitivity: output change ÷ input change, the slope — 10 mV/°C for the TMP36.
  • Drift: slow change of the instrument itself (long-term stability); calibration compares with a reference at one or two points.
  • Read data sheets with the max values; choose a sensor by range, accuracy, resolution, supply, speed, power, price and size.
  • : نزیکی لە نرخی ڕاستەقینە ⁦(VIM 2.13)⁩؛ سنووری هەڵە دەدات وەک ⁦±2 °C⁩. هەڵە = خوێندنەوە − نرخی ڕاستەقینە.
  • : نزیکیی خوێندنەوە دووپاتەکان لە یەکتر ⁦(VIM 2.15)⁩، وەک دووپاتەبوونەوە یان دەدرێت. ورد واتای ڕاست نییە.
  • لادانی جێگیر بە چاک دەکرێت؛ بڵاوبوونەوەی هەڕەمەکی بە تێکڕا کەم دەبێتەوە ⁦(σ/√n)⁩.
  • : بچووکترین گۆڕان کە خوێندنەوەکە دەگۆڕێت ⁦(VIM 4.14)⁩. نییە و ژمارەی وردتر لە واتای نییە.
  • : ئەو شوێنەی بەڕاستی تێیدا دەپێوێت — ⁦Pt100⁩ نزیکەی ⁦−200⁩ تا ⁦+850 °C⁩، ⁦−20⁩ تا ⁦+60 °C⁩، ⁦TMP36 −40⁩ تا ⁦+125 °C⁩.
  • : گۆڕانی ÷ گۆڕانی ، واتە — ⁦10 mV/°C⁩ بۆ ⁦TMP36⁩.
  • : گۆڕانی هێواشی خودی ئامێرەکە (جێگیریی درێژخایەن)؛ لە یەک یان دوو خاڵدا لەگەڵ پێوەرێک بەراورد دەکات.
  • بە نرخی زۆرترین بخوێنەوە؛ بەپێی ، ، ، ، خێرایی، وزە، نرخ و قەبارە هەڵبژێرە.
Review questionsپرسیارەکانی پێداچوونەوە
A sensor always reads 2 °C too high but never varies. Accurate? Precise?هەستەوەرێک هەمیشە ⁦2 °C⁩ زیاتر دەخوێنێتەوە بەڵام هەرگیز ناگۆڕێت. ڕاستە؟ وردە؟

Precise, not accurate. A one-point calibration (−2 °C) makes it accurate too.

وردە، بەڵام ڕاست نییە. بە یەک خاڵ ⁦(−2 °C)⁩ ڕاستیشی دەکات.

Why is 24.37 °C on a ±2 °C thermometer misleading?بۆچی ⁦24.37 °C⁩ لەسەر گەرماپێوێکی ⁦±2 °C⁩ گومڕاکەرە؟

The digits suggest 0.01 °C knowledge, but the truth can be anywhere from 22.4 to 26.4 °C.

ژمارەکان وا دەردەخەن کە ⁦0.01 °C⁩ دەزانرێت، بەڵام ڕاستییەکە دەکرێت لە هەر شوێنێکی نێوان ⁦22.4⁩ و ⁦26.4 °C⁩ـدا بێت.

What does the TMP36's 10 mV/°C tell you?⁦10 mV/°C⁩ـی ⁦TMP36⁩ چیت پێ دەڵێت؟

Its sensitivity: the output rises 10 mV for every 1 °C, from 500 mV at 0 °C.

: بۆ هەر ⁦1 °C⁩، ⁦10 mV⁩ بەرز دەبێتەوە، لە ⁦500 mV⁩ـەوە لە ⁦0 °C⁩.

Lesson complete!وانەکە تەواو بوو!

Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.

Key termsزاراوە سەرەکییەکان

Next lessonوانەی داهاتوو

Reading Analog Signals: the ADC and analogRead()خوێندنەوەی سیگناڵەکانی ئەنالۆگ: ADC و ⁦analogRead()⁩

References and further readingسەرچاوەکان و خوێندنەوەی زیاتر

This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.

Appearanceڕووکار

Modeدۆخ
Styleشێواز
Coloursڕەنگەکان

Saved on this device only.تەنیا لەسەر ئەم ئامێرە پاشەکەوت دەکرێت.