Analog to Digital and Back

 

CVS50110 

This paper will discuss some aspects of digital information versus analog information. The author has worked in the electronics field for forty years, and understands these formats at the bone level.

First, some definitions. Analog is constantly varying content. It is “real life” since all natural sounds and physical phenomena are analog: when a tree falls in the forest, the waves it generates in the air, whether they make a sound or not, are analog. They vary in amplitude and frequency to exactly reproduce the sound the tree made as it crashed its way through the underbrush and smashed into the ground.

Digital is nearly always man-created. Digital electronics encompass the related areas of binary logic and math. This paper has no space to go into all of that, but you need to know that binary is two-stage only. Unlike decimal, which has 10 discrete steps, or hexadecimal, which has 16. Binary is 1/0, on/off, open/closed, set/reset, and so on. This forms the basis for all computing. The very CPU I am using now to type this uses those simple yes/no, pass/fail kind of decisions to handle the work I am doing. It keeps up with my two finger typing and at the same time it keeps up with various housekeeping like monitoring the I/O ports and keeping the Time-Of-Day. The only advantage a computer has over a human is that the computer is so damn fast: it can easily do a million things while a human (me) is mumblescratching around looking for a key on a keyboard. Of course, computers can’t think for shit.

If you look at the internal working of a running logic system using an oscilloscope, you see this digital signal switching taking place. It is very quick, but luckily, for us, the same electronic advances that allowed the giant CPU’s we have now also allowed much improved test equipment. No human can be expected to see what a CPU is doing but the scope charts time vs. amplitude and puts it on a screen so you can see the microsecond and even nanosecond switching that is taking placed. This is important because you need a scope to understand the process of converting analog to digital and then back to digital again. It lets you see what is happening.

When you want to convert, say, Frank Sinatra crooning (which is, being natural, all analog) into a nice clean digital form, you need something that takes an analog signal and converts it into a digital representation. This converted data is typically stored in the form of a table of values, with each entry describing one sample of the original signal. As you might infer, the device used to convert these is called an “Analog-to-Digital” converter, or A/D, as it is usually written.

The specs of this A/D converter (and the reverse, D/A, that we will cover later) are what determine the quality of the conversion. When I first started in electronics, we were just barely out of the vacuum tube days, and the first transistor circuits were quickly followed by various stages of digital logic integrated circuitry. The density of transistors on a chip advanced in a very few years from Small-Scale-Integration (SSI), which might have only four NAND gates on a chip, to Large-Scale-Integration (LSI), which had millions of transistors on the same size chip, thousands of NAND gate equivalents. This allowed very complex electronic circuits to be designed in a package.

In the case of A/D converters, the accompanying speed increases, partly due to the shorter connection lengths between chips and closer integration with associated logic, made it so you can convert with nearly true quality. The main specs for an A/D converter are sample speed and width. If you sample only ten times a second, your sound quality is going to suck plenty. And if you only do an 8-bit sample, your resolution is going to suck. The fact is that the faster and wider the conversion, the more like Frank’s intent you will approach. Of course, the trade off is storage space, file size, and word size of the memory where you are storing the converted values. If you sample a million times a second, and you have a 16-bit sample width, you are using up 2 Mb (Megabytes) of memory for every second of croon. That means for a typical 3-minute song, you will use 360 Mb. You could only get three songs per Gb (Gigabyte). This is not enough for most people. Some compromise between quality and file size is usually reached.

This is the Meat of where I was getting. Sorry I had to shovel all that tech stuff into your maw. Audiophiles claim they can tell the difference between Frank’s original croon and the one that is converted to digital, then back to analog to get to your Ear. They say it loses something. That is why they avoid digital music like CD’s, MP3s and such. They go with vinyl LP records or audiotape, which are never converted. I call bullshit on this.

It is true that no analog to digital to analog conversion will ever be an exact replica of the original; but I maintain that no Human Ear can tell the difference at the high end of conversion. I wager that a blind taste test, where the audio expert is blindfolded and has their nose pinched off, would show that they cannot tell the difference between a bite of CD and a bite of vinyl record. Hahahahah. No, I mean a blind ear test.

I believe their claim is based on the unavoidable stair-step shape of the re-created analog. During the sample times, when the A/D conversion is taking place, the signal stays the same. Even at the highest rates of conversion, this is true. If you zoom in close enough with your oscilloscope, you will see teensy little steps between samples. But a human ear cannot detect steps this small.

