Embedded systems interact with physical world through the process of sensing and actuation, which we will illustrate with an example embedded systems : Car. There are many physical quantities of interest while driving your car both to the car and the driver as well such as the speed of the vehicle, temperature of the engine block, voltage of the battery as well as safety considerations like pressure of the tires. a modern car will have dozens of these sensors that measure these physical quantities by converting them into electrical signal , commonly a voltage. An actuator does the exact opposite, it takes electrical signal and converts it to a physical process.
If we consider the Cruise control system of a car for example. We have a sensor that measures the speed of the car, it produces an electrical signal that is read by an embedded computer through the process of measuring, the computer will make decision based on the current speed of the car and whether the car is going slower of faster than the preset speed by the driver and will produce and electrical signal that is fed back to an actuator which takes this electrical system and produce physical process on the throttle of the car thus adjusting its speed. This is known as a feedback control system and it is a very common way of controlling physical processes.
Feedback control system
Design Issues with sensors
- Relating output voltage to physical quantity that is being measured.
- Increasing manufacturing costs.
- Measurements might not have a linear relation with physical quantity.
- May require correction.
- Feedback can be used to keep operating point in linear region.
- How frequently are we going to sample sensor value by embedded computer.
- Aliasing : an effect that causes different signals to become indistinguishable (or aliases of one another) when sampled. It also refers to the distortion or artifact that results when the signal reconstructed from samples is different from the original continuous signal.
- Missed events : our sampling rate might make us lose important events.
- Analog signal conditioning : Do we need to condition measurement using analog circuitry ?.
- Digital filtering : Do we need to filter produced signal.
- latency : Does conditioning and filtering introduce latency in response to physical change ?.
Interfacing with sensors
General purpose I/O pins GPIO
usually a micro controller interfaces with sensors and actuators with general purpose I/O GPIO connectors . they are digital pins that can be set to high/low depending on the voltage. In case of GPIO they often use a technique called an open collector circuit that allows that pin to be used as input pin to sense a sensor / output pin to drive an actuator
open collector circuit