Showing posts with label teardown. Show all posts
Showing posts with label teardown. Show all posts

Inside the Globus INK: a mechanical navigation computer for Soviet spaceflight

The Soviet space program used completely different controls and instruments from American spacecraft. One of the most interesting navigation instruments onboard Soyuz spacecraft was the Globus, which used a rotating globe to indicate the spacecraft's position above the Earth. This navigation instrument was an electromechanical analog computer that used an elaborate system of gears, cams, and differentials to compute the spacecraft's position. Officially, the unit was called a "space navigation indicator" with the Russian acronym ИНК (INK),1 but I'll use the more descriptive nickname "Globus".

The INK-2S "Globus" space navigation indicator. Coincidentally, the latitude indicator matches the Ukrainian flag.

The INK-2S "Globus" space navigation indicator. Coincidentally, the latitude indicator matches the Ukrainian flag.

We recently received a Globus from a collector and opened it up for repair and reverse engineering. In this blog post, I explain how it operated, show its internal mechanisms, and describe what I've learned so far from reverse engineering. The photo below gives an idea of the mechanical complexity of this device, which also has a few relays, solenoids, and other electrical components.

Side view of the Globus INK. Click this (or any other image) for a larger version.

Side view of the Globus INK. Click this (or any other image) for a larger version.

Functionality

The primary purpose of the Globus was to indicate the spacecraft's position. The globe rotated while fixed crosshairs on the plastic dome indicated the spacecraft's position. Thus, the globe matched the cosmonauts' view of the Earth, allowing them to confirm their location. Latitude and longitude dials next to the globe provided a numerical indication of location. Meanwhile, a light/shadow dial at the bottom showed when the spacecraft would be illuminated by the sun or in shadow, important information for docking. The Globus also had an orbit counter, indicating the number of orbits.

The Globus had a second mode, indicating where the spacecraft would land if they fired the retrorockets to initiate a landing. Flipping a switch caused the globe to rotate until the landing position was under the crosshairs and the cosmonauts could evaluate the suitability of this landing site.

The cosmonauts configured the Globus by turning knobs to set the spacecraft's initial position and orbital period. From there, the Globus electromechanically tracked the orbit. Unlike the Apollo Guidance Computer, the Globus did not receive navigational information from an inertial measurement unit (IMU) or other sources, so it did not know the spacecraft's real position. It was purely a display of the predicted position.

A close-up of the complex gear trains in the Globus.

A close-up of the complex gear trains in the Globus.

The globe

The globe itself is detailed for its small size, showing terrain features such as mountains, lakes, and rivers. These features on the map helped cosmonauts compare their position with the geographic features they could see on Earth. These features were also important for selecting a landing site, so they could see what kind of terrain they would be landing on. For the most part, the map doesn't show political boundaries, except for thick red and purple lines. This line shows the borders of the USSR, as well as the boundaries between communist and non-communist countries, also important for selecting a landing site. The globe also has numbered circles 1 through 8 that indicate radio sites for communication with the spacecraft, allowing the cosmonauts to determine what ground stations could be contacted.

A view of the globe showing Asia.

A view of the globe showing Asia.

Controlling the globe

On seeing the Globus, one might wonder how the globe is rotated. It may seem that the globe must be free-floating so it can rotate in two axes. Instead, a clever mechanism attaches the globe to the unit. The key is that the globe's equator is a solid piece of metal that rotates around the horizontal axis of the unit. A second gear mechanism inside the globe rotates the globe around the North-South axis. The two rotations are controlled by concentric shafts that are fixed to the unit, allowing two rotational degrees of freedom through fixed shafts.

The photo below shows the frame that holds and controls the globe. The dotted axis is fixed horizontally in the unit and rotations are fed through the two gears at the left. One gear rotates the globe and frame around the dotted axis, while the gear train causes the globe to rotate around the vertical polar axis (while the equator remains fixed).

The axis of the globe is at 51.8° to support that orbital inclination.

The axis of the globe is at 51.8° to support that orbital inclination.

The angle above is 51.8° which is very important: this is the inclination of the standard Soyuz orbit. As a result, simply rotating the globe around the dotted line causes the crosshair to trace the standard orbit.2 Rotating the two halves of the globe around the poles yields the different 51.8° orbits over the Earth's surface as the Earth rotates. (Why 51.8 degrees? The Baikonur Cosmodrome, launching point for Soyuz, is at 45.97° N latitude, so 45.97° would be the most efficient inclination. However, to prevent the launch from passing over western China, the rocket must be angled towards the north, resulting in 51.8° (details).)

One important consequence of this design is that the orbital inclination is fixed by the angle of the globe mechanism. Different Globus units needed to be built for different orbits. Moreover, this design only handles circular orbits, making it useless during orbit changes such as rendezvous and docking. These were such significant limitations that some cosmonauts wanted the Globus removed from the control panel, but it remained until it was replaced by a computer display in Soyuz-TMA (2002).3

A closeup of the gears that drive the motion of the two halves of the globe around the polar axis, leaving the equator fixed.

A closeup of the gears that drive the motion of the two halves of the globe around the polar axis, leaving the equator fixed.

This Globus had clearly suffered some damage. The back of the case had some large dents.7 More importantly, the globe's shaft had been knocked loose from its proper position and no longer meshed with the gears. This also put a gouge into Africa, where the globe hit internal components. Fortunately, CuriousMarc was able to get the globe back into position while ensuring that the gears had the right timing. (Putting the globe back arbitrarily would mess up the latitude and longitude.)

Orbital speed and the "cone"

An orbit of Soyuz takes approximately 90 minutes, but the time varies according to altitude.4 The Globus has an adjustment knob (below) to adjust the orbital period in minutes, tenths of minutes, and hundredths of minutes. The outer knob has three positions and points to the digit that changes when the inner knob is turned. The mechanism provides an adjustment of ±5 minutes from the nominal period of 91.85 minutes.3

The control to adjust the orbital period.

The control to adjust the orbital period.

The orbital speed feature is implemented by increasing or decreasing the speed at which the globe rotates around the orbital (horizontal) axis. Generating a variable speed is tricky, since the Globus runs on fixed 1-hertz pulses. The solution is to start with a base speed, and then add three increments: one for the minutes setting, one for the tenths-of-minutes setting, and one for the hundredths-of-minutes setting.5 These four speeds are added (as shaft rotation speeds) using obtain the overall rotation speed.

The Globus uses numerous differential gears to add or subtract rotations. The photo below shows two sets of differential gears, side-by-side.

Two differential gears in the Globus.

Two differential gears in the Globus.

The problem is how to generate these three variable rotation speeds from the fixed input. The solution is a special cam, shaped like a cone with a spiral cross-section. Three followers ride on the cam, so as the cam rotates, the follower is pushed outward and rotates on its shaft. If the follower is near the narrow part of the cam, it moves over a small distance and has a small rotation. But if the follower is near the wide part of the cam, it moves a larger distance and has a larger rotation. Thus, by moving the follower to a particular point on the cam, the rotational speed of the follower is selected.

A diagram showing the orbital speed control mechanism. The cone has three followers, but only two are visible from this angle. The "transmission" gears are moved in and out by the outer knob to select which follower is adjusted by the inner knob.

A diagram showing the orbital speed control mechanism. The cone has three followers, but only two are visible from this angle. The "transmission" gears are moved in and out by the outer knob to select which follower is adjusted by the inner knob.

