Tuesday, November 24, 2009

Car Engines

Introduction to How Car Engines Work

­Have you ever opened the hood of your car and wondered what was going on in there? A car engine can look like a big confusing jumble of metal, tubes and wires to the uninitiated.

You might want to know what's going on simply out of curiosity. Or perhaps you are buying a new car, and you hear things like "3.0 liter V-6" and "dual overhead cams" and "tuned port fuel injection." What does all ­of that mean?



we'll discuss the basic idea behind an engine a­nd then go into detail about how all the pieces fit together, what can go wrong and how to increase performance.

­The purpose of a gasoline car engine is to convert gasoline into motion so that your car can move. Currently the easiest way to create motion from gasoline is to burn the gasoline inside an engine. Therefore, a car engine is an internal combustion engine -- combustion takes place internally.

Two things to note:

There are different kinds of internal combustion engines. Diesel engines are one form and gas turbine engines are another. See also the articles on HEMI engines, rotary engines and two-stroke engines. Each has its own advantages and disadvantages.

There is such a thing as an external combustion engine. A steam engine in old-fashioned trains and steam boats is the best example of an external combustion engine. The fuel (coal, wood, oil, whatever) in a steam engine burns outside the engine to create steam, and the steam creates motion inside the engine. Internal combustion is a lot more efficient (takes less fuel per mile) than external combustion, plus an internal combustion engine is a lot smaller than an equivalent external combustion engine. This explains why we don't see any cars from Ford and GM using steam engines.

Internal Combustion

The ­principle behind any reciprocating internal combustion engine: If you put a tiny amount of high-energy fuel (like gasoline) in a small, enclosed space and ignite it, an incredible amount of energy is released in the form of expanding gas. You can use that energy to propel a potato 500 feet. In this case, the energy is translated into potato motion. You can also use it for more interesting purposes. For example, if you can create a cycle that allows you to set off explosions like this hundreds of times per minute, and if you can harness that energy in a useful way, what you have is the core of a car engine!

Almost all cars currently use what is called a four-stroke combustion cycle to convert gasoline into motion. The four-stroke approach is also known as the Otto cycle, in honor of Nikolaus Otto, who invented it in 1867. The four strokes are illustrated in Figure 1. They are:

Intake stroke
Compression stroke
Combustion stroke
Exhaust stroke
You can see in the figure that a device called a piston replaces the potato in the potato cannon. The piston is connected to the crankshaft by a connecting rod. As the crankshaft revolves, it has the effect of "resetting the cannon." Here's what happens as the engine goes through its cycle:

The piston starts at the top, the intake valve opens, and the piston moves down to let the engine take in a cylinder-full of air and gasoline. This is the intake stroke. Only the tiniest drop of gasoline needs to be mixed into the air for this to work. (Part 1 of the figure)
Then the piston moves back up to compress this fuel/air mixture. Compression makes the explosion more powerful. (Part 2 of the figure)
When the piston reaches the top of its stroke, the spark plug emits a spark to ignite the gasoline. The gasoline charge in the cylinder explodes, driving the piston down. (Part 3 of the figure)
Once the piston hits the bottom of its stroke, the exhaust valve opens and the exhaust leaves the cylinder to go out the tailpipe. (Part 4 of the figure)
Now the engine is ready for the next cycle, so it intakes another charge of air and gas.
Notice that the motion that comes out of an internal combustion engine is rotational, while the motion produced by a potato cannon is linear (straight line). In an engine the linear motion of the pistons is converted into rotational motion by the crankshaft. The rotational motion is nice because we plan to turn (rotate) the car's wheels with it anyway.

Basic Engine Parts

The core of the engine is the cylinder, with the piston moving up and down inside the cylinder. The engine described above has one cylinder. That is typical of most lawn mowers, but most cars have more than one cylinder (four, six and eight cylinders are common). In a multi-cylinder engine, the cylinders usually are arranged in one of three ways: inline, V or flat (also known as horizontally opposed or boxer), as shown in the following figures.




Figure 1. Inline - The cylinders are arranged in a line in a single bank.




Figure 2. V - The cylinders are arranged in two banks set at an angle to one another.




Figure 3. Flat - The cylinders are arranged in two banks on opposite sides of the engine.

Different configurations have different advantages and disadvantages in terms of smoothness, manufacturing cost and shape characteristics. These advantages and disadvantages make them more suitable for certain vehicles.

Let's look at some key engine parts in more detail.

Spark plug
The spark plug supplies the spark that ignites the air/fuel mixture so that combustion can occur. The spark must happen at just the right moment for things to work properly.

Valves
The intake and exhaust valves open at the proper time to let in air and fuel and to let out exhaust. Note that both valves are closed during compression and combustion so that the combustion chamber is sealed.

Piston
A piston is a cylindrical piece of metal that moves up and down inside the cylinder.

Piston rings
Piston rings provide a sliding seal between the outer edge of the piston and the inner edge of the cylinder. The rings serve two purposes:

They prevent the fuel/air mixture and exhaust in the combustion chamber from leaking into the sump during compression and combustion.
They keep oil in the sump from leaking into the combustion area, where it would be burned and lost.
Most cars that "burn oil" and have to have a quart added every 1,000 miles are burning it because the engine is old and the rings no longer seal things properly.

