Sunday, December 14, 2008

Smart Sensors

Smart Sensors
Clusters are now being used on a smaller scale for sensors. For instance, a traditional pressure sensor contains a device that outputs a varying voltage depending on the pressure applied to the device. Usually, the voltage output is not linear, depends on the temperature and is a low-level voltage that requires amplification.

Some sensor manufacturers are providing a smart sensor that is integrated with all the electronics, along with a microprocessor that enables it to read the voltage, calibrates it using temperature-compensation curves and digitally outputs the pressure onto the communications bus.

This saves the carmaker from having to know all the dirty details of the sensor, and saves processing power in the module, which otherwise would have to do these calculations. It makes the supplier, who is most up on the details of the sensor anyway, responsible for providing an accurate reading.

Another advantage of the smart sensor is that the digital signal traveling over the communications bus is less susceptible to electrical noise. An analog voltage traveling through a wire can pick up extra voltage when it passes certain electrical components, or even from overhead power lines.

Communication buses and microprocessors also help simplify the wiring through multiplexing. Let's take a closer look at how they do this.

Smart Sensors

Smart Sensors
Clusters are now being used on a smaller scale for sensors. For instance, a traditional pressure sensor contains a device that outputs a varying voltage depending on the pressure applied to the device. Usually, the voltage output is not linear, depends on the temperature and is a low-level voltage that requires amplification.

Some sensor manufacturers are providing a smart sensor that is integrated with all the electronics, along with a microprocessor that enables it to read the voltage, calibrates it using temperature-compensation curves and digitally outputs the pressure onto the communications bus.

This saves the carmaker from having to know all the dirty details of the sensor, and saves processing power in the module, which otherwise would have to do these calculations. It makes the supplier, who is most up on the details of the sensor anyway, responsible for providing an accurate reading.

Another advantage of the smart sensor is that the digital signal traveling over the communications bus is less susceptible to electrical noise. An analog voltage traveling through a wire can pick up extra voltage when it passes certain electrical components, or even from overhead power lines.

Communication buses and microprocessors also help simplify the wiring through multiplexing. Let's take a closer look at how they do this.

Easier Design and Manufacturing

Easier Design and Manufacturing
Having communication standards has made designing and building cars a little easier. A good example of this simplification is the car's instrument cluster.

The instrument cluster gathers and displays data from various parts of the vehicle. Most of this data is already used by other modules in the car. For instance, the ECU knows the coolant temperature and engine speed. The transmission controller knows the vehicle speed. The controller for the anti-lock braking system (ABS) knows if there is a problem with the ABS.

All of these modules simply send this data onto the communications bus. Several times a second, the ECU will send out a packet of information consisting of a header and the data. The header is just a number that identifies the packet as either a speed or a temperature reading, and the data is a number corresponding to that speed or temperature. The instrument panel contains another module that knows to look for certain packets -- whenever it sees one, it updates the appropriate gauge or indicator with the new value.

Most carmakers buy the instrument clusters fully assembled from a supplier, who designs them to the carmaker's specifications. This makes the job of designing the instrument panel a lot easier, both for the carmaker and the supplier.

It is easier for the carmaker to tell the supplier how each gauge will be driven. Instead of having to tell the supplier that a particular wire will provide the speed signal, and it will be a varying voltage between 0 and 5 V, and 1.1 V corresponds to 30 mph, the carmaker can just provide a list of the packets of data. Then, it is the carmaker's responsibility to make sure that the correct data is output onto the communications bus.

It is easier for the supplier to design the instrument panel because he doesn't need to know any details of how the speed signal is generated, or where it's coming from. Instead, the instrument panel simply monitors the communications bus and updates the gauges when it receives new data.

These types of communications standards make it very uncomplicated for carmakers to outsource the design and manufacture of components: The carmaker doesn't have to worry about the details of how each gauge or light is driven, and the supplier who makes the instrument panel doesn't have to worry about where the signals are coming from.

Advanced Diagnostics

Advanced Diagnostics
Another benefit of having a communications bus is that each module can communicate faults to a central module, which stores the faults and can communicate them to an off-board diagnostic tool.




The diagnostic port from a Toyota minivan

This can make it easier for technicians to diagnose problems with the car, especially intermittent problems, which are notorious for disappearing as soon as you bring the car in for repairs.

BATauto.com: Technical Info Pages lists the fault codes stored in the ECU for various carmakers. Sometimes, the codes can be accessed without a diagnostic tool. For instance, on some cars, by jumping two of the pins in the diagnostic connecter and then turning the ignition key to run, the "check engine" light will flash a certain pattern to indicate the number of the fault code stored in the ECU.