Obviously, the cam can't spiral out forever. Instead, at the end of one revolution, its cross-section drops back sharply to the starting diameter. This causes the follower to snap back to its original position. To prevent this from jerking the globe backward, the follower is connected to the differential gearing via a slip clutch and ratchet. Thus, when the follower snaps back, the ratchet holds the drive shaft stationary. The drive shaft then continues its rotation as the follower starts cycling out again. Thus, the output is a (mostly) smooth rotation at a speed that depends on the position of the follower.

Latitude and longitude

The indicators at the left and the top of the globe indicate the spacecraft's latitude and longitude respectively. These are defined by surprisingly complex functions, generated by the orbit's projection onto the globe.6

The latitude and longitude functions are implemented through the shape of metal cams; the photo below shows the longitude mechanism. Each function has two cams: one cam implements the desired function, while the other cam has the "opposite" shape to maintain tension on the jaw-like tracking mechanism.

The cam mechanism to compute longitude.

The cam mechanism to compute longitude.

The latitude cam drives the latitude dial, causing it to oscillate between 51.8° N and 51.8° S. Longitude is more complicated because the Earth's rotation causes it to constantly vary. The longitude output on the dial is produced by adding the cam's value to the Earth's rotation through a differential gear.

Light and shadow

The Globus has an indicator to show when the spacecraft will enter light or shadow. The dial consists of two concentric dials, configured by the two knobs. These dials move with the spacecraft's orbit, while the red legend remains fixed. I think these dials are geared to the longitude dial, but I'm still investigating.

The light and shadow indicator is controlled by two knobs.

The light and shadow indicator is controlled by two knobs.

The landing location mechanism

The Globus can display where the spacecraft would land if you started a re-entry burn now, with an accuracy of 150 km. This is computed by projecting the current orbit forward by a partial orbit, depending on how long it would take to land. The cosmonaut specifies this value by the "landing angle", which indicates this fraction of an orbit as an angle. An electroluminescent indicator in the upper-left corner of the unit shows "Место посадки" (Landing place) to indicate this mode.

The landing angle control.

The landing angle control.

To obtain the landing position, a motor spins the globe until it is stopped after rotating through the specified angle. The mechanism to implement this is shown below. The adjustment knob on the panel turns the adjustment shaft which moves the limit switch to the desired angle via the worm gear. The wiring is wrapped around a wheel so the wiring stays controlled during this movement. When the drive motor is activated, it rotates the globe and the swing arm at the same time. Since the motor stops when the swing arm hits the angle limit switch, the globe rotates through the desired angle. The fixed limit switch is used when returning the globe's position to its regular, orbital position.

The landing angle function uses a complex mechanism.

The landing angle function uses a complex mechanism.

The landing location mode is activated by a three-position rotary switch. The first position "МП" (место посадки, landing site) selects the landing site, the second position "З" (Земля, Earth) shows the position over the Earth, and the third position "Откл" (off) undoes the landing angle rotation and turns off the mechanism.

The rotary switch to select the landing angle mode.

The rotary switch to select the landing angle mode.

Electronics

Although the Globus is mostly mechanical, it has an electronics board with four relays and a transistor, as well as resistors and diodes. I think that most of these relays control the landing location mechanism, driving the motor forward or backward and stopping at the limit switch. The diodes are flyback diodes, two diodes in series across each relay coil to eliminate the inductive kick when the coil is disconnected.

The electronics circuit board.

The electronics circuit board.

A 360° potentiometer (below) converts the spacecraft's orbital position into a voltage. Sources indicate that the Globus provides this voltage signal to other units on the spacecraft. My theory is that the transistor on the electronics board amplifies this voltage, but I am still investigating.

The potentiometer converts the orbital position into a voltage.
To the right is the cam that produces the longitude display. Antarctica is visible on the globe.

The potentiometer converts the orbital position into a voltage. To the right is the cam that produces the longitude display. Antarctica is visible on the globe.

The photo below shows the multiple wiring bundles in the Globus, at the front and the left. The electronics board is at the front right. The Globus contains a surprising amount of wiring for a device that is mostly mechanical. Inconveniently, all the wires to the box's external connector (upper left) were cut.7 Perhaps this was part of decommissioning the unit. However, one of the screws on the case is covered with a tamper-resistant wax seal with insignia, and this wax seal was intact. This indicates that the unit was officially re-sealed after cutting the wires, which doesn't make sense for a decommissioned unit.

This view shows the back and underside of the Globus. The round connector at the back left provided the interface with the rest of the spacecraft. The black wires under this connector were all cut.

This view shows the back and underside of the Globus. The round connector at the back left provided the interface with the rest of the spacecraft. The black wires under this connector were all cut.

The drive solenoids

The unit is driven by two ratchet solenoids: one for the orbital rotation and one for the Earth's rotation. These solenoids take 27-volt pulses at 1 hertz.3 Each pulse causes the solenoid to advance the gear by one tooth; a pawl keeps the gear from slipping back. These small rotations drive the gears throughout the Globus and result in a tiny movement of the globe.

One of the driving solenoids in the Globus. The wheels to indicate orbital time are underneath.

One of the driving solenoids in the Globus. The wheels to indicate orbital time are underneath.

The other driving solenoid in the Globus.

The other driving solenoid in the Globus.

Apollo-Soyuz

If you look closely at the globe, it has a bunch of pink dots added, along with three-letter labels in Latin (not Cyrillic) characters.8 In the photo below, you can see GDS (Goldstone), MIL (Merritt Island), BDA (Bermuda), and NFL (Newfoundland). These are NASA tracking sites, which implies that this Globus was built for the Apollo-Soyuz Test Project, a 1975 mission where an Apollo spacecraft docked with a Soyuz capsule.

North America as it appears on the globe. The US border is marked in red. The selection of cities seems a bit random, such as El Paso as the only western city until the coast.

North America as it appears on the globe. The US border is marked in red. The selection of cities seems a bit random, such as El Paso as the only western city until the coast.

Further confirmation of the Apollo-Soyuz connection is the VAN sticker in the middle of the Pacific Ocean (not visible above). The USNS Vanguard was a NASA tracking ship that was used in the Apollo program to fill in gaps in radio coverage. It was an oil tanker from World War II, converted postwar to a missile tracking ship and then used for Apollo. In the photo below, you can see the large tracking antennas on its deck. During the Apollo-Soyuz mission, Vanguard was stationed at 25 S 155 W for the Apollo-Soyuz mission, exactly matching the location of the VAN dot on the globe.

The USNS Vanguard with a NASA C-54 plane overhead. (source).

The USNS Vanguard with a NASA C-54 plane overhead. (source).

History

The Globus has a long history, back to the beginnings of Soviet crewed spaceflight. The first version was simpler and had the Russian acronym ИМП (IMP).9 Development of the IMP started in 1960 for the Vostok (1961) and Voshod (1964) spaceflights.

The Globus IMP. Photo from Francoisguay (CC BY-SA 3.0).

The Globus IMP. Photo from Francoisguay (CC BY-SA 3.0).

The basic functions of the earlier Globus IMP are similar to the INK, showing the spacecraft's position and the landing position. It has an orbit counter in the lower right. The latitude and longitude displays at the top were added for the Voshod flights. The large correction knob allows the orbital period to be adjusted. The main differences are that the IMP doesn't have a display at the bottom for sun and shade and doesn't have a control to set the landing angle.9 Unlike the INK, the mode (orbit vs landing position) was selected by external switches, rather than a switch on the unit.