Connecting rod
The connecting rod connects the piston to the crankshaft. It can rotate at both ends so that its angle can change as the piston moves and the crankshaft rotates.

Crankshaft
The crankshaft turns the piston's up and down motion into circular motion just like a crank on a jack-in-the-box does.

Sump
The sump surrounds the crankshaft. It contains some amount of oil, which collects in the bottom of the sump (the oil pan).


Engine Problems

So you go out one morning and your engine will turn over but it won't start... What could be wrong? Now that you know how an engine works, you can understand the basic things that can keep an engine from running. Three fundamental things can happen: a bad fuel mix, lack of compression or lack of spark. Beyond that, thousands of minor things can create problems, but these are the "big three." Based on the simple engine we have been discussing, here is a quick rundown on how these problems affect your engine:

Bad fuel mix - A bad fuel mix can occur in several ways:

You are out of gas, so the engine is getting air but no fuel.
The air intake might be clogged, so there is fuel but not enough air.
The fuel system might be supplying too much or too little fuel to the mix, meaning that combustion does not occur properly.
There might be an impurity in the fuel (like water in your gas tank) that makes the fuel not burn.
Lack of compression - If the charge of air and fuel cannot be compressed properly, the combustion process will not work like it should. Lack of compression might occur for these reasons:

Your piston rings are worn (allowing air/fuel to leak past the piston during compression).
The intake or exhaust valves are not sealing properly, again allowing a leak during compression.
There is a hole in the cylinder.
The most common "hole" in a cylinder occurs where the top of the cylinder (holding the valves and spark plug and also known as the cylinder head) attaches to the cylinder itself. Generally, the cylinder and the cylinder head bolt together with a thin gasket pressed between them to ensure a good seal. If the gasket breaks down, small holes develop between the cylinder and the cylinder head, and these holes cause leaks.



Lack of spark - The spark might be nonexistent or weak for a number of reasons:

If your spark plug or the wire leading to it is worn out, the spark will be weak.
If the wire is cut or missing, or if the system that sends a spark down the wire is not working properly, there will be no spark.
If the spark occurs either too early or too late in the cycle (i.e. if the ignition timing is off), the fuel will not ignite at the right time, and this can cause all sorts of problems.
Many other things can go wrong. For example:

If the battery is dead, you cannot turn over the engine to start it.
If the bearings that allow the crankshaft to turn freely are worn out, the crankshaft cannot turn so the engine cannot run.
If the valves do not open and close at the right time or at all, air cannot get in and exhaust cannot get out, so the engine cannot run.
If someone sticks a potato up your tailpipe, exhaust cannot exit the cylinder so the engine will not run.
If you run out of oil, the piston cannot move up and down freely in the cylinder, and the engine will seize.
In a properly running engine, all of these factors are within tolerance.

As you can see, an engine has a number of systems that help it do its job of converting fuel into motion.

Engine Valve Train and Ignition Systems

Most engine subsystems can be implemented using different technologies, and better technologies can improve the performance of the engine. Let's look at all of the different subsystems used in modern engines, beginning with the valve train.

The valve train consists of the valves and a mechanism that opens and closes them. The opening and closing system is called a camshaft. The camshaft has lobes on it that move the valves up and down, as shown in Figure 5.



Most modern engines have what are called overhead cams. This means that the camshaft is located above the valves, as you see in Figure 5. The cams on the shaft activate the valves directly or through a very short linkage. Older engines used a camshaft located in the sump near the crankshaft. Rods linked the cam below to valve lifters above the valves. This approach has more moving parts and also causes more lag between the cam's activation of the valve and the valve's subsequent motion. A timing belt or timing chain links the crankshaft to the camshaft so that the valves are in sync with the pistons. The camshaft is geared to turn at one-half the rate of the crankshaft. Many high-performance engines have four valves per cylinder (two for intake, two for exhaust), and this arrangement requires two camshafts per bank of cylinders, hence the phrase "dual overhead cams." See How Camshafts Work for details.

The ignition system (Figure 6) produces a high-voltage electrical charge and transmits it to the spark plugs via ignition wires. The charge first flows to a distributor, which you can easily find under the hood of most cars. The distributor has one wire going in the center and four, six, or eight wires (depending on the number of cylinders) coming out of it. These ignition wires send the charge to each spark plug. The engine is timed so that only one cylinder receives a spark from the distributor at a time. This approach provides maximum smoothness.

Engine Cooling, Air-intake and Starting Systems

The cooling system in most cars consists of the radiator and water pump. Water circulates through passages around the cylinders and then travels through the radiator to cool it off. In a few cars (most notably Volkswagen Beetles), as well as most motorcycles and lawn mowers, the engine is air-cooled instead (You can tell an air-cooled engine by the fins adorning the outside of each cylinder to help dissipate heat.). Air-cooling makes the engine lighter but hotter, generally decreasing engine life and overall performance.



So now you know how and why your engine stays cool. But why is air circulation so important? Most cars are normally aspirated, which means that air flows through an air filter and directly into the cylinders. High-performance engines are either turbocharged or supercharged, which means that air coming into the engine is first pressurized (so that more air/fuel mixture can be squeezed into each cylinder) to increase performance. The amount of pressurization is called boost. A turbocharger uses a small turbine attached to the exhaust pipe to spin a compressing turbine in the incoming air stream. A supercharger is attached directly to the engine to spin the compressor.