Let's take a look at how microprocessors and communications standards have made cars easier to build.

ECU Components


ECU Components

The processor is packaged in a module with hundreds of other components on a multi-layer circuit board. Some of the other components in the ECU that support the processor are:

* Analog-to-digital converters - These devices read the outputs of some of the sensors in the car, such as the oxygen sensor. The output of an oxygen sensor is an analog voltage, usually between 0 and 1.1 volts (V). The processor only understands digital numbers, so the analog-to-digital converter changes this voltage into a 10-bit digital number.

* High-level digital outputs - On many modern cars, the ECU fires the spark plugs, opens and closes the fuel injectors and turns the cooling fan on and off. All of these tasks require digital outputs. A digital output is either on or off -- there is no in-between. For instance, an output for controlling the cooling fan might provide 12 V and 0.5 amps to the fan relay when it is on, and 0 V when it is off. The digital output itself is like a relay. The tiny amount of power that the processor can output energizes the transistor in the digital output, allowing it to supply a much larger amount of power to the cooling fan relay, which in turn provides a still larger amount of power to the cooling fan.

* Digital-to-analog converters - Sometimes the ECU has to provide an analog voltage output to drive some engine components. Since the processor on the ECU is a digital device, it needs a component that can convert the digital number into an analog voltage.

* Signal conditioners - Sometimes the inputs or outputs need to be adjusted before they are read. For instance, the analog-to-digital converter that reads the voltage from the oxygen sensor might be set up to read a 0- to 5-V signal, but the oxygen sensor outputs a 0- to 1.1-V signal. A signal conditioner is a circuit that adjusts the level of the signals coming in or out. For instance, if we applied a signal conditioner that multiplied the voltage coming from the oxygen sensor by 4, we'd get a 0- to 4.4-V signal, which would allow the analog-to-digital converter to read the voltage more accurately (see How Analog and Digital Recording Works for more details).

* Communication chips - These chips implement the various communications standards that are used on cars. There are several standards used, but the one that is starting to dominate in-car communications is called CAN (controller-area networking). This communication standard allows for communication speeds of up to 500 kilobits per second (Kbps). That's a lot faster than older standards. This speed is becoming necessary because some modules communicate data onto the bus hundreds of times per second. The CAN bus communicates using two wires.

In the next section, we'll take a look at how communication standards have made designing and building cars easier.

Sophisticated Engine Controls



Before emissions laws were enacted, it was possible to build a car engine without microprocessors. With the enactment of increasingly stricter emissions laws, sophisticated control schemes were needed to regulate the air/fuel mixture so that the catalytic converter could remove a lot of the pollution from the exhaust. (See How Catalytic Converters Work for more details.)



The computer from a Ford Ranger

Controlling the engine is the most processor-intensive job on your car, and the engine control unit (ECU) is the most powerful computer on most cars. The ECU uses closed-loop control, a control scheme that monitors outputs of a system to control the inputs to a system, managing the emissions and fuel economy of the engine (as well as a host of other parameters). Gathering data from dozens of different sensors, the ECU knows everything from the coolant temperature to the amount of oxygen in the exhaust. With this data, it performs millions of calculations each second, including looking up values in tables, calculating the results of long equations to decide on the best spark timing and determining how long the fuel injector is open. The ECU does all of this to ensure the lowest emissions and best mileage. See How Fuel Injection Systems Work for a lot more detail on what the ECU does.


The pins on this connecter interface with sensors and control devices all over the car.

A modern ECU might contain a 32-bit, 40-MHz processor. This may not sound fast compared to the 500- to 1,000-MHz processor you probably have in your PC, but remember that the processor in your car is running much more efficient code than the one in your PC. The code in an average ECU takes up less than 1 megabyte (MB) of memory. By comparison, you probably have at least 2 gigabytes (GB) of programs on your computer -- that's 2,000 times the amount in an ECU.

How Car Computers Work

Each year, cars seem to get more and more complicated. Cars today might have as many as 50 microprocessors on them. Although these microprocessors make it more difficult for you to work on your own car, some of them actually make your car easier to service.

Mouse over each item in the list of parts to view its location and description.

Some of the reasons for this increase in the number of microprocessors are:

* The need for sophisticated engine controls to meet emissions and fuel-economy standards
* Advanced diagnostics
* Simplification of the manufacture and design of cars
* Reduction of the amount of wiring in cars
* New safety features
* New comfort and convenience features

In this article, we'll take a look at how each of these factors has influenced the design of your car.