Back in July 1969, the first Apollo moon landing had less computing power than a simple greeting card that these days plays a tune. Even with all those monitors in Houston's Mission Control virtually all of the computing was analog. And to think that they designed all that with slide rules!
In 1969, there was absolutely nothing electronic about a car except for the radio (and that was pure analog circuitry as well). Ignition was electromechanical and anything with injectors was purely mechanical. The alternator might have had a zener diode to control a relay but that was about it.
Forty years later a car "radio" alone can have as many as two or three embedded microcontrollers. The rest of the car is chock full of microcontrollers ranging from 32-bit, 150+ MHz PowerPCs running the power train to a simple 8-pin SOIC microcontroller running the keyless entry fob merrily chugging along at 4 MHz or less. Embedded microcontroller designs are so well done that they quite often perform much better and more reliably than the analog functions they replaced.
It's now a marketing feature to be micro-controlled. It seems that if engineers can throw a microcontroller at a problem, they will. And with that toss, there are a lot of efforts in place to ensure smooth development and robust embedded designs.
Side one: Hardware
There are two sides to embedded microcontroller based module development in automotive applications. The first aspect to address is the hardware. The microcontroller needs to be protected from the nasty electronic environment automotive electronics engineers all know and love. Microcontrollers are CMOS beasts that are inherently susceptible to electrical trash that can enter either through the supply or through the I/O. The automotive electrical environment throws stuff at a module that is not normally seen in, say, a washing machine application. Subduing this electrical environment is not impossible; it just takes thoughtand money.
An STMicroelectronics SPC563 PowerPC microcontroller
Conversely, control modules must also protect the environment from the electromagnetic noise generated by the microcontroller banging all those bits around at such high frequencies. Microcontrollers, being CMOS, have minute current spikes every time a bit changes state. Get enough of these current spikes clocking together and it generates some EMI (electromagnetic interference) that can interfere with other stuff outside the module (such as the radio). To borrow from a certain senator, a megahertz here, a megahertz there, after a while it adds up to real noise.
Some microcontrollers try to phase the internal clock to keep the bit banging more evenly distributed. The noise is more consistent but kept to a lower level that way.
The level of acceptable noise is regulated by module level EMC (electromagnetic compatibility) standards that must be adhered to. These standards are set up by the OEMs to keep modules from interfering with each other.
Most module level noise is generated by the switching of higher current outputs, say, pulse-width modulating a lamp load, for instance. But noise from a micro can exit the module at any pin because micro noise is both conducted and radiated into the circuit board. Small (typically 0.01 μF) capacitors are placed at each pin of the connector to both shunt micro noise and protect against ESD (electrostatic discharge). Each pin has its own capacitor with one side tied to the pin and the other to a ground ring around the connector. This does an effective job of shunting microcontroller noise as well as suppressing the standard human-body-model ESD event (static electricity zap).
Power supplies used for micros can range from the basic shunt regulator (i.e., a resistor, capacitor, and zener diode) to the complex. Engine controller voltage regulators, for example, can contain a buck regulator, a boost regulator, several linear regulators, low-voltage detectors, and several voltage trackers as well as other higher level functions. Some circuits that interface with the engine control module microcontroller are "off board" from the engine control module. In many cases this requires the engine control module to provide buffered or protected supplies to these external modules to keep the main microcontroller happy and stable.
A PowerPC power supply ASIC
View a full-size image
Watchdog circuits keep tabs on the micro in case the code decides to branch off for unknown parts. The simplest form requires that the microcontroller "pat the dog" within a specific frequency range. If the micro doesn't do this, then the watchdog forces a reset, and things start over.
Such an event happened to me while driving my wife's minivan several years ago. While driving, suddenly all of the gauges went to zero and then to full on before getting back to normal running. The watchdog wasn't being patted properly and forced a reset. That could have happened due to EMI glitching the micro or a bug in the code.