Increasing your engine's performance is great, but what exactly happens when you turn the key to start it? The starting system consists of an electric starter motor and a starter solenoid. When you turn the ignition key, the starter motor spins the engine a few revolutions so that the combustion process can start. It takes a powerful motor to spin a cold engine. The starter motor must overcome:

All of the internal friction caused by the piston rings
The compression pressure of any cylinder(s) that happens to be in the compression stroke
The energy needed to open and close valves with the camshaft
All of the "other" things directly attached to the engine, like the water pump, oil pump, alternator, etc.
Because so much energy is needed and because a car uses a 12-volt electrical system, hundreds of amps of electricity must flow into the starter motor. The starter solenoid is essentially a large electronic switch that can handle that much current. When you turn the ignition key, it activates the solenoid to power the motor.

Engine Lubrication, Fuel, Exhaust and Electrical Systems

When it comes to day-to-day car maintenance, your first concern is probably the amount of gas in your car. How does the gas that you put in power the cylinders? The engine's fuel system pumps gas from the gas tank and mixes it with air so that the proper air/fuel mixture can flow into the cylinders. Fuel is delivered in three common ways: carburetion, port fuel injection and direct fuel injection.

In carburetion, a device called a carburetor mixes gas into air as the air flows into the engine.
In a fuel-injected engine, the right amount of fuel is injected individually into each cylinder either right above the intake valve (port fuel injection) or directly into the cylinder (direct fuel injection).

Oil also plays an important part. The lubrication system makes sure that every moving part in the engine gets oil so that it can move easily. The two main parts needing oil are the pistons (so they can slide easily in their cylinders) and any bearings that allow things like the crankshaft and camshafts to rotate freely. In most cars, oil is sucked out of the oil pan by the oil pump, run through the oil filter to remove any grit, and then squirted under high pressure onto bearings and the cylinder walls. The oil then trickles down into the sump, where it is collected again and the cycle repeats.



Now that you know about some of the stuff that you put in your car, let's look at some of the stuff that comes out of it. The exhaust system includes the exhaust pipe and the muffler. Without a muffler, what you would hear is the sound of thousands of small explosions coming out your tailpipe. A muffler dampens the sound. The exhaust system also includes a catalytic converter.

The emission control system in modern cars consists of a catalytic converter, a collection of sensors and actuators, and a computer to monitor and adjust everything. For example, the catalytic converter uses a catalyst and oxygen to burn off any unused fuel and certain other chemicals in the exhaust. An oxygen sensor in the exhaust stream makes sure there is enough oxygen available for the catalyst to work and adjusts things if necessary.

Besides gas, what else powers your car? The electrical system consists of a battery and an alternator. The alternator is connected to the engine by a belt and generates electricity to recharge the battery. The battery makes 12-volt power available to everything in the car needing electricity (the ignition system, radio, headlights, windshield wipers, power windows and seats, computers, etc.) through the vehicle's wiring.


Producing More Engine Power

Using all of this information, you can begin to see that there are lots of different ways to make an engine perform better. Car manufacturers are constantly playing with all of the following variables to make an engine more powerful and/or more fuel efficient.

Increase displacement - More displacement means more power because you can burn more gas during each revolution of the engine. You can increase displacement by making the cylinders bigger or by adding more cylinders. Twelve cylinders seems to be the practical limit.

Increase the compression ratio - Higher compression ratios produce more power, up to a point. The more you compress the air/fuel mixture, however, the more likely it is to spontaneously burst into flame (before the spark plug ignites it). Higher-octane gasolines prevent this sort of early combustion. That is why high-performance cars generally need high-octane gasoline -- their engines are using higher compression ratios to get more power.

Stuff more into each cylinder - If you can cram more air (and therefore fuel) into a cylinder of a given size, you can get more power from the cylinder (in the same way that you would by increasing the size of the cylinder). Turbochargers and superchargers pressurize the incoming air to effectively cram more air into a cylinder.



Cool the incoming air - Compressing air raises its temperature. However, you would like to have the coolest air possible in the cylinder because the hotter the air is, the less it will expand when combustion takes place. Therefore, many turbocharged and supercharged cars have an intercooler. An intercooler is a special radiator through which the compressed air passes to cool it off before it enters the cylinder.

Let air come in more easily - As a piston moves down in the intake stroke, air resistance can rob power from the engine. Air resistance can be lessened dramatically by putting two intake valves in each cylinder. Some newer cars are also using polished intake manifolds to eliminate air resistance there. Bigger air filters can also improve air flow.

Let exhaust exit more easily - If air resistance makes it hard for exhaust to exit a cylinder, it robs the engine of power. Air resistance can be lessened by adding a second exhaust valve to each cylinder (a car with two intake and two exhaust valves has four valves per cylinder, which improves performance -- when you hear a car ad tell you the car has four cylinders and 16 valves, what the ad is saying is that the engine has four valves per cylinder). If the exhaust pipe is too small or the muffler has a lot of air resistance, this can cause back-pressure, which has the same effect. High-performance exhaust systems use headers, big tail pipes and free-flowing mufflers to eliminate back-pressure in the exhaust system. When you hear that a car has "dual exhaust," the goal is to improve the flow of exhaust by having two exhaust pipes instead of one.