The more complex INK model (described in this blog post) was created for the Soyuz flights, starting in 1967. It was part of the "Sirius" information display system (IDS). The Neptun IDS used on Soyuz-T (1976) and the Neptun-M for Soyuz-TM (1986) modernized much of the console but kept the Globus INK. The photo below shows the Globus mounted in the upper-right of a Soyuz-TM console.

The Neptun-M IDS for the Soyuz-TM (source).

The Neptun-M IDS for the Soyuz-TM (source).

The Soyuz-TMA (2002) upgraded to the Neptun-ME system3 which used digital display screens. In particular, the Globus was replaced with the graphical display below.

A computer display from the Neptune-ME display system used in the Soyuz-TMA spaceship. The Soyuz consoles are much simpler than the Apollo or Space Shuttle consoles, and built with completely different design principles. From Information Display Systems for Soyuz Spaceships.

A computer display from the Neptune-ME display system used in the Soyuz-TMA spaceship. The Soyuz consoles are much simpler than the Apollo or Space Shuttle consoles, and built with completely different design principles. From Information Display Systems for Soyuz Spaceships.

Conclusions

The Globus INK is a remarkable piece of machinery, an analog computer that calculates orbits through an intricate system of gears, cams, and differentials. It provided cosmonauts with a high-resolution, full-color display of the spacecraft's position, way beyond what an electronic space computer could provide in the 1960s.

Although the Globus is an amazing piece of mechanical computation, its functionality is limited. Its parameters must be manually configured: the spacecraft's starting position, the orbital speed, the light/shadow regions, and the landing angle. It doesn't take any external guidance inputs, such as an IMU (inertial measurement unit), so it's not particularly accurate. Finally, it only supports a circular orbit at a fixed angle. While the more modern digital display lacks the physical charm of a rotating globe, the digital solution provides much more capability.

I plan to continue reverse-engineering the Globus and hope to get it operational, so follow me on Twitter @kenshirriff or RSS for updates. I've also started experimenting with Mastodon recently as @oldbytes.space@kenshirriff. Many thanks to Marcel for providing the Globus. Thanks to Stack Overflow for orbit information and my Twitter followers for translation assistance.

I should give a disclaimer that I am still reverse-engineering the Globus, so what I described is subject to change. Also, I don't read Russian, so any errors are the fault of Google Translate. :-)

With the case removed, the complex internals of the Globus are visible.

With the case removed, the complex internals of the Globus are visible.

Notes and references

  1. In Russian, the name for the device is "Индикатор Навигационный Космический" abbreviated as ИНК (INK). This translates to "space navigation indicator." The name Globus (Глобус) seems to be a nickname, and I suspect it's more commonly used in English than Russian. 

  2. To see how the angle between the poles and the globe's rotation results in the desired orbital inclination, consider two limit cases. First, suppose the angle between is 90°. In this case, the globe is "straight" with the equator horizontal. Rotating the globe along the horizontal axis, flipping the poles end-over-end, will cause the crosshair to trace a polar orbit, giving the expected inclination of 90°. On the other hand, suppose the angle is 0°. In this case, the globe is "sideways" with the equator vertical. Rotating the globe will cause the crosshair to remain over the equator, corresponding to an equatorial orbit with 0° inclination. 

  3. A detailed description of Globus in Russian is in this document, in Section 5. 

  4. Or conversely, the altitude varies according to the speed. 

  5. Note that panel control adjusts the period of the orbit, while the implementation adjusts the speed of the orbit. These are reciprocals, so linear changes in the period result in hyperbolic changes in the speed. The mechanism, however, changes the speed linearly, which seems like it wouldn't work. However, since the period is large relative to the change in the period, this linear approximation works and the error is small, about 1%. It's possible that the cone has a nonlinear shape to correct this, but I couldn't detect any nonlinearity in photographs. 

  6. The latitude is given by arcsin(sin i * sin (2πt/T)), while the longitude is given by λ = arctan (cos i * tan(2πt/T)) + Ωt + λ0, where t is the spaceship's flight time starting at the equator, i is the angle of inclination (51.8°), T is the orbital period, Ω is the angular velocity of the Earth's rotation, and λ0 is the longitude of the ascending node.3

    The formula for latitude is simpler than longitude because the latitude repeats every orbit. The longitude, however, continually changes as the Earth rotates under the spacecraft. 

  7. The back of the Globus has a 32-pin connector, a standard RS32TV Soviet military design. The case also has some dents visible; the dents were much larger before CuriousMarc smoothed them out.

    The back of the Globus.

    The back of the Globus.

     

  8. The NASA tracking sites marked with dots are CYI (Grand Canary Island), ACN (Ascension), MAD (Madrid, Spain), TAN (Tananarive, Madagascar), GWM (Guam), ORR (Orroral, Australia), HAW (Hawaii), GDS (Goldstone, California), MIL (Merritt Island, Florida), QUI (Quito, Ecuador), AGO (Santiago, Chile), BDA (Bermuda), NFL (Newfoundland, Canada), and VAN (Vanguard tracking ship). Most of these sites were part of the Spacecraft Tracking and Data Network. The numbers 1-7 are apparently USSR communication sites, although I'm puzzled by 8 in Nova Scotia and 9 in Honduras. 

  9. Details on the earlier Globus IMP are at this site, including a discussion of the four different versions IMP-1 through IMP-4. Wikipedia also has information. 

Reverse-engineering a 1960s cordwood flip flop module with X-ray CT scans

How can you find out what's inside a sealed electronics module from the 1960s? In this blog post, I reverse-engineer an encapsulated flip flop module that was used for ground-testing of equipment from the Apollo space program. These modules are undocumented1, so their internal circuitry is a mystery. Thanks to Lumafield, I obtained a three-dimensional CT scan of the module that clearly shows the wiring and components: transistors, diodes, resistors, and capacitors. From these images, I could determine the circuitry of this flip flop module.

A 3-D scan of the module showing the circuitry inside the compact package. This image uses the blue color map. Click this image (or any other) for a larger version.

A 3-D scan of the module showing the circuitry inside the compact package. This image uses the blue color map. Click this image (or any other) for a larger version.

The photo below shows the module, a block of plastic 1.5 inches long with 13 pins. I could determine most of its functionality by probing it on a breadboard—conveniently, the pin spacing is compatible with standard solderless breadboards. The module is a flip flop (as the FF label suggests) but some questions remained. Last month, I reverse-engineered a simpler Motorola module (post) using 2-D X-rays. However, this flip flop module was much more complex and I couldn't reverse-engineer it from standard X-rays.

The Motorola LP FF module. It is a 13-pin block.

The Motorola LP FF module. It is a 13-pin block.

Fortunately, a company called Lumafield offered to take 3-D X-rays with their Neptune CT scanner. This 6-foot wide unit has a turntable and an X-Y-Z positioning mechanism inside. You put an item on the turntable and the unit automatically takes X-rays from hundreds of different angles. Cloud software then generates a 3-D representation from the X-rays. This industrial system is aimed at product development, product analysis, quality checking, and so forth. It handles metal components, soft goods such as shoes, plastic items, and complex assemblies. I think this is the first time it's been used for 1960s electronics, though.

The Lumafield CT X-ray machine. Photo courtesy of Lumafield.

The Lumafield CT X-ray machine. Photo courtesy of Lumafield.

A simple web-based interface (below) lets you manipulate the representation by rotating and slicing it with your touchpad or mouse. In this screenshot, I'm adjusting the clipping box by sliding the red, green, and blue squares. This yields a cross-section of the module (purple). You can look at the flip flop module yourself at this link; give it a minute to load.

