[From the last episode: There are many choices available to designers when implementing MEMS technology.]
We’ve talked enough about one way to build basic sensorsA device that can measure something about its environment. Examples are movement, light, color, moisture, pressure, and many more., but the kind of sensor you could buy from a store (although exceedingly few retail outlets would sell them) is more than just the MEMS bit (or however you built it if it wasn’t using MEMS). In fact, the part we’ve been flirting with is just the transducerA device that converts one kind of energy, like the energy of motion, into another, like the energy of an electric current. Transducers are fundamental to sensors, since they let us measure something physical as an electric current.: something that converts one kind of energy into another. In our case, it’s converting motion or expansion or vibration or some other physical phenomenon into an electronic signal. The transducer is only one part of a complete sensor.
The first thing that has to happen with the transducer signal is that we need to clean it up. We looked at this a few weeks ago with the example of a sloshing gas tank. But let’s dig in a level deeper. In order to do this, we need to talk about the distinction between analog and digital.
The World is Analog
Many of us witnessed the transition between analog watches and digital watches. So we probably have a vague sense of what that means. An analog signal can have any value at all. If the signal ranges between 0 voltsVoltage is what gets electrons to flow. It's analogous to water pressure, which gets water to flow. Voltage is measured in units of "volts." and 1 volt, then it can take absolutely any value between those limits. Like 0.5 or 0.6. Or something between those, like 0.52 or 0.56738919288735829105. In one of the confounding notions of infinity, between any two points on a continuum like this, you can have infinitely many more points.
You might think that this is the most precise way to measure a signal, since any value at all is possible. With digital, on the other hand, you have only a discrete number of values available. Let’s use our decimalThe base-10 counting system that we usually use. Digits can go from 0 to 9. number systemThis is a very generic term for any collection of components that, all together, can do something. Systems can be built from subsystems. Examples are your cell phone; your computer; the radio in your car; anything that seems like a "whole." as an example (binaryA base-2 counting system (rather than the base-10 system we usually use). Digits can be 0 or 1. works analogously). Let’s say that we want to make the values in the prior paragraph digital, with one decimal value. That gives us exactly eleven possible values: 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, and 1.0. That 0.52 number above? That rounds to 0.5. The 0.56blahblah number? It rounds to 0.6. Unlike analog, there is no infinity between values; there’s nothing.
Because you’re rounding values to make them digital, you would think that this makes it less accurate. And, in a certain sense, you’d be right. Engineers do view this rounding thing as a source of “error” or “noise.” But there’s another reason why digital can end up cleaner: it’s harder to mess up.
But Digital can be Cleaner
Look at the analog signal below. At the point shown, its value is 6. But if there’s any kind of disturbance – temperature, for instance – that value is easily tweaked to some other nearby value – say 5.9843. That is no longer an accurate value for what should have been 6. It’s not far away, but it is away.
Now, if we convert to digital, then we have to represent this 6 value with some number of bitsThe smallest unit of information. It is a shortened form of "binary digit." Since it's binary, it can have only two values -- typically 0 and 1.. Here we go binary, so, as a review, each digit is a power of 2 (unlike decimal, where it’s a power of 10). Believe me, here we don’t want to get into the intricacies of digital math, so we’ll keep it simple. If we use, say, 2 bits, we can represent only 4 numbers: 0, 1, 2, and 3 (00, 01, 10, 11). So we need more than 2 bits. Even 3 gets us only to 8, and we need 10. So we need 4 bits (which actually gets us all the way to 16). So we can use the first 10 of those numbers as the values of 0-10*.
Now we have four signals instead of one, which probably seems inefficient. But with the one analog signal, we have to be super careful to protect it from noise so that it doesn’t start to drift off its true value. But the four signals in the digital version don’t need that protection. You can see one of those signals below, and if it’s off by a little, it doesn’t matter. A 1 is a 1 even if a little messy.**
Clean Up and then Convert (Usually)
What this means is that there might be some analog circuitry that filters and otherwise cleans up the sensor signal, but then we convert it to digital, usually as quickly as possible. Once in digital form, we can store values within the sensor by including some memory. That way, when some processorA computer chip that does computing work for a computer. It may do general work (like in your home computer) or it may do specialized work (like some of the processors in your smartphone). or something wants to get a sensor value, it can ask the sensor and maybe get several values that were stored while the processor was off doing something else.
There is the occasional exception to this. Microphones, for example, (which are sound sensors) come in two flavors: analog and digital. Some put out an analog signal directly because, traditionally, speakers have listened to analog signals. But others go ahead and convert to digital, which can help for complicated algorithmsA way of calculating something, typically as a step-by-step recipe. A familiar one to all of us is how we do long division on paper: that's an algorithm. Algorithms abound in the IoT. like voice recognition – all of which is done digitally.
So, our general architecture is: first the transducer, then clean up the analog, then convert to digital, and then maybe do more digital stuff or store it for use.
So next time, we’ll look at a specific simple sensor and put this all to work.
* Those binary values, if you’re curious, would be 0000, 0001, 0010, 0011, 1000, 1001, 1010, 1011, 1100, 1101, and 1110.
** If it gets messed up too badly, well, yeah, then it becomes a question as to whether it’s really a 1 or a 0. But you have lots of room for forgiveness before you get to that ambiguous point. (There’s actually a name for that room: it’s called noise margin – that is, the amount of noise you can tolerate before you might be corrupted.)
Leave a Reply