Five design skills and technical indicators of the sensor

You can know every new products be published here, and witness our growth and innovation.

Five design skills and technical indicators of the sensor

Date:08-16-2021

The number of sensors is proliferating across the earth’s surface and in the Spaces around us, providing the world with data.These affordable sensors are the driving force behind the development of the Internet of Things and the digital revolution that our society is facing, yet connecting and accessing data from sensors doesn’t always go straight or easy.This paper will introduce the sensor technical index, 5 design skills and OEM enterprises.

First of all, the technical index is the objective basis to characterize the performance of a product.Understand the technical indicators, help the correct selection and use of the product.The technical indicators of the sensor are divided into static indicators and dynamic indicators. The static indicators mainly examine the performance of the sensor under the condition of static invariance, including resolution, repeatability, sensitivity, linearity, return error, threshold, creep, stability and so on.Dynamic index mainly examines the performance of the sensor under the condition of rapid change, including frequency response and step response.

Due to the numerous technical indicators of the sensor, various data and literature are described from different angles, so that different people have different understandings, and even misunderstanding and ambiguity.To this end, the following several main technical indicators for the sensor are interpreted:

1, resolution and resolution:

Definition: Resolution refers to the smallest measured change that a sensor can detect.Resolution refers to the ratio of Resolution to full scale value.

Interpretation 1: Resolution is the most basic indicator of a sensor. It represents the sensor’s ability to distinguish the measured objects.The other technical specifications of the sensor are described in terms of resolution as the minimum unit.

For sensors and instruments with digital display, resolution determines the minimum number of digits to be displayed.For example, the resolution of electronic digital caliper is 0.01mm, and the indicator error is ±0.02mm.

Interpretation 2: Resolution is an absolute number with units.For example, the resolution of a temperature sensor is 0.1℃, the resolution of an acceleration sensor is 0.1g, etc.

Interpretation 3: Resolution is a related and very similar concept to resolution, both representing the resolution of a sensor to a measurement.

The main difference is that the resolution is expressed as a percentage of the resolution of the sensor. It is relative and has no dimension.For example, the resolution of the temperature sensor is 0.1℃, full range is 500℃, the resolution is 0.1/500=0.02%.

2. Repeatability:

Definition: Repeatability of the sensor refers to the degree of difference between the measurement results when the measurement is repeated several times in the same direction under the same condition.Also called repetition error, reproduction error, etc.

Interpretation 1: Repeatability of a sensor must be the degree of difference between multiple measurements obtained under the same conditions.If the measurement conditions change, the comparability between the measurement results will disappear, which can not be used as the basis for assessing repeatability.

Interpretation 2: The repeatability of the sensor represents the dispersion and randomness of the measurement results of the sensor.The reason for such dispersion and randomness is that various random disturbances inevitably exist inside and outside the sensor, resulting in the final measurement results of the sensor showing the characteristics of random variables.

Interpretation 3: The standard deviation of the random variable can be used as a reproducible quantitative expression.

Interpretation 4: For multiple repeated measurements, a higher measurement accuracy can be obtained if the average of all measurements is taken as the final measurement result.Because the standard deviation of the mean is significantly smaller than the standard deviation of each measure.

3. Linearity:

Definition: Linearity (Linearity) refers to the deviation of the sensor input and output curve from the ideal straight line.

Interpretation 1: The ideal sensor input/output relationship should be linear, and its input/output curve should be a straight line (red line in the figure below).

However, the actual sensor more or less has a variety of errors, resulting in the actual input and output curve is not the ideal straight line, but a curve (the green curve in the figure below).

Linearity is the degree of difference between the actual characteristic curve of the sensor and the off-line line, also known as nonlinearity or nonlinear error.

Interpretation 2: Because the difference between the actual characteristic curve of the sensor and the ideal line is different at different sizes of measurement, the ratio of the maximum value of the difference to the full range value is often used in the full range range.Obviously, linearity is also a relative quantity.

Interpretation 3: Because the ideal line of the sensor is unknown for the general measurement situation, it cannot be obtained.For this reason, a compromise method is often adopted, that is, directly using the measurement results of the sensor to calculate the fitting line which is close to the ideal line.The specific calculation methods include end-point line method, best line method, least square method and so on.

4. Stability:

Definition: Stability is the ability of a sensor to maintain its performance over a period of time.