Screenshot of the Lumafield web interface.

Screenshot of the Lumafield web interface.

Background on the module

To ensure a successful Moon mission, all the systems of Apollo were thoroughly tested on the ground before flight. These Motorola modules were used in test equipment for One box onboard the spacecraft was the Up-Data Link,2 tested by the "Up-Data Link Confidence Test Set" shown below. Unfortunately the test box had no documentation, so I had to reverse-engineer its functionality.

The up-data test box is a heavy rack-mounted box full of circuitry. The wiring on top is for our reverse-engineering, plugged into the box's numerous test points.

The up-data test box is a heavy rack-mounted box full of circuitry. The wiring on top is for our reverse-engineering, plugged into the box's numerous test points.

The test box was constructed from 25 printed-circuit boards, with the boards connected by a tangled backplane of point-to-point wiring. Each board held up to 15 tan Motorola modules, blocks that look a bit like relays but contain electronic circuitry. The photo below shows one of the boards.

One circuit board from the test box. It has 15 modules including four LP FF modules.

One circuit board from the test box. It has 15 modules including four LP FF modules.

You might wonder why complex electronics would be built from modules instead of integrated circuits. The invention of the integrated circuit in 1958 led to an electronic revolution, but in the mid-1960s integrated circuits were still expensive and rare. An alternative was small hybrid modules that functioned as building blocks: logic gates, flip flops, op-amps, and other circuits. Instead of a silicon chip, these hybrid modules contained discrete transistors, resistors, capacitors, and other components.

The components inside the module

The CT scan (below) provides a high-resolution module of the module, its components, and the wiring. The scan reveals that the module is constructed from two boards, one at the top and one at the bottom, with components mounted vertically, a technique known as cordwood construction. This technique was used in the 1960s when dense packing of components was required, with the cylindrical components stacked together like wooden logs. Unexpectedly, the wiring isn't a printed circuit board (like the previous module that I examined), but spot-welded ribbon wiring. (Note that the wire contacts the side of each pin or lead.) The 13 pins pass vertically through the module, with connections at the top and bottom; the scan shows the shape of each pin in detail.

CT scan of the Motorola LP FF module. In this image, I've used the grayscale color scheme.

CT scan of the Motorola LP FF module. In this image, I've used the grayscale color scheme.

The module contains two NPN transistors, mounted upside down with wires attached to the pins. The transistors are in metal cans, which show up clearly in the X-rays. The small square tab sticking out from a transistor indicates the emitter pin. For the transistor on the right, the tiny silicon die is visible between the pins. The die is connected to the pins by bond wires, but the bond wires are too small to be visible in the X-ray.

Two transistors in the module.

Two transistors in the module.

Some components aren't as easy to recognize, such as resistors. A carbon composition resistor is constructed from a resistive carbon cylinder, as shown in the cross section. A metal pin sticks into each end of the cylinder, providing the resistor's leads. The carbon doesn't block X-rays, so it is invisible. Thus, a resistor looks like two dangling metal pins in the scan.

X-ray of a carbon composition resistor and a cross-section of a similar (but not identical) resistor. Photo from the book Open Circuits, Copyright Eric Schlaepfer and Windell Oskay; used with permission of the authors.

X-ray of a carbon composition resistor and a cross-section of a similar (but not identical) resistor. Photo from the book Open Circuits, Copyright Eric Schlaepfer and Windell Oskay; used with permission of the authors.

A carbon film resistor, in contrast, is constructed from a spiral of carbon film on a ceramic rod. The carbon and ceramic don't show up in the scan, but the resistor's end-caps are visible. Thus, the two types of resistors appear different in the images. The module uses both types of resistors; I'm not sure why.

X-ray of a carbon film resistor and a photograph of a similar resistor. The spiral cut in the carbon film controls the resistance. Photo from the book Open Circuits, Copyright Eric Schlaepfer and Windell Oskay; used with permission of the authors.

X-ray of a carbon film resistor and a photograph of a similar resistor. The spiral cut in the carbon film controls the resistance. Photo from the book Open Circuits, Copyright Eric Schlaepfer and Windell Oskay; used with permission of the authors.

The module contains many diodes and the internal structure of the diode is visible on the scan. A diode is constructed from a semiconductor die, with a metal S-shaped spring making contact with one side of the die. For some reason, the spring is much more visible in Zener diodes; I assume the spring happens to be made from a more radio-opaque metal.

X-ray slice through a diode, a Zener diode, and a cross-section of a diode. Photo from the book Open Circuits, Copyright Eric Schlaepfer and Windell Oskay; used with permission of the authors.

X-ray slice through a diode, a Zener diode, and a cross-section of a diode. Photo from the book Open Circuits, Copyright Eric Schlaepfer and Windell Oskay; used with permission of the authors.

With careful examination, the diode's die can be seen in the scan as a bright spot at one side of the spring. This reveals the orientations of the diode, which is important for creating a schematic. The two diodes below have opposite orientations: the left one has the die on the top, while the right one has the die on the bottom.

Two diodes in the scan. The first diode has the die at the top, while the second has the die at the bottom.

Two diodes in the scan. The first diode has the die at the top, while the second has the die at the bottom.

The module's final components are capacitors, probably silver-mica capacitors. As shown in the cross-section, the capacitor consists of layers of foil and mica. These layers are too thin to show up on X-ray, but the rectangular connections to the leads are visible. Thus, a capacitor looks like rectangles attached to pins.

X-ray of a silver-mica capacitor and a cross-section of a similar capacitor. Photo from the book Open Circuits, Copyright Eric Schlaepfer and Windell Oskay; used with permission of the authors.

X-ray of a silver-mica capacitor and a cross-section of a similar capacitor. Photo from the book Open Circuits, Copyright Eric Schlaepfer and Windell Oskay; used with permission of the authors.

The cross-section image below shows a horizontal slice through the module. Since the components are mounted vertically as cordwood, this cuts through the components. The pins at the top and bottom are bright cyan. The blue circles are diodes. The more ghostly circles are resistors. The large hollow circles in the center are the transistors, on top of the capacitors.

A cross-section through the components.

A cross-section through the components.

It is easy to extract the wiring from the reconstruction.3 By defining a bounding box in the user interface, I obtained the top wiring layer as a slice, separated from the other circuitry. This view also makes it clear that the wiring is spot-welded to the sides of the pins, and not a printed-circuit board. At the bottom left, you can see where two wires have been welded together.

The top wiring layer in the module.

The top wiring layer in the module.

The wiring on the bottom of the module can be extracted similarly by changing the slice bounds in the user interface. I used a different color map for this image.

The bottom wiring of the board.

The bottom wiring of the board.

By studying the CT scan, I could reverse-engineer the circuitry. The hardest part was examining the diodes closely to determine their orientation. The resulting schematic is shown below (click for a larger version).

Schematic of the flip-flop module.

Schematic of the flip-flop module.

The core of the flip flop is the two cross-coupled transistors in the center: the output of one transistor is connected (through diodes) to the input (base) of the other. If one transistor is on, it forces the other transistor off. Thus, the flip flop has two stable states with one transistor on and one transistor off. In the remainder of the post, I'll explain the circuit in more detail.

How a J-K flip flop works