Make everything lighter - Lightweight parts help the engine perform better. Each time a piston changes direction, it uses up energy to stop the travel in one direction and start it in another. The lighter the piston, the less energy it takes.

Inject the fuel - Fuel injection allows very precise metering of fuel to each cylinder. This improves performance and fuel economy

Engine Questions and Answers

1.What is the difference between a gasoline engine and a diesel engine?

In a diesel engine, there is no spark plug. Instead, diesel fuel is injected into the cylinder, and the heat and pressure of the compression stroke cause the fuel to ignite. Diesel fuel has a higher energy density than gasoline, so a diesel engine gets better mileage.

2.What is the difference between a two-stroke and a four-stroke engine?

Most chain saws and boat motors use two-stroke engines. A two-stroke engine has no moving valves, and the spark plug fires each time the piston hits the top of its cycle. A hole in the lower part of the cylinder wall lets in gas and air. As the piston moves up it is compressed, the spark plug ignites combustion, and exhaust exits through another hole in the cylinder. You have to mix oil into the gas in a two-stroke engine because the holes in the cylinder wall prevent the use of rings to seal the combustion chamber. Generally, a two-stroke engine produces a lot of power for its size because there are twice as many combustion cycles occurring per rotation. However, a two-stroke engine uses more gasoline and burns lots of oil, so it is far more polluting.

3.Is there any advantages to steam engines and other external combustion engines?

The main advantage of a steam engine is that you can use anything that burns as the fuel. For example, a steam engine can use coal, newspaper or wood for the fuel, while an internal combustion engine needs pure, high-quality liquid or gaseous fuel.

4.Why have eight cylinders in an engine?

Why not have one big cylinder of the same displacement of the eight cylinders instead? There are a couple of reasons why a big 4.0-liter engine has eight half-liter cylinders rather than one big 4-liter cylinder. The main reason is smoothness. A V-8 engine is much smoother because it has eight evenly spaced explosions instead of one big explosion. Another reason is starting torque. When you start a V-8 engine, you are only driving two cylinders (1 liter) through their compression strokes, but with one big cylinder you would have to compress 4 liters instead.

How are 4-cylinder and V6 engines different?

The number of cylinders that an engine contains is an important factor in the overall performance of the engine. Each cylinder contains a piston that pumps inside of it and those pistons connect to and turn the crankshaft. The more pistons there are pumping, the more combustive events are taking place during any given moment. That means that more power can be generated in less time.

4-Cylinder engines commonly come in “straight” or “inline” configurations while 6-cylinder engines are usually configured in the more compact “V” shape, and thus are referred to as V6 engines. V6 engines have been the engine of choice for American automakers because they’re powerful and quiet but still light and compact enough to fit into most car designs.



Historically, American auto consumers turned their noses up at 4-cylinder engines, believing them to be slow, weak, unbalanced and short on acceleration. However, when Japanese auto makers, such as Honda and Toyota, began installing highly-efficient 4-cylinder engines in their cars in the 1980s and 90s, Americans found a new appreciation for the compact engine. Even though Japanese models, such as the Toyota Camry, began quickly outselling comparable American models, U.S. automakers, believing that American drivers were more concerned with power and performance, continued to produce cars with V6 engines. Today, with rising gas prices and greater public environmental awareness, Detroit seems to be reevaluating the 4-cylinder engine for its fuel efficiency and lower emissions.

As for the future of the V6, in recent years the disparity between 4-cylinder and V6 engines has lessened considerably. In order to keep up with the demand for high gas-mileage and lower emission levels, automakers have worked diligently to improve the overall performance of V6 engines. Many current V6 models come close to matching the gas-mileage and emissions standards of the smaller, 4-cylinder engines. So, with the performance and efficiency gaps between the two engines lessening, the decision to buy a 4-cylinder or V6 may just come down to cost. In models that are available with either type of engine, the 4-cylinder version can run up to $1000 cheaper than the V6. So, regardless of what kind of performance you’re looking to get out of your car, the 4-cylinder will always be the budget buy.

One final note: It’s not a good idea to try to install a V6 engine into a car model that comes with a standard 4-cylinder. Retrofitting a 4-cylinder car to handle a V6 engine could cost more than simply buying a new car.

Sunday, November 1, 2009

Quartz Watches

Introduction to How Quartz Watches Work

During the 1970s, the "quartz watch" burst onto the scene as the newest high-tech gadget. Initially, these watches had red LED displays and they cost around $500 in the United States. Since then, the quartz watch has evolved so that either an LCD or a traditional mechanical (hour and minute hand) movement displays the time, and the price has fallen dramatically. It is not uncommon to find quartz watches given away for free in boxes of cereal!



Have you ever wondered why it is called a quartz watch? Or why quartz watches are so much more accurate than wind-up watches?

Before Quartz

The wind-up watch is an amazing piece of technology itself! It is part of a continuous research-and-development effort that started at the end of the 14th Century. Over the years, different innovations made wind-up watches smaller, thinner, more reliable, more accurate and even self-winding!

The components that you find in today's wind-up watches have been around for centuries:

A spring to provide the power
Some sort of oscillating mass to provide a timebase
Two or more hands
An enumerated dial on the face of the watch
Gears to slow down from the ticking rate of the oscillating mass and connect the mass and spring to the hands on the dial
See How Pendulum Clocks Work for a description of these different parts.

By the end of the 1960s, the Bulova watch company made the first step away from the oscillating balance wheel -- it used a transistor oscillator that maintained a tuning fork. This watch hummed at some hundreds of hertz (Hz, cycles per second) rather than ticking! Cogs and wheels still converted the mechanical movement of the tuning fork to movement of the hands, but two major steps had been taken:

The replacement of the balance wheel and spring with a single-material resonator: the tuning fork
The replacement of the wind-up main spring with a battery
A watch-making company in the late 1960s was bound to look for the next step -- a technology that would give even better time keeping than the tuning fork. Integrated circuits were very new at the time, but the price was dropping rapidly and the number of transistors was growing. LEDs were also new on the scene. There were still a couple of problems to be solved: finding a new timing element and designing an integrated circuit that would use very little power to allow the watch to run on a tiny internal battery.

The Quartz Crystal

There was no problem with the choice of a timing element. The quartz crystal is possibly thousands of times better for timing than the tuning fork, and quartz crystals had been around for many years. Only the type and the frequency of the crystal needed to be chosen. The difficulty was in the selection of the integrated circuit technology that would function at sufficiently low power.

Quartz crystals have been in regular use for many years to give an accurate frequency for all radio transmitters, radio receivers and computers. Their accuracy comes from an amazing set of coincidences: Quartz -- which is silicon dioxide like most sand -- is unaffected by most solvents and remains crystalline to hundreds of degrees Fahrenheit. The property that makes it an electronic miracle is the fact that, when compressed or bent, it generates a charge or voltage on its surface. This is a fairly common phenomenon called the Piezoelectric effect. In the same way, if a voltage is applied, quartz will bend or change its shape very slightly.

If a bell were shaped by grinding a single crystal of quartz, it would ring for minutes after being tapped. Almost no energy is lost in the material. A quartz bell -- if shaped in the right direction to the crystalline axis -- will have an oscillating voltage on its surface, and the rate of oscillation is unaffected by temperature. If the surface voltage on the crystal is picked off with plated electrodes and amplified by a transistor or integrated circuit, it can be re-applied to the bell to keep it ringing.

A quartz bell could be made, but it is not the best shape because too much energy is coupled to the air. The best shapes are a straight bar or a disk. A bar has the advantage of keeping the same frequency provided the ratio of length to width remains the same. A quartz bar can be tiny and oscillate at a relatively low frequency -- 32 kilohertz (KHz) is usually chosen for watches not only for size, but also because the circuits that divide down from the crystal frequency to the few pulses per second for the display need more power for higher frequencies. Power was a big problem for early watches, and the Swiss spent millions trying to bring forward integrated-circuit technology to divide down from the 1 to 2 MHz the more stable disk crystals generate.

Modern quartz watches now use a low-frequency bar or tuning-fork-shaped crystal. Often, these crystals are made from thin sheets of quartz plated like an integrated circuit and etched chemically to shape. The major difference between good and indifferent time keeping is the initial frequency accuracy and the precision of the angle of cut of the quartz sheet with respect to the crystalline axis. The amount of contamination that is allowed to get through the encapsulation to the crystal surface inside the watch can also affect the accuracy.

The electronics of the watch initially amplifies noise at the crystal frequency. This builds or regenerates into oscillation -- it starts the crystal ringing. The output of the watch crystal oscillator is then converted to pulses suitable for the digital circuits. These divide the crystal's frequency down and then translate it into the proper format for the display,in a quartz watch with hands, the dividers create one-second pulses that drive a tiny electric motor, and this motor is connected to standard gears to drive the hands.

Digital Clocks

Introduction to How Digital Clocks Work

Chances are that in your bedroom you have a digital clock beside your bed. Have you ever looked at it in the morning and wondered how it works?



In this Post, you're going to learn exactly how a digital clock (or wristwatch) works. In fact, you're even going to learn how to build your own!

The Basics

If you have read How Pendulum Clocks Work, you know that all clocks (regardless of technology) have a few required components:
A source of power to run the clock
In a pendulum clock, the weights or the springs handle this role.

An accurate timebase that acts as the clock's heartbeat
In a pendulum clock, the pendulum and escapement handle this role.

A way to gear down the timebase to extract different components of time (hours, minutes, seconds)
In a pendulum clock, gears serve this role.

A way to display the time
In a pendulum clock, the hands and face serve this role.
A digital clock is no different. It simply handles these functions electronically rather than mechanically. So in a digital clock, there is an electrical power supply (either a battery or 120-volt AC power from the wall). There is an electronic timebase that "ticks" at some known and accurate rate. There is an electronic "gearing mechanism" of some sort -- generally a digital clock handles gearing with a component called a "counter." And there is a display, usually either LEDs (light emitting diodes) or an LCD (liquid crystal display).

High-Level View

Here is a quick overview of the components of a digital clock at a high level.
At the heart of the clock there is a piece that can generate an accurate 60-hertz (Hz, oscillations per second) signal. There are two ways to generate this signal:

The signal can be extracted from the 60-Hz oscillations in a normal power line. Many clocks that get their power from a wall socket use this technique because it is cheap and easy. The 60-Hz signal on the power line is reasonably accurate for this purpose.

The signal can be generated using a crystal oscillator. Obviously, any battery-operated clock or wristwatch will use this technique instead. It takes more parts, but is generally much more accurate.
The 60-Hz signal is divided down using a counter. When building your own clock, a typical TTL part to use is a 7490 decade counter. This part can be configured to divide by any number between 2 and 10, and generates a binary number as output. So you take your 60-Hz time base, divide it by 10, divide it by 6 and now you have a 1-Hz (1 oscillation per second) signal. This 1-Hz signal is perfect for driving the "second hand" portion of the display. So far, the clock looks like this in a block diagram:




To actually see the seconds, then the output of the counters needs to drive a display. The two counters produce binary numbers. The divide-by-10 counter is producing a 0-1-2-3-4-5-6-7-8-9 sequence on its outputs, while the divide-by-6 counter is producing a 0-1-2-3-4-5 sequence on its outputs. We want to display these binary numbers on something called a 7-segment display. A 7-segment display has seven bars on it, and by turning on different bars you can display different numbers:



To convert a binary number between 0 and 9 to the appropriate signals to drive a 7-segment display, you use a (appropriately named) "binary number to 7-segment display converter." This chip looks at the binary number coming in and turns on the appropriate bars in the 7-segment LED to display that number. If we are displaying the seconds, then the seconds part of our clock looks like this:




The output from this stage oscillates at a frequency of one-cycle-per-minute. You can imagine that the minutes section of the clock looks exactly the same. Finally, the hours section looks almost the same except that the divide-by-6 counter is replaced by a divide-by-2 counter.

Now there are two details left to figure out if you are building a real clock:

The clock as designed here does not understand that at 12:59:59 it is supposed to cycle back to 1:00. That is a messy little problem, and there are a couple of ways to solve it. One technique involves creating a little bit of logic that can detect the number 13 and reset the hour section back to 1 (not zero). Another technique involves using an adder. For our purposes, it is easier to deal in military time, because military time includes a zero hour.

We need a way to set the clock. Typically this is handled by gating higher-than-normal frequencies into the minutes section. For example, most clocks have "fast" and "slow" set buttons. When you press the "fast" button, the 60-Hz signal is driven straight into the minutes counter. When you press the "slow" button, a 1-Hz signal is driven into the minutes section. There are other possible techniques, but this one is the most common.

Building Your Own Digital Clock

The best way to understand the different components of a digital clock and how they work together is to actually walk through the steps of building your own clock. Here we will build just the "seconds" part of the clock, but you can easily extend things to build a complete clock with hours, minutes and seconds. To understand these steps, you will need to have read How Boolean Logic Works and How Electronic Gates Work. In particular, the electronic gates article introduces you to TTL chips, breadboards and power supplies. If you have already played around with gates as described in that article, then the description here will make a lot more sense.
The first thing we need is a power supply. We built one in the electronic gates article. That time, we used a standard wall transformer that produced DC (direct current) power and then regulated it to 5 volts using a 7805. For our clock, we want to do things slightly differently because we are going to extract our 60-Hz timebase from the power line. That means that we want an AC rather than a DC transformer, and we will use a part called a bridge rectifier to convert the AC to DC. Therefore, we need the following parts for our power supply:

Part name Jameco part #
12-volt AC transformer 115602
Bridge rectifier 103018
7805 5-volt regulator (TO-220 case) 51262
Two 470-microfarad electrolytic capacitors 93817
5.1-volt zener diode 36097
1-K-ohm resistor 29663

A few notes on the parts used:

The difference between the AC transformer we are using here and the DC transformer we used in the article on gates is that the AC transformer preserves the 60-Hz sine wave found in 120-volt household current. If you want to use your volt-ohm meter to measure the voltage of an AC transformer, be sure you use an AC voltage range rather than a DC range.

We use the bridge rectifier to convert the AC to DC. One of the terminals on the rectifier will be marked with a "+" -- from that you can find the minus and AC inputs. There is no polarity to an AC transformer, so it does not matter which transformer lead you connect to which AC lead of the rectifier.

The resistor and the zener diode extract a 60-Hz signal from the transformer's sine wave. A diode is a one-way valve for electrons. A zener diode is also a one-way valve, but it also passes electrons in the other direction if they are above a certain voltage. The zener diode therefore turns a 10-volt sine wave into a clipped wave oscillating between 0 and 5 volts. This is perfect for clocking the TTL counters. The 1-K-ohm resistor makes sure that the current to the zener diode is limited so we do not burn out the diode. The diode will have a band painted on one end -- this band should be the end connected to the resistor.

Circuit Diagram

Here's a circuit diagram for the power supply and time base:



To create the rest of the clock you will need:

At least four 7490 or 74LS90 chips
At least two 7447 or 74LS47 binary-to-7-segment converters
At least 20 resistors for the LEDs in the 7-segment displays (330 ohms would be fine.)
Some normal LEDs
At least two common-anode (CA) 7-segment LED displays (Jameco part # 17208 is typical.)
Breadboards, wire, etc. (See this page for a complete list.)
The number of chips, resistors and LEDs you need depends on how many digits you are interested in implementing. Here we will discuss only seconds, so the "at least" numbers are correct.

7490 Pinout

Let's look at the 7490 briefly to see how it works. Here is the pinout:



The 7490 is a decade counter, meaning it is able to count from 0 to 9 cyclically, and that is its natural mode. That is, QA, QB, QC and QD are 4 bits in a binary number, and these pins cycle through 0 to 9, like this:

QD QC QB QA
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1
0 1 1 0
0 1 1 1
1 0 0 0
1 0 0 1


You can also set the chip up to count up to other maximum numbers and then return to zero. You "set it up" by changing the wiring of the R01, R02, R91 and R92 lines. If both R01 and R02 are 1 (5 volts) and either R91 or R92 are 0 (ground), then the chip will reset QA, QB, QC and QD to 0. If both R91 and R92 are 1 (5 volts), then the count on QA, QB, QC and QD goes to 1001 (5). So:

To create a divide-by-10 counter, you first connect pin 5 to +5 volts and pin 10 to ground to power the chip. Then you connect pin 12 to pin 1 and ground pins 2, 3, 6, and 7. You run the input clock signal (from the timebase or a previous counter) in on pin 14. The output appears on QA, QB, QC and QD. Use the output on pin 11 to connect to the next stage.

To create a divide-by-6 counter, you first connect pin 5 to +5 volts and pin 10 to ground to power the chip. Then you connect pin 12 to pin 1 and ground pins 6 and 7. Connect pin 2 to pin 9 and pin 3 to pin 8. Run the input clock signal (from the timebase or a previous counter) in on pin 14. The output appears on QA, QB and QC. Use pin 8 to connect to the next stage.

Creating the Second Hand

Knowing all of this, you can easily create the "second hand" of a digital clock. It looks like this:



In this diagram, the top two 7490s divide the 60-Hz signal from the power supply down by a factor of 60. The third 7490 takes a 1-hertz signal as input and divides it by 10. Its four outputs drive normal LEDs in this diagram. The fourth 7490 divides the output of the third by 6, and its three outputs drive normal LEDs as well. What you have at this point is a "second hand" for your clock, with the output of the second hand appearing in binary. If you would like to create a clock that displays the time in binary, then you are set! Here is a view of a breadboard containing a divide-by-10 counter, a divide-by-6 counter and a set of LEDs to display the output of the counters in binary:




If you pack things tighter and do a neater wiring job, you can fit up to four counters on a single breadboard.

Displaying the Time as Numerals

If you want to display the time as numerals, you need to use the 7447s. Here is the pinout of a 7447, as well as the segment labeling for a 7-segment LED:




You connect a 7447 to a 7490 like this:

Provide +5 volts on pin 16 and ground on pin 8 to power the 7447 chip.
Connect QA, QB, QC and QD from a 7490 to pins 7, 1, 2 and 6 of the 7447, respectively.
Connect 330-ohm resistors to pins 13, 12, 11, 10, 9, 15 and 14 of the 7447, and connect those resistors to the a, b, c, d, e, f, and g segments of the 7-segment LED.
Connect the common anode of the 7-segment LED to +5 volts.



You will need to have the pinout for the specific LED display that you use so that you know how to wire the outputs of the 7447 to the LEDs in the 7-segment device. (Also, note that the 7448 is equivalent to the 7447 except that it drives common-cathode displays. Ground the common cathode of the LED in that case.)

You can see that by extending the circuit, we can easily create a complete clock. To create the "minute hand" section of the clock, all that you need to do is duplicate the "second hand" portion. To create the "hour hand" portion, you are going to want to be creative. Probably the easiest solution is to create a clock that displays military time. Then you will want to use an AND gate (or the R inputs of the 7490) to recognize the binary number 24 and use the output of the recognizer to reset the hour counters to zero.

The final piece you need to create is a setting mechanism. On a breadboard, it is easy to set the clock -- just move the input wires to drive higher-frequency signals into the minute-hand section of the clock. In a real clock, you would use pushbuttons or switches and gates to do the same thing.

If you happen to take your bedside clock or watch apart, one thing you will notice is that there are probably not 15 TTL ICs inside. In fact, you may not be able to find a chip at all. In most modern clocks and watches, all of the functions of the clock (including the alarm and any other features) are all integrated into one low-power chip (in a watch, the chip and display together consume only about a millionth of a watt). That chip is probably embedded directly into the circuit board. You might be able to see a blob of black plastic protecting this chip. That one tiny chip contains all of the components we have discussed here.

Now you have a complete understanding of how digital clocks work.

Atomic Clocks

Introduction to How Atomic Clocks Work

When the power goes out and is later restored, how do you know what time to set your clocks to? Have you ever wondered how time is regulated?

In the United States, the standard of time is regulated by the US Naval Observatory's Master Clock (USNO), the official source of time for the Department of Defense. The effects of these mechanisms are felt by all of us in the f­orm of alarm clocks, computers, answering machines and meeting schedules.

Are Atomic Clocks Radioactive?

Atomic clocks keep time better than any other clock. They even keep time better than the rotation of the Earth and the movement of the stars. Without atomic clocks, GPS navigation would be impossible, the Internet would not synchronize, and the position of the planets would not be known with enough accuracy for space probes and landers to be launched and monitored.
Atomic clocks are not radioactive. They do not rely on atomic decay. Rather, they have an oscillating mass and a spring, just like ordinary clocks.

The big difference between a standard clock in your home and an atomic clock is that the oscillation in an atomic clock is between the nucleus of an atom and the surrounding electrons. This oscillation is not exactly a parallel to the balance wheel and hairspring of a clockwork watch, but the fact is that both use oscillations to keep track of passing time. The oscillation frequencies within the atom are determined by the mass of the nucleus and the gravity and electrostatic "spring" between the positive charge on the nucleus and the electron cloud surrounding it.

What Are The Types of Atomic Clocks?

Today, though there are different types of atomic clocks, the principle behind all of them remains the same. The major difference is associated with the element used and the means of detecting when the energy level changes. The various types of atomic clocks include:
Cesium atomic clocks employ a beam of cesium atoms. The clock separates cesium atoms of different energy levels by magnetic field.
Hydrogen atomic clocks maintain hydrogen atoms at the required energy level in a container with walls of a special material so that the atoms don't lose their higher energy state too quickly.
Rubidium atomic clocks, the simplest and most compact of all, use a glass cell of rubidium gas that changes its absorption of light at the optical rubidium frequency when the surrounding microwave frequency is just right.
The most accurate atomic clocks available today use the cesium atom and the normal magnetic fields and detectors. In addition, the cesium atoms are stopped from zipping back and forth by laser beams, reducing small changes in frequency due to the Doppler effect.


How Does a Practical Cesium Atomic Clock Work?

Atoms have characteristic oscillation frequencies. Perhaps the most familiar frequency is the orange glow from the sodium in table salt if it is sprinkled on a flame. An atom will have many frequencies, some at radio wavelength, some in the visible spectrum, and some in between the two. Cesium 133 is the element most commonly chosen for atomic clocks.

To turn the cesium atomic resonance into an atomic clock, it is necessary to measure one of its transition or resonant frequencies accurately. This is normally done by locking a crystal oscillator to the principal microwave resonance of the cesium atom. This signal is in the microwave range of the radio spectrum, and just happens to be at the same sort of frequency as direct broadcast satellite signals. Engineers understand how to build equipment in this area of the spectrum in great detail.

To create a clock, cesium is first heated so that atoms boil off and pass down a tube maintained at a high vacuum. First they pass through a magnetic field that selects atoms of the right energy state; then they pass through an intense microwave field. The frequency of the microwave energy sweeps backward and forward within a narrow range of frequencies, so that at some point in each cycle it crosses the frequency of exactly 9,192,631,770 Hertz (Hz, or cycles per second). The range of the microwave generator is already close to this exact frequency, as it comes from an accurate crystal oscillator. When a cesium atom receives microwave energy at exactly the right frequency, it changes its energy state.

At the far end of the tube, another magnetic field separates out the atoms that have changed their energy state if the microwave field was at exactly the correct frequency. A detector at the end of the tube gives an output proportional to the number of cesium atoms striking it, and therefore peaks in output when the microwave frequency is exactly correct. This peak is then used to make the slight correction necessary to bring the crystal oscillator and hence the microwave field exactly on frequency. This locked frequency is then divided by 9,192,631,770 to give the familiar one pulse per second required by the real world.

Some Definitions

Atomic Clock - A precision clock that depends for its operation on an electrical oscillator regulated by the natural vibration frequencies of an atomic system (as a beam of cesium atoms)

Atom - The smallest particle of an element that can exist either alone or in combination; the atom is considered to be a source of vast potential energy

Cesium 133 - An isotope of cesium used especially in atomic clocks and one of whose atomic transitions is used as a scientific time standard

SI Second (atomic second) - The interval of time taken to complete 9,192,631,770 oscillations of the cesium 133 atom exposed to a suitable excitation

When Was The Atomic Clock Invented?

In 1945, Columbia University physics professor Isidor Rabi suggested that a clock could be made from a technique he developed in the 1930s called atomic beam magnetic resonance. By 1949, the National Bureau of Standards (NBS, now the National Institute of Standards and Technology, NIST) announced the world’s first atomic clock using the ammonia molecule as the source of vibrations, and by 1952 it announced the first atomic clock using cesium atoms as the vibration source, NBS-1.
In 1955, the National Physical Laboratory in England built the first cesium-beam clock used as a calibration source. Over the next decade, more advanced forms of the clocks were created. In 1967, the 13th General Conference on Weights and Measures defined the SI second on the basis of vibrations of the cesium atom; the world’s time keeping system no longer had an astronomical basis at that point! NBS-4, the world’s most stable cesium clock, was completed in 1968, and was used into the 1990s as part of the NIST time system.

In 1999, NIST-F1 began operation with an uncertainty of 1.7 parts in 10 to the 15th power, or accuracy to about one second in 20 million years, making it the most accurate clock ever made (a distinction shared with a similar standard in Paris).

How Is Atomic Time Measured?

The correct frequency for the particular cesium resonance is now defined by international agreement as 9,192,631,770 Hz so that when divided by this number the output is exactly 1 Hz, or 1 cycle per second.
The long-term accuracy achievable by modern cesium atomic clocks (the most common type) is better than one second per one million years. Hydrogen atomic clocks show a better short-term (one week) accuracy, approximately 10 times the accuracy of cesium atomic clocks. Therefore, the atomic clocks have increased the accuracy of time measurement about one million times in comparison with the measurements carried out by means of astronomical techniques.

The National Company in Massachusetts produced the first commercial atomic clocks using cesium. Today, they are produced by various manufacturers, including Hewlett Packard, Frequency Electronics, and FTS. New technology continues to improve performance. The most accurate laboratory cesium atomic clocks are thousands of times better than commercially produced units.