Interpretation 1: Stability is the main index to investigate whether the sensor works stably in a certain time range.The factors that lead to the instability of the sensor mainly include temperature drift and internal stress release.Therefore, it is helpful to increase the temperature compensation and aging treatment to improve the stability.

Interpretation 2: Stability can be divided into short-term stability and long-term stability according to the length of the time period.When the observation time is too short, the stability and repeatability are close.Therefore, the stability index mainly examines the long-term stability.The specific length of time, according to the use of the environment and requirements to determine.

Interpretation 3: Both absolute error and relative error can be used for the quantitative expression of stability index.For example, a strain type force sensor has a stability of 0.02%/12h.

5. Sampling frequency:

Definition: Sample Rate refers to the number of measurement results that can be sampled by the sensor per unit time.

Interpretation 1: The sampling frequency is the most important indicator of the dynamic characteristics of the sensor, reflecting the rapid response ability of the sensor.Sampling frequency is one of the technical indicators that must be fully considered in the case of rapid change of measurement.According to Shannon’s sampling law, the sampling frequency of the sensor should not be less than 2 times the change frequency of the measured.

Interpretation 2: With the use of different frequencies, the accuracy of the sensor also varies accordingly.Generally speaking, the higher the sampling frequency, the lower the measurement accuracy.

The highest accuracy of the sensor is often obtained at the lowest sampling speed or even under static conditions.Therefore, precision and speed must be taken into account in sensor selection.

Five design tips for sensors

1. Start with the bus tool

As a first step, the engineer should take the approach of first connecting the sensor through a bus tool to limit the unknown.A bus tool connects a personal computer (PC) and then to the sensor’s I2C, SPI, or other protocol that allows the sensor to “talk”.A PC application associated with a bus tool that provides a known and working source for sending and receiving data that is not an unknown, unauthenticated embedded microcontroller (MCU) driver.In the context of the Bus utility, the developer can send and receive messages to get an understanding of how the section works before attempting to operate at the embedded level.

2. Write the transmission interface code in Python

Once the developer has tried using the bus tool’s sensors, the next step is to write application code for the sensors.Instead of jumping directly to microcontroller code, write application code in Python.Many bus utilities configure plug-ins and sample code when writing writing scripts, which Python usually follows.NET one of the languages available in.net.Writing applications in Python is fast and easy, and it provides a way to test sensors in applications that are not as complex as testing in an embedded environment.Having high-level code will make it easy for non-embedded engineers to mine sensor scripts and tests without the care of an embedded software engineer.

3. Test the sensor with Micro Python

One of the advantages of writing the first application code in Python is that application calls to the Bus-utility application Programming interface (API) can be easily swapped out by calling Micro Python.Micro Python runs in real-time embedded software, which has many sensors for engineers to understand its value. Micro Python runs on a Cortex-M4 processor, and it is a good environment from which to debug application code.Not only is it simple, there is no need to write I2C or SPI drivers here, as they are already covered in Micro Python’s function library.

4. Use the sensor supplier code

Any sample code that can be “scraped” from a sensor manufacturer, engineers will have to go a long way to understand how the sensor works.Unfortunately, many sensor vendors are not experts in embedded software design, so don’t expect to find a production-ready example of beautiful architecture and elegance.Just use the vendor code, learn how this part works, and the frustration of refactoring will arise until it can be cleanly integrated into embedded software.It may start as “spaghetti”, but harnessing manufacturers’ understanding of how their sensors work will help cut down on many ruined weekends before the product is launched.

5.Use a library of sensor fusion functions

Chances are, the sensor’s transmission interface is not new and has not been done before.Known libraries of all functions, such as the “Sensor Fusion function Library” provided by many chip manufacturers, help developers learn quickly, or even better, and avoid the cycle of redeveloping or drastically modifying the product architecture.Many sensors can be integrated into general types or categories, and these types or categories will enable the smooth development of drivers that, if handled properly, are almost universal or less reusable.Find these libraries of sensor fusion functions and learn their strengths and weaknesses.

When sensors are integrated into embedded systems, there are many ways to help improve design time and ease of use.Developers can never “go wrong” by learning how sensors work from a high level of abstraction at the beginning of the design and before integrating them into a lower level system.Many of the resources available today will help developers “hit the ground running” without having to start from scratch.