A flip flop is a circuit that can be put into two states, outputting a 0 or a 1. A flip flop has many uses, such as storing a bit, providing a delay, implementing a counter, or dividing a frequency by 2. A flip flop is controlled by a clock signal, changing state at the moment when the clock signal switches. (Flip flops often also have asynchronous inputs: Set and Reset inputs that act immediately, regardless of the clock.)

Several different types of flip flops are used for different purposes. A T (toggle) flip flops simply switches from 0 to 1, or 1 to 0, on each clock pulse, dividing the clock frequency by 2. A D (data) flip flop takes a data bit as input, storing it when the clock pulses. The J-K flip flop, however, is a general-purpose flip flop, with its function selected by the J and K control inputs. Its action is defined by the following table.

JKOutput on clock pulse
00Q (no change)
010 (clear)
101 (set)
11Q' (toggle)

Diode-transistor logic NAND gate

The flip flop is constructed from diode-transistor logic NAND gates. The NAND gate has two inputs, isolated from each other by diodes. If both inputs are high, the transistor's base is pulled high by the first resistor. This turns on the transistor, pulling the output low.

With a 1 for both inputs, the transistor turns on, producing a 0 output.

With a 1 for both inputs, the transistor turns on, producing a 0 output.

Conversely, if one input (or both) is low, the current passes through the diode and the transistor's base is pulled low. The transistor turns off and the output resistor pulls the output high. Thus, the output is low when both inputs are high, and otherwise high, so the circuit implements a NAND gate.4

With a 0 input, the transistor is turned off, producing a 1 output.

With a 0 input, the transistor is turned off, producing a 1 output.

Since this gate uses diodes and a transistor, it is called diode-transistor logic. This logic family was popular in the 1960s, until it was replaced by transistor-transistor logic (TTL). TTL uses a transistor in place of the input diodes, providing better performance.

Cross-coupling two NAND gates produces a simple latch, the Set-Reset latch. When one NAND gate is off, it forces the other gate on. Thus, the circuit has two stable states. Pulling the set' line low forces the output low, while pulling reset' low forces the output high. NAND-gate latches are very common circuits, storing one bit.

Cross-coupling two NAND gates creates a latch.

Cross-coupling two NAND gates creates a latch.

Understanding the flip flop circuit

The difference between a flip flop and a latch (by a common definition) is that a latch changes state as soon as an input changes, but a flip flop only changes state when triggered by a clock signal. In this section, I'll explain how the clock is implemented in the flip flop module, controlled by the J-K functionality.

The underlying idea is that the clock input is connected through capacitors, so a sharp negative edge on the clock briefly pulls a transistor's base low, turning off the transistor and switching that output high. This makes the flip flop edge-sensitive.

The schematic below shows one-half of the flip flop, omitting the earlier cross-coupled latch circuitry (shown as "feedback"). If the capacitor is charged as shown, then a negative clock pulse (arrow) will pull the capacitor negative, briefly shutting off the transistor and turning on the output Q.5 The latch circuitry will then keep the flip flop in the new state.

When the clock goes low, this can pull the transistor base low, turning the transistor off.

When the clock goes low, this can pull the transistor base low, turning the transistor off.

The conditions for the capacitor to charge are that J must be high and Q must be low. Otherwise the capacitor will block the clock pulse.6 In other words, if J is high and Q is low, the output will toggle high on the clock pulse. In the mirror-image circuit (not shown), if K is high and Q' is low, the complemented output will toggle high on the clock pulse. This is the desired behavior for a J-K flip flop.7

The reverse-engineering solves one mystery about the flip flop. When I probed the module on a breadboard, touching a ground wire to the J pin immediately set the flip flop. This is very strange behavior because the J and K inputs are supposed to be controlled by the clock. Moreover, a high (not low) J input should set the output. (And conversely with K.) Looking at the reverse-engineered schematic, though, explains that a sharp pulse on the J pin will act like the clock, sending a pulse through the capacitor, turning off the transistor, and causing a high output. I assume this behavior is not intentional, and J inputs are expected not to transition as sharply as when I touched it with a ground wire.8

Conclusion

I was impressed by the quality of the CT scan. It not only provided a crystal-clear view of the components and wiring, but even showed the internal structure of the components. Being able to see inside a module is like having X-ray vision. (That sounds redundant since it literally is X-rays, but I don't know a better way to describe it.) If you have an application that requires looking inside, I give Lumafield a thumbs-up.

For more background on the Up-data Test Box, I have some Twitter threads: power-up, modules, paper tape reader, and clock circuit. Also see CuriousMarc's video on the box:

I announce my latest blog posts on Twitter, so follow me @kenshirriff for updates. I also have an RSS feed. Many thanks to Lumafield and especially Jon Bruner for performing the CT scan of the module. Thanks to Marcel for providing the Up-Data Link Test Box, which contains the modules, and thanks to John McMaster for earlier X-rays. Cross-section photos copyright Windell Oskay and Eric Schlaepfer, from the upcoming book Open Circuits, which you should check out.

Notes and references

  1. Presumably the Motorola modules have documentation somewhere, but we have been unable to find anything. I haven't been able to find even a mention of these modules, let alone details. 

  2. NASA could send digital messages to the spacecraft from the ground. These data messages could perform specific tasks: control spacecraft equipment by activating relays, send commands directly to the Apollo Guidance Computer, or even set the spacecraft's clock. Onboard the Command Module, these messages were decoded by the Up-Data Link, a drab bluish box (below) mounted in the equipment bay.

    The Up-Data Link (UDL) was installed on the Apollo Command Module.

    The Up-Data Link (UDL) was installed on the Apollo Command Module.

     

  3. For the simpler -3.9V module, I extracted the wiring from traditional 2-dimensional X-rays and it was a pain. Cordwood construction has two layers of wiring, at the top and the bottom, so an X-ray from the top merges the two wiring layers together. The side views are even worse, since you can't see the wiring at all. You need to take X-rays of the module at an angle to separate the wiring layers, but there's still overlap, not to mention obstruction from the components. 

  4. The use of a Zener diode in the gate is a bit unusual. It acts as a level-shifter, raising the input voltage threshold that switches between off and on. (Otherwise the threshold is close to 0 volts, making the inputs too sensitive to noise.) I've found a patent that uses Zener-Coupled Diode Transistor Logic, which is somewhat similar. High Threshold Logic also uses Zener diodes to raise the threshold voltage. 

  5. You might wonder how the flip flop ends up in the right state during a clock pulse, because there will be a moment when both transistors are turned off and both outputs go high. This seems like a metastable race condition. However, the key is that the feedback path is weaker than the clock pulse. Thus, the transistor on the side without the clock pulse will get turned on by the feedback, while the transistor on the side with the clock pulse remains off. This immediately breaks the symmetry, putting the flip flop into the right state. 

  6. For the clock pulse to pass through the capacitor, the capacitor must be charged with the input side positive and the base side negative. Then, a negative clock pulse will pull the capacitor negative. However, if both sides of the capacitor are negative, the clock pulse will have no effect. Conversely, if both sides of the capacitor are positive, the clock pulse will pull the capacitor down, but not far enough to turn off the transistor. 

  7. To understand the J-K action of the flip flop, I've reorganized the standard J-K function table to highlight the state changes.

    JKOutput if Q is lowOutput if Q is high
    000 (no change)1 (no change)
    010 (no change)0 (clear)
    101 (set)1 (no change)
    111 (set)0 (clear)

    In other words, if Q is low and J is 1, the flip flop is set. If Q is high and K is 1, the flip flop is cleared. Otherwise, the state remains unchanged. The implementation of the flip flop directly matches this logic. 

  8. I found that the clock pulse must have a very sharp transition in order to work; my cheap pulse generator wasn't sufficient to act as the clock until I added a buffer transistor. The clock pulse needs to have enough drive current to rapidly discharge the capacitor. If it's too slow, the pulse won't be enough to turn off the transistor. 

Reverse-engineering a vintage power supply chip from die photos

I recently did a PC power supply teardown so I figured it would be interesting to go deeper and see what happens inside the power supply's control IC. The die photo below shows the UC3842 chip, which was very popular in older PC power supplies.1 (The chip was introduced in 1984 but this die has a date of 2000.) The tiny silicon die is patterned to create the transistors, resistors and capacitors that make up the circuit. The lighter-colored lines are the metal layer on top of the silicon, forming the chip's wiring. Around the edges, square pads provide the connections from the die to the IC's external pins; tiny bond wires connect the pads to the chip's external pins.

The UC3842 die. Around the outside, the pins are labeled. (Click this image, or any other, for a larger version.)

The UC3842 die. Around the outside, the pins are labeled. (Click this image, or any other, for a larger version.)

The photo below shows the chip mounted on the power supply board. For the die photos, I extracted the die from the epoxy package by heating it and then cleaned up the die with a few drops of sulfuric acid. I took photos with a microscope and stitched them together to create a high-resolution image.

The UC3842 chip mounted on the power supply's circuit board. The white glob is silicone, which held many of the power supply components in place.

The UC3842 chip mounted on the power supply's circuit board. The white glob is silicone, which held many of the power supply components in place.

The chip is from the PC power supply below. This is a switching power supply so it uses several steps to produce the output voltages. On the primary side, the input AC is filtered and then converted to high-voltage DC (roughly 170 to 340 volts) by the bridge rectifier, and the large capacitors smooth it out. Next, the DC is chopped into pulses thousands of times a second by the switching transistor. The control IC constantly adjusts the width of the pulses to regulate the output voltage. These pulses go into the transformer, which converts the high-voltage pulses into low-voltage, high-current. The diodes on the secondary side produce the multiple DC outputs, which are smoothed by the inductors and capacitors.

An ATX power supply with the main components labeled. I removed the heat sinks and capacitors to improve visibility.

An ATX power supply with the main components labeled. I removed the heat sinks and capacitors to improve visibility.

This process may seem complex, but it has several advantages over putting the AC from the wall directly into a transformer. First, because the transformer operates at thousands of hertz instead of 60 hertz, a much smaller transformer can be used. Second, chopping the DC into pulses wastes very little energy, compared to a "linear regulator" that converts excess voltage into heat. The result is a power supply that is inexpensive, lightweight, and efficient.

In this blog post, I'll explain the construction of the controller IC, the building blocks of its circuitry, and how it operates. This may be a lot for one blog post, but we'll see how it goes.

Some silicon components

This IC is built from a type of transistor known as bipolar, rather than the MOS transistors that are typically used in modern ICs. The highly-magnified photo below shows an NPN transistor as it appears on the chip, with a cross-section drawing underneath. The metal wiring on top of the transistor is visible as the wide light-colored lines. Different regions of the silicon are doped with impurities to change its electrical properties, yielding N-type and P-type silicon. These regions are faintly visible in the photo. An oxide layer on top of the silicon provides insulation from the metal, except where a contact (black circle or oval) provides a connection between the metal and silicon.

Diagram illustrating the construction of an NPN transistor.

Diagram illustrating the construction of an NPN transistor.

The chip also uses many PNP transistors. Although you might expect a PNP transistor to simply be the reverse of an NPN transistor, it has a different structure, with the regions arranged laterally instead of vertically. The collector and base form concentric square rings around the emitter. The base wire is not connected to the base region directly. Instead, the wire is at a distance, and the base signal travels underneath through the N layer.

Diagram illustrating the construction of a PNP transistor. The dotted lines represent how the collector and base surround the emitter.

Diagram illustrating the construction of a PNP transistor. The dotted lines represent how the collector and base surround the emitter.

Because this chip consists of mostly analog circuitry, it uses a lot of resistors. The photo below shows several typical resistors, the thin grayish-green lines. The resistors are connected to metal wires at either end, the wider metallic-looking traces. Some resistors are straight lines, while others zig-zag to fit a longer resistor (i.e. higher resistance) into the available space.

Resistors on the die.

Resistors on the die.

Resistors are an inconvenient component for integrated circuits. First, they take up a relatively large amount of room, especially long, high-value resistors. Second, they are inaccurate; their value can vary unpredictably from chip to chip, or even on a single chip. For this reason, circuits are typically designed so they depend on the ratio between two resistors, which is much more stable.

Capacitors are also bulky so the chip uses only a few, to stabilize its amplifiers. A capacitor can be formed by using the underlying silicon as one plate, and then putting a layer of polysilicon on top to form the second plate, separated by a thin layer of insulating oxide. Polysilicon is a special type of silicon, and appears green in the photo.

A capacitor on the die.

A capacitor on the die.

Architecture of the chip

To summarize the chip, it generates pulses to control the switching transistor that feeds the transformer. These pulses are at a fixed frequency (e.g. 52 kHz), but the width of the pulses increases if more power is needed to keep the output voltage constant. The chip constantly adjusts the pulse width based on voltage and current feedback from the power supply, keeping the output voltages stable even as the load changes.

The UC3842 die. Main functional blocks of the die are labeled.

The UC3842 die. Main functional blocks of the die are labeled.

The die image above has been labeled with the main functional blocks of the chip. It can be compared with the block diagram (below) from the datasheet. I'll describe the main functional blocks before explaining how they are implemented.

Block diagram of the UC3842 chip with annotation. Original from the datasheet.

Block diagram of the UC3842 chip with annotation. Original from the datasheet.

The power supply's pulses start with the chip's oscillator, which generates pulses at a frequency controlled by an external resistor and capacitor. Below the oscillator is the feedback circuitry that adjusts the pulse width based on voltage and current feedback. The PWM latch (Pulse Width Modulation) combines the oscillator signal and the feedback to generate pulses of the right duration. These pulses go to the high-current output stage, which drives the external switching transistor.

The chip itself is powered by an auxiliary winding on the transformer that provides 15 to 30 volts. The chip regulates this down to an internal 5-volt supply, using a special circuit called a bandgap regulator to keep this voltage stable within 2%, even with changing temperature. (This regulated reference voltage is also provided externally as Vref for external circuitry that needs a stable voltage.)

A potential problem is that if the power supply is unplugged (for example), the chip may behave unpredictably as the input voltage drops. To guard against this, an Under-Voltage Lock Out (UVLO) feature shuts the chip down cleanly if the input drops too low.

A final interesting feature of the chip is how it starts up. As described above, the chip is powered by the transformer, but the chip generates the pulses that feed the transformer. This seems like a chicken-and-egg problem, since the chip won't receive any power until it is already driving the transformer. The solution is a connection to the rectified line voltage through a very large resistor, so the chip receives hundreds of volts but just microamps of current. A Zener diode (below) drops this startup voltage down to 34 volts, enough for the chip to start generating pulses, at which point the transformer takes over.2

The Zener diode on the chip. It limits the startup voltage to 34 volts. It consists of five diodes in series.

The Zener diode on the chip. It limits the startup voltage to 34 volts. It consists of five diodes in series.

The oscillator

The simplified diagram below shows how the oscillator works. In the first phase (A), the external capacitor is charged through the resistor. When the voltage on the capacitor reaches a fixed level, the comparator (triangle) turns on, energizing the discharge transistor. In the next phase (B), the capacitor discharges through an internal resistor, and then the cycle starts again.3 Thus, by choosing particular values for the external resistor and capacitor, the power supply designer can select the oscillator frequency.

This diagram shows how the oscillator is controlled by an external resistor and capacitor.

This diagram shows how the oscillator is controlled by an external resistor and capacitor.

As mentioned earlier, resistors inside an IC are inaccurate. This poses a problem for the oscillator, since the discharge voltage level is set by resistors. The solution is to tune the resistances by putting fuses in parallel with small resistors and selectively blowing fuses to add the resistors to the circuit.4 Specifically, before the chip is packaged, its performance is measured. To blow a fuse, probes are pressed against the circular contacts and a large current is applied. The additional step of blowing fuses increases the manufacturing cost of the chip, but it provides more precise performance.

Fuses to adjust resistance.

Fuses to adjust resistance.

The oscillator has a second set of fuses to tune the discharge resistance (below). These fuses use a different principle: they are "antifuses", which act like fuses in reverse. An antifuse starts off non-conducting, but passing a high current through it creates a conductive metal spike in the antifuse.5

The discharge circuitry of the oscillator. The antifuses adjust resistance in the oscillator.

The discharge circuitry of the oscillator. The antifuses adjust resistance in the oscillator.

Current mirrors

The current mirror is a fundamental building block in analog circuits. This chip, like many analog chips, needs small, steady currents to drive amplifiers, bias circuits, pull signals up, and perform other tasks. Rather than using separate resistors to generate each current, a common solution is the current mirror: you control one current with resistors, and then use transistors to make copies of this current. The schematic below shows a simple current mirror where the fixed current through the transistor on the left is mirrored into three identical copies.

A basic current mirror circuit. The current on the left is mirrored into three current sinks.

A basic current mirror circuit. The current on the left is mirrored into three current sinks.

The diagram above shows the main current mirrors for the chip. The large resistor in the lower-right controls the current through the main transistor, and the other transistors copy this current.6 Small emitter resistors improve the performance.

The current-mirror circuitry on the die.

The current-mirror circuitry on the die.

The feedback or error amplifier

Next, I'll look at the voltage feedback circuit, which lets the chip know if the output voltage is too high or too low. The chip receives the output voltage, scaled to form a feedback signal. The error amplifier compares the feedback to a reference voltage to determine if the voltage is too high or too low.

The error amplifier is based on a differential amplifier, which amplifies the difference between its two inputs. This circuit is common in analog circuits, forming the heart of an op-amp or a comparator. The basic idea is that a current mirror (the circle at the top) generates a fixed current I. This current gets split between the left path (I1) and the right path (I2). If the transistor on the left has a higher input voltage than the transistor on the right, most of the current will go to the left. But if the transistor on the right has a higher input, most of the current will go to the right. This circuit amplifies the voltage difference: even a small difference between the two inputs will switch most of the current from one side to the other.

A differential pair amplifies the difference between the two inputs.

A differential pair amplifies the difference between the two inputs.

The error amplifier extends this circuit with about a dozen transistors in total. These transistors add buffering to the inputs, control various currents, and provide a second amplification stage. The photo below shows the key components of the error amplifier. The green capacitor on the right stabilizes the amplifier.

The error feedback amplifier as it appears on the die with key components indicated.

The error feedback amplifier as it appears on the die with key components indicated.

The current comparator

The power supply uses voltage feedback to adjust the pulse width, but it also monitors the current through the transformer so the power supply can respond faster to changes in the load. The current feedback is implemented by the "current sense comparator". This is similar to the feedback amplifier, amplifying the difference between the inputs. (Since it is a comparator, not an amplifier, it is designed to output a binary signal instead of an analog level, but the basic principle is the same.) The diagram below shows the key circuitry for the current comparator on the die and how it relates to the block diagram. The output from the error amplifier goes through some circuitry to adjust the voltage levels before entering the comparator.7

How the current sense circuit maps onto the die components.

How the current sense circuit maps onto the die components.

Under-voltage lockout

Another interesting circuit is the under-voltage lockout (UVLO), in the upper-left of the die. The purpose of this circuit is to shut down the chip cleanly if the input voltage falls too low. (This could happen if there is a power failure or even from unplugging the power supply.)

The heart of the UVLO circuit is a bandgap regulator, which provides a voltage reference that will be stable even if the temperature changes. This is surprisingly difficult in an integrated circuit, since the properties of transistors change with temperature. The bandgap regulator uses two transistors of different sizes so they are affected by temperature differently. In the die photo below, Q2 is six times the size of Q1.

The bandgap circuit for the under-voltage lockout.

The bandgap circuit for the under-voltage lockout.

The schematic below shows how the bandgap regulator is constructed. The key factor is the voltage between a transistor's base and its emitter (Vbe), which decreases with temperature. However, ΔVbe, the difference between the two Vbe increases with temperature. With the right resistors, these two factors cancel out, yielding a stable reference voltage. The circuit compares the input voltage to this reference voltage; see the footnote8 for more details.

Schematic of the bandgap regulator. A current mirror directs the same current through both sides of the circuit.

Schematic of the bandgap regulator. A current mirror directs the same current through both sides of the circuit.

In the UVLO circuit, the bandgap reference is used to detect if the chip's input voltage falls too low. Since the input voltage is around 30 volts, a network of resistors (below) scales it to the bandgap voltage (about 1.2 volts) for comparison.9

This set of resistors forms voltage dividers to reduce the input voltage for the bandgap comparator. Note the mask date of "00" as well as the ST Microelectronics logo at the bottom.

This set of resistors forms voltage dividers to reduce the input voltage for the bandgap comparator. Note the mask date of "00" as well as the ST Microelectronics logo at the bottom.

The bandgap voltage reference

The chip uses a second bandgap reference to create an internally-regulated 5 volt supply to power the chip's circuitry. This voltage is also made available to external circuitry that may need an accurate voltage.

At a high level, this voltage reference is a linear power supply, with a power transistor controlling how much of the input voltage passes through to the regulated Vref. The control signal comes from the bandgap regulator, which I'll explain below. The output circuit also has a current-sense resistor to measure the output current. This limits the output current to 50 mA in case of a short circuit. A diode clamps the output if the input voltage suddenly drops.

Schematic of the Vref output circuit. The transistor limits the voltage.

Schematic of the Vref output circuit. The transistor limits the voltage.

The photo below shows how this circuit is implemented on the die. The power transistor is much larger than the other transistors, so it can support a high-current output. The construction of the diode is similar to the power transistor, but without a collector. The current-sense resistor is short and wide, giving it a low resistance.

Vref output circuit on the die.

Vref output circuit on the die.

The heart of the circuit is the bandgap voltage reference below. The circuit is similar to the bandgap voltage reference for the under-voltage lockout circuit, using two transistors, one with six times the area of the other. However, the six-way transistor has been split into two and surrounds the single transistor. With this layout, even if there is a temperature gradient across the die, the single-transistor and the six-transistor will be at the same average temperature.

The transistors at the heart of the bandgap reference.

The transistors at the heart of the bandgap reference.

The accuracy of the bandgap regulator depends on the accuracy of its resistors. During manufacturing, fuses are blown to tune the resistance, as with the oscillator's resistors. The photo below also shows the resistors that form a voltage divider to reduce the 5-volt output to the 1.2-volt bandgap voltage. In contrast to the thin meandering resistors used elsewhere, these resistors are thick and uniform length to improve their accuracy.

Resistors that control the bandgap reference.

Resistors that control the bandgap reference.

Output

At this point, I'll step back and review the chip's function in the power supply. It controls the switching transistor, causing the transistor to send high-voltage pulses through the transformer. The chip does this by producing control pulses on its output pin. Since the switching transistor is fairly large, the chip outputs a relatively high current (200 milliamps) control signal. This requires fairly large output transistors inside the IC.

The controller chip directs the switching transistor to send pulses through the transformer.

The controller chip directs the switching transistor to send pulses through the transformer.

The die photo below shows the IC's two output transistors: the upper one pulls the output high, and the lower one pulls the output to ground. One interesting feature of the chip is that it has two pads on the die for Vin and two pads for ground. The purpose of this is that the output transistors draw a lot of current, which could cause noise fluctuations on the power and ground lines, interfering with the rest of the chip. By providing separate pads, the output transistor is somewhat isolated from the rest of the circuitry.10

Two large transistors drive the output pin.

Two large transistors drive the output pin.

Variants

One interesting thing about this chip is that four different chips are manufactured from the same silicon. The UC3842 has a 16-volt UVLO threshold, while the UC3843 has an 8.5-volt threshold for lower-voltage applications. Other variants of the chip (UC3844 and UC3845) have a flip flop to reduce the pulse duty cycle. These different chips use slightly different metal wiring over the same silicon base. (It's easier to customize the metal layer than the silicon.) The photo below shows some places where the metal wiring has been severed in the UC3842 to change the wiring.

Closeup of the die with some broken connections indicated with arrows.

Closeup of the die with some broken connections indicated with arrows.

Conclusion

Power supplies are usually taken for granted, but they contain a lot of interesting technology. The invention of the power supply control chip in 1975 is a key step in the history of power supply improvements. Modern power supply chips are much more complex, with features to improve efficiency and reduce interference, but the chip that I examined uses the same basic principles.11 Analog chips are built from several important building blocks such as differential amplifiers, current sources, current mirrors, and bandgap voltage references. The UC3842 chip illustrates all of these building blocks, and how they are combined to build complex circuits.

I announce my latest blog posts on Twitter, so follow me at kenshirriff. I also have an RSS feed.

Notes and references

  1. For schematics of power supplies using this UC3842 chip, see this site, near the bottom of the page. 

  2. The idea of a Zener diode is that it blocks current like a normal diode until it reaches the "breakdown voltage", where it starts conducting. Zener diodes are often formed on chips from the emitter-base junction of NPN transistors, which commonly results in a 6.8-volt breakdown voltage. Looking at the photo, you can see 5 transistor-like structures in series. At 6.8 volts each, this generates the 34-volt breakdown voltage shown in the block diagram. 

  3. The oscillator's comparator is set to turn off about 1.6 volts below the level at which it turns on, that is it has hysteresis. This ensures that the capacitor discharges significantly rather than settling around the discharge level. The oscillator design is a bit like the 555 timer, with discharge and charge phases triggered by the capacitor voltage. 

  4. Many of the resistors in the fuse network are made of fixed-length resistors in various combinations. For example, two in parallel gives twice the resistance, while two in series give half the resistance. The advantage of combining fixed-length resistors is that the resistances are more predictable than making resistors of different lengths. The different resistors have roughly binary values, so different combinations of blown fuses select a variety of resistances. 

  5. I think that the chip uses Zener antifuses, since they look similar to NPN transistors without a collector. The process of blowing the antifuse to make it conductive is called a "Zener zap." 

  6. The current mirror uses a buffered-feedback design with emitter degeneration resistors (details). The small emitter resistors improve the output impedance. Three of the transistors in the current mirror are set up to split current, so each sinks one-third of the regular current. Another transistor has a larger emitter resistor, reducing the current; a small change in resistance yields a large change in the current. This illustrates the flexibility of a current mirror to produce different currents. 

  7. The block diagram shows a resistor-diode network between the error amplifier and the current sense comparator. This network scales and clips the error amplifier output to make its levels more useful. The circuitry isn't particularly interesting, so I won't discuss it in detail. I'll mention, though, that the block diagram shows the error amplifier output uses two diodes to drop its voltage. The circuit, on the other hand, raises the other signals by two diode levels instead, which works out the same mathematically. (Transistors are used to implement the diode drops as well as the 1-volt Zener.) 

  8. The details of a bandgap reference are too complex to explain here, but I'll give a brief overview in this footnote. The basis is that the voltage between a transistor's base and emitter scales drops linearly with the temperature (in Kelvin). But since the two transistors have different areas, the two transistors have different scale factors. The difference between the two transistors' base-emitter voltages increases linearly with temperature. By combining a voltage that decreases linearly with temperature and a voltage that increases linearly with temperature, you can create a voltage that remains almost constant with temperature. This voltage turns out to be the bandgap voltage of silicon, about 1.2 volts.

    Scaling and combining these voltages is done by two resistors, so it is important that temperature doesn't affect the resistances. The circuit is designed so that only the ratio between resistances matters, so if temperature affects both resistors equally, the circuit is unaffected. A problem is that a temperature gradient on the chip could affect some resistors more than others, but the chip uses a clever layout technique to avoid this. There are seven resistor segments: one forms a resistor and six are in series to form a resistor with six times the resistance. The one-unit resistor is put in the middle with three segments above and three segments below. If a temperature gradient, for instance, increases the upper resistances, the resistor in the middle will have an "average" increase, while the 6-unit resistor will have three resistor segments with a large increase and three with a small increase, which will cancel out.

    The bandgap circuit doesn't explicitly generate a 1.2-volt output. Instead, it implicitly compares the input voltage with 1.2 volts. The circuit is set up so a 1.2-volt input balances the currents through both transistors. If the voltage increases, the single transistor passes more current than the six-unit transistor. A current mirror forces each side of the circuit to have the same current, with the result that the "extra" current flows through the output. Thus, if the input voltage is high enough, the circuit produces an output current, activating the chip. But if the input voltage is too low, the circuit doesn't produce an output current, shutting down the chip.

    For more information, see the optimistically-titled How to make a bandgap voltage reference in one easy lesson

  9. Another feature of the under-voltage lockout circuit is hysteresis; it has a higher voltage to turn on than to shut off. The purpose of this is to make sure the power supply doesn't oscillate on and off if the input voltage is near the threshold. Hysteresis is implemented through the input voltage divider, which uses three resistors. If the chip is activated, a transistor feeds the supply voltage into the second resistor, increasing the divider's output voltage. The result is that once the chip is active, the supply voltage must drop more to turn the chip off. 

  10. Surprisingly, the chip has two pads for power and two pads for ground, but only single power and ground pins. Instead, two bond wires go from the pads to each external power and ground pin. Although this doesn't provide complete separation between the chip's power and the output circuit's power, it is still beneficial since the bond wires are thicker than the metal traces and have lower resistance.

    Although this IC is usually packaged in an 8-pin package, some manufacturers, such as Fairchild, make versions of the UC3842 in 14-pin packages. The extra pins allow separate pins to be used for the circuitry and output power and grounds. 

  11. While the UC3842 chip was introduced in 1984, the one I examined has a mask date of "00", so this design is from 2000. The power supply itself was from 2005.