Reader small image

You're reading from  Architecting High-Performance Embedded Systems

Product typeBook
Published inFeb 2021
Reading LevelExpert
PublisherPackt
ISBN-139781789955965
Edition1st Edition
Languages
Right arrow
Author (1)
Jim Ledin
Jim Ledin
author image
Jim Ledin

Jim Ledin is the CEO of Ledin Engineering, Inc. Jim is an expert in embedded software and hardware design and testing. He is also an expert in system cybersecurity assessment and penetration testing. He has a B.S. degree in aerospace engineering from Iowa State University and an M.S. degree in electrical and computer engineering from the Georgia Institute of Technology. Jim is a registered professional electrical engineer in California, a Certified Information System Security Professional (CISSP), a Certified Ethical Hacker (CEH), and a Certified Penetration Tester (CPT).
Read more about Jim Ledin

Right arrow

Chapter 2: Sensing the World

This chapter introduces the principles and applications of sensors used in a wide variety of embedded systems. Passive sensors measure attributes of the world such as temperature, pressure, humidity, light intensity, and atmospheric composition. Active sensors use energy-emitting technologies such as radar and lidar to detect objects and measure their position and velocity.

We will examine a broad range of sensor types as well as the communication protocols used for transferring sensor data into a processor. The chapter also discusses the processing an embedded system must perform on raw sensor measurements to provide actionable data for use by a processing algorithm.

After completing this chapter, you will have learned about many of the different types of sensors used in embedded systems and will understand what passive and active sensors are and will be familiar with several types of passive and active sensors. You will also understand some of the...

Technical requirements

Introducing passive, active, and smart sensors

As we discussed in Chapter 1, Architecting High-Performance Embedded Systems, the basic sequence of processing in a simple embedded system consists of reading inputs, computing outputs, writing outputs, and waiting until either it is time to start the next processing loop or the next triggering event occurs. This chapter will look in more depth at the first of these steps: reading inputs. The inputs used by a particular system depend, obviously, on what the system does. In embedded systems, the inputs generally consist of commands entered by a user, commands received from other sources such as a network server controlling the system, and sensor measurements. Our focus here is on inputs collected using sensors.

In the context of embedded systems, a sensor is an electrical or electronic component that is sensitive to some property of its environment and produces an output corresponding to the measured property. To make this abstract description...

Applying analog-to-digital converters

Many types of sensors produce a response that can be measured as a voltage. An embedded processor measures a voltage with an analog-to-digital converter. An analog-to-digital converter (ADC) is a processor peripheral that samples an analog voltage and produces as output a digital data value corresponding to the voltage at the time of the sample.

An ADC is characterized by the number of bits in the digital measurement word, the voltage range of the input signal, the time it takes for a conversion to complete, and other performance parameters such as accuracy and measurement noise.

As shown in Figure 2.2, an analog voltage can vary continuously over time, and can take on any value within its operating range. The output of an ADC is only available at discrete points in time and can only take on the limited number of values dictated by its resolution. In this simplified example, the ADC produces measurements three bits wide with output values...

The types of sensors used in embedded systems

This section provides a brief overview of a variety of sensor types used in embedded systems. This list is not exhaustive, but it should give you some idea of the variety of sensors available. It is the responsibility of the embedded system architect to identify the list of particular sensor types and the specifications those sensors must meet to implement any particular system design.

Light

Light sensors in embedded systems range in complexity from simple photoresistors to sophisticated multi-band sensor arrays used in devices such as video cameras, microscopes, and astronomical telescopes.

A photoresistor is a resistive device that exhibits a decrease in resistance as the luminosity (the intensity of light) increases on its surface. Photoresistors are commonly used in applications such as nightlights and for safety-related obstacle detection by automatic garage door openers.

Photodiodes and phototransistors are semiconductor...

Communicating with sensors

In the previous section, we looked at a variety of sensor types suitable for measuring various attributes of an embedded system and its environment. As part of each sensor measurement, the sensed data must be forwarded to the system processor. This section examines the most common interface technologies used in embedded systems for communication between sensors and processors.

GPIO

A General-Purpose I/O (GPIO) input signal is simply a physical pin on the processor that, when read, indicates whether the voltage at the pin is low (near 0V) or high (near the upper end of the processor I/O voltage range, often 5V or 3.3V). GPIO inputs can be used to detect operator actions such as button presses, or to determine whether the system is in an unsafe condition, perhaps by using a switch to detect when a safety-critical cover has been opened.

A GPIO input signal can be used with an analog sensor to detect when the analog signal is above or below a threshold...

Processing sensor data

Sensors measuring various attributes of a system, such as the pressure in a pipe or the air temperature, will generally contain some amount of error. Sensor measurement errors have a variety of causes, including sensor calibration inaccuracies, non-ideal measurement configurations, temperature dependence of the sensor or its associated circuitry, and the background noise that is always present in electronic circuits.

In some cases, particularly with non-critical measurements, it may not be necessary to take steps to compensate for measurement error. In many applications, however, it is critical to eliminate as much of the error as possible.

Precision sensors tend to be more costly than generic sensors, but the higher price typically brings with it a variety of techniques within the sensor design that improve its measurement quality. These techniques include features such as compensation for temperature variation and precision factory calibration.

Sometimes...

Summary

This chapter introduced a variety of sensors used across a wide range of embedded applications. We saw that passive sensors measure attributes of the world, such as temperature, pressure, humidity, light intensity, and atmospheric composition, while active sensors use technologies such as radar and lidar to detect objects and measure their position and velocity. This chapter also discussed the types of processing an embedded system must perform in order to convert raw sensor readings into actionable data.

Having completed this chapter, you have learned about the different types of sensors used in embedded systems and understand what passive and active sensors are, and are familiar with several types of sensors in each category. You are also familiar with the basic processing techniques performed on raw sensor data to provide information suitable for use in processing algorithms.

The next chapter discusses the need for embedded systems to generate real-time responses to...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Architecting High-Performance Embedded Systems
Published in: Feb 2021Publisher: PacktISBN-13: 9781789955965
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Jim Ledin

Jim Ledin is the CEO of Ledin Engineering, Inc. Jim is an expert in embedded software and hardware design and testing. He is also an expert in system cybersecurity assessment and penetration testing. He has a B.S. degree in aerospace engineering from Iowa State University and an M.S. degree in electrical and computer engineering from the Georgia Institute of Technology. Jim is a registered professional electrical engineer in California, a Certified Information System Security Professional (CISSP), a Certified Ethical Hacker (CEH), and a Certified Penetration Tester (CPT).
Read more about Jim Ledin