I think what they miss is the noise, the hiss and clang that is unavoidable in analog signals. When you digitize, you clean up. So, you may get what they claim is Franks cracking instead of crooning. You lose the oon and get the ack. And you lose Frank scratching his ass and the trumpet player shuffling her feet. Maybe that is what they miss.

Of course, when you convert Frank to a list of digital values, you have to convert him back to analog before you can hear him. Your ear doesn’t know digital from a hole in the ground. So you have a D/A converter, usually inside the device, like your MP3 player. The specs of the D/A are also important, but less so. If you did not get the music digitized well, you cannot get it turned back to analog well: the data is lost during the A/D conversion. The D/A process reverses the operation and changes your table of binary values back into a pseudo sine wave that can feed speakers or earphones and vibrate to produce sound.

That’s the lesson for today.

Advertisements

Spider

Here is a thing that happened. In my bathroom at home a small spider built a web in an upper corner where the walls meet the ceiling. This was the common house spider, aka American House Spider. You know the one, they have a bulbous bottom and make messy webs. They are alleged to not bite unless you squeeze them. You do as you wish, but I lost my spider squeezing lust long ago.

I watched this dudette build a web and then sit waiting. She waited for nearly two weeks. I could have told her it was an unproductive place for bugs. I never see any bugs except the occasional ant that comes in for some water, and they are never near the wall/ceiling juncture. Also, I don’t think there is enough juice in an ant to satisfy even a small spider. I am calling this one a ‘she’ even though I did not investigate that closely. I believe most of them are since the only thing a spider likes more than a roll in the silk is a spider roll, so most males get eaten up.

I even wonder where the spider came from. She didn’t float in on a gossamer strand of silk. The bathroom has no windows. But there she sat. Today I notice she is gone. I figure there are three possibilities. One, a bird got her. I discount this because I would have noticed a bird. Two, she relocated to greener bug pastures. I guess that’s possible, although these things don’t live but a year and it doesn’t seem like moving around would be an efficient use of time. Three, she died of hunger. I suspect the latter. Too bad for her.

Car & Book Update

6-17-2008_048b

OK. The last book I uploaded for publication, Tales From The Coastal Plain, is live now on Smashwords and other distribution channels, like B&N. Also, I have changed my header to a bit o’ duck.

And the car issue is only somewhat resolved. You can see why I don’t tweet. It takes me way too long to say something to use a character limitation. We sort of located a car to replace our car that was wrecked by another gentleman. We are going to try to pick it up today. Arrrh.

What I Think About Cars

Image

They suck, that’s what. My family currently has two broken cars, one from a blown engine and one from a wreck caused by a Person running into me. Both cars are totaled. Buying a car is a hassle, an unexpected but necessary expense, and a constant drain on your wallet.

You could be a very rich man, my friend, except for this. Just think about how much goddam money you put into that steaming pile of hog sitting in the parking lot. There is the obvious one, gasoline. That is only the tip of the money iceberg. Insurance, tags, ad valorem taxes, routine maintenance (oil changes, tires, brakes), emergency maintenance (everything else). Have you ever had a car repaired that cost you less than a hundred dollars? Not since the sixties. Here where I live the unspeakable obscenity developers have spread the suburbs out so much that you simply must have a car. Public transportation? Not a carbuncles chance. Even for the people that are ‘lucky’ enough to have it, it drops you off in the rain three blocks from your house.

So here you have a required mechanical and electrical monster that is a constant drain on your finances, a beast that loses value every single day, that wipes out any savings you manage to accumulate by breaking down ever so often, and then smirks at you when you put fifty dollars worth of gas in it.

So now we are faced with buying not one, but two cars. I hate them and I think they suck. But horses aren’t the answer. Somebody would always be trying to knock them over the head and put them in meat and sell them as beef.

“White Tuna”

AAD50387The fish in the picture above is not a white tuna.

There is a big sign up on my refrigerator that says “DO NOT EAT ANYTHING CALLED WHITE TUNA OR SUPER WHITE TUNA”.

Apparently, there is a fish called escolar or some such name that tastes mighty fine raw but gives you diarrhea. Maybe the trade-off is worth it to you. But in any case, it is not tuna. Unless it is Albacore tuna, which might be called white tuna.

Whatever the deal is with this fish, just remember this: deer ticks are almost too small to see but they will give you Lyme disease. Dog ticks are larger and can give you Rocky Mountain Spotted fever. Be careful when you are in the woods or tall grass.

Early Electronics

I was lucky (?) enough to get in on the ground floor of the electronics revolution. You boys and girls will not remember this, but there was a time when computers used vacuum tubes. You probably only know tubes as components of those vintage amps that provide the classic old rock sounds. Unfortunately for you, in order for me to get to the electronics story, I have to wander from the track for a bit.

In March of 1961 I joined the Air Force. My short (3-month) college career had been curtailed by the requirement that you pay for it. Three friends of mine who were similarly challenged by no job, no college, and families whining at them to get out had enticed me to take the tests. They went right in. I followed a couple of weeks later, being promised by the recruiter that I would meet up with them in basic training. I advise you not to believe that if a recruiter tells it to you. I did not see them again until we all got out.

I had done very well on the tests, and so was chosen for electronics tech school early. The Air Force puts you where it needs people, and electronics was a very new hot thing then. After basic I was sent to Biloxi for the basic electronics course. At all points in the process, they evaluate your performance. If you did not  measure up, the clear, and often stated, result was Cook or Air Policeman. Those are honorable professions, but they were used as a hammer to force us to do well. Go figure.

For some reason, I understood basic electronics at my bone level. The whizzing little negatively charged particles that make all this possible, the lights we enjoy, the fine computers we use, all depend on those hard-working little bastards. In spite of spending every night at the Airman’s Club drinking ten-cent a glass beer, I did well. I was expectorated at the end of that five months class knowing all about Mr. Ohm. Amperes, volts, watts, AC, DC, all were grist in my mill. I knew how to use voltmeters, ammeters, ohmmeters, and the excellent oscilloscope, which allows humans to visualize the invisible stream of electrons.

After you get out of basic electronics, the Air Force decides where it needs your body. There is typically a gap of a couple of weeks before your advanced training in whatever area they want you in starts. They send you away on leave and when you return they tell you where you are going. In my case, because of my high scores, I was chosen for the most elite program they had at that time. I want to say it was called “Project Blue Suit” but my memory is faulty. In any case, it was part of the Air Defense Command (ADC) Semi-Automatic Ground Environment (SAGE) system, where many radar sites gathered information and processed it through local computers, then sent it by dedicated telephone lines to Direction Centers, where those huge IBM computers correlated it all and sen tit on to the ADC headquarters, who could scramble fighters to attack any incoming heavy bombers. Those giant IBM’s was what I was to be trained for.

Unfortunately, as often happens in defense contracts, something slipped, some milestone was not met, and I ended up going to a lesser but related computer school, the one that the radar sites used. I did well in that school also and was sent to Nebraska.

Yes, folks. In 1962, Nebraska was a first line of defense against the dirty rat commies. The government was worried that Russian bombers would somehow get past all the other radar sites and bomb our SAC bases at Lincoln and Omaha. So ADC set up many radar sites to prevent this bad thing from happening. As you may have guessed, if you stuck it out this long, those computers I worked on there were vacuum tube based. Whew.

I will not beat you over the head will how primitive they were. Much. They were dual systems, so a failure in one allowed it to be taken offline and the other switched in with little loss of data. There were twenty refrigerator sized cabinets, each seven feet tall. The computers filled a very large room. And they used vacuum tubes. Every flip-flop used three tubes. Every adder, every shift register, every A/D converter, all used at least one tube. The tubes were mounted on plug-in PC boards, twenty cards per rack, twelve racks per cabinet. The amount of heat generated by this number of filaments glowing was enormous. There was a whole separate room dedicated to the cooling of the computer, which by the way was a Burroughs AN/FST-2B. The biggest panic moments came when the screech of the air conditioner failure alarm happened. You had to do a crash shutdown to keep the computers from burning up. Each cabinet had a vent at the bottom which closed when you opened the door, to keep the cool in. The temperature coming in that bottom vent was about 45 degrees F. Going out the vent at the top it was a over a hundred degrees. Without this cold air coming in, in less than a minute, the components would overheat and burn up.

These were mainly data processing machines. They gathered the search and height-finder radar information, formatted it, and shipped it off to the Direction Center. There was no memory; this was done on the fly. Later, we added the SIFF cabinet, which used actual solid state devices, something new-fangled called “transistors”. The SIFF cabinet had a 63 word magnetic core memory. SIFF doesn’t stand for syphilis, as you might suspect. It stands for Selective Identification Friend or Foe. That was, we could tell if the targets on the PPI’s were Russian or American.

Anyway, I am getting tired of this now and I am sure you are as well. I will wind up this hunk of my life in electronics this way: this was the primitive leading edge of digital electronics. Large, power hungry, and