Frank Mitchell

Regulating voltage with junk box parts

In sharp contrast to something like the transmit filter, where the mathematical details of complex conjugates are discussed, the description of the voltage regulator for the NorCal 40A in The Electronics of Radio is remarkably brief. A line on page 152 simply states,

We will not study regulators but detailed information about this regulator is given in Appendix D.

Thumbing through Appendix D, I found a remarkably thorough parts sheet, but little insight into what how the voltage regulator worked, or why all the other bits are there. Given that building my own radio is all about learning, I decided to dig into the details and figure out how the power supply in the NorCal 40A works. Before we get into that though, here’s a picture of the assembled circuit.

A close up view of the assembled power supply in the NorCal 40A transceiver, looking down on the on/off switch from the back.

From left to right, there’s a 10 microfarad capacitor, a 47 nanofarad capacitor, a single pole double throw switch, a 78L08 voltage regulator, a 1N5817 Schottky diode, and a 2.1 millimeter DC power jack. The schematic below shows how they fit together electrically.

A voltage source feeds into a 1N5817 Schottky diode, followed by a single pole double throw switch. A 10 microfarad and 47 nanafarad capacitor in parallel decouple AC to ground. A 78L08 voltage regulator then provides stable 8 volts.

A 10 to 15 volt DC power source feeds power in through the jack, past the diode, to the switch, where it’s filtered by the capacitors, then regulated down to 8 volts. Pretty standard for a power circuit. Here’s how it works and why each piece is there. We’ll start with the battery pack and the DC jack.

Why battery packs are big

The image below shows the back panel of the NorCal 40A. The 2.1 millimeter power input jack is clearly labeled as accepting 10 to 15 volts DC. It’s also labeled as being center pin positive. I dug through the wall warts in my junk box, and all of them where center pin negative. So much for driving my radio off the mains. Guess I’m going with a portable power supply.

A view of back panel of the NorCal 40A transceiver, showing off the DC power jack and on/off switch.

Part of that 10 to 15 volts of power will go to the Philips SA602A double-balanced mixer and oscillator. Looking through its data sheet, we see typical operation requires 6 volts of power and draws 2.4 milliamperes of current. How do we get power that precise?

The obvious solution would be a 6 volt battery. The AA alkaline batteries I keep sitting around in my cupboard for the Xbox controller can supply 1.5 volts and up to 250 milliamperes. Slap four of them together in series, and we should have enough juice to drive our mixer, right? Not quite.

That 1.5 volt measurement only applies when the battery is fully charged. Since it’s been sitting in my cupboard for months, it might only have 1.4 volts of charge left. So we probably want to stick seven or eight batteries together in series for 10 to 12 volts of power. That will ensure we’ve got the minimum 6 volts needed for the mixer, even if some of the batteries are shot.

Dave Bixler, W0CH, points out that his NorCal 40A runs just fine from a 12 volt battery pack, so we don’t have to worry about not having enough juice for our mixer. With the power source covered, we can move on to the next part in our circuit, the diode.

Basic polarity protection

The diode prevents the mixer from frying if the power source is accidentally plugged in backwards. Assuming there’s a fuse in the power source line, the diode will block the flow of current if power is reversed and trip the fuse. This is known as polarity protection, and it’s the most basic kind of power protection.

If there’s no fuse in the power source line, the diode will probably survive just fine. A 1N5817 Schottky diode has a maximum reverse voltage of 20 volts, which is about 8 volts more than what we’ll get out of our battery pack.

The fact that it’s a Schottky diode means that the forward voltage drop will be low compared to other types of diodes. At three amps, the 1N5817 has a forward voltage of 750 millivolts. Ohm’s Law tells us that resistance is voltage divided by current.

R = V / I

Plugging 0.75 volts in for V and 3 amps in for I, we find the diode has a resistance of about 0.25 ohms.

0.25 ohms = 0.75 volts / 3 amps

Of course resistance is a function of how much current we pump through the diode, and it’s not linear. The lower the current, the higher the resistance. At one amp the forward voltage is 450 millivolts for a resistance of 0.45 ohms. That’s still very low. It’s nice to know that we’re not sacrificing much power for polarity protection. There are actually polarity protection schemes that sacrifice less power, like using a MOSFET, but they come with other costs, like requiring more components to ruggedize them.

Keeping part counts (and cost) low

The switch is next, and I had a bit of concern about my soldering skills after getting it in. Looking at the switch from the back, you can see there are three legs that come off it and attach to the circuit board.

An overhead view of the single pole double throw on/off switch in the NorCal 40A transceiver, showing the three solder pads that attach the switch to the circuit board.

The top leg (as seen in the picture above, it’s the one closest to you) isn’t connected to anything. I probed the joint with the continuity check function on my multimeter and it didn’t go anywhere. It didn’t go to ground. It wasn’t shorted to nearby components. It was just an unconnected solder pad on the board. The term for that kind of connection is “floating”.

It turns out that’s a single pole double throw switch. So when it’s in the off position, the top and middle legs are connected. When it’s in the on position, the middle and bottom legs are connected. Normally, you’d use a single pole single throw switch (with just two legs) for an on/off type connection. However, there’s an identical switch on the front panel of the NorCal 40A that uses both connections. Using the same type of switch in both places means you have fewer kinds of parts. When you’re building radios, that’s a good thing, since it keeps costs down.

Noisy power source protection

We can’t do the same cost savings on the capacitors that we did with the switch. We actually do need both of them, one large electrolytic at 10 microfarads and one small disc at 47 nanofarads. These capacitors smooth out noisy power sources.

Our circuit has a little bit of inductance from the diode. This inductance means the power source can’t respond instantly to power need changes in the mixer. The large electrolytic capacitor (it’s the blue one in the picture) acts as a reservoir of charge. It can deliver a burst of power on demand until current can get through the diode. It also acts as a filter to remove low frequency AC noise that might be imposed on the power supply line.

The small disc capacitor (it’s the orange one in the picture) acts as a filter to remove high frequency AC noise that might be imposed on the power supply line. Capacitors used in this fashion are called decoupling capacitors, since they break the circuit into two parts, and offer an alternative path for AC to flow through. Other names for them are bypass capacitors or shunt capacitors.

Sourcing a junk box of parts

Okay, we’ve got a safe clean variable power source of 10 to 12 volts. How can we reduce that to the 6 volts we need for our mixer? The solution is to use a voltage regulator.

The voltage regulator in the NorCal 40A is a 78L08. On the outside it’s a tiny three legged device in a TO-92 package. But inside it’s packed with about thirty-two discrete parts. Rather than try to analyze that entire circuit, we’ll build our own virtual one instead.

You need a lot of good junk if you want to build stuff. I have a friend who spent a couple of semesters at ITT Tech. He says the best thing he got out of it was a junk box. For our virtual junk box, we’ll borrow a parts list from Pete Juliano, N6QW. He has a nice article about what makes a good junk box, so let’s build our voltage regulator from that.

Locking in a reference voltage

The heart of a voltage regulator is a Zener diode. A normal diode only allows current to flow in one direction. Applying voltage in the opposite direction won’t do anything until the diode’s reverse breakdown voltage is exceeded. After that, current flows through the diode uncontrollably and it overheats. This is known as avalanche breakdown.

But a Zener diode has controlled breakdown. When it’s reverse-biased and its reverse breakdown voltage is exceeded, it regulates the amount of current flowing through it to keep the voltage drop across it constant. That reference voltage drop is known as the Zener voltage.

Dig through our junk box, and we can pull out a 8.2 volt Zener diode like the Philips BZX79-B8V2.

Simple voltage regulation

The circuit below shows the simplest possible voltage regulator we can use for our mixer. We’ve got our 12 volt battery pack. We’ve got our 8.2 volt Zener diode for a reference voltage, and we’ve got a 100 ohm resistor.

An unregulated 12 volt battery is connected in series to a 100 ohm resistor. In parallel with the battery is a reverse-biased 8.2 volt Zener diode. The result is a regulated 8.2 volt source.

How did we pick that value for the resistor? Well we know the current through the resistor will be split between the diode and the mixer. The mixer will draw 2.4 milliamperes and the rest will go through the diode. How much current can the diode handle?

Digging into the data sheet for our Zener diode, we see that its total power dissipation is 500 milliwatts. That’s the maximum amount of power we can feed our diode before it breaks down. Ohm’s Law tells us that the maximum current through our diode will be its maximum power in watts divided by its Zener voltage in volts.

I = P / V

We can plug in 0.5 watts for P and 8.2 volts for V to figure out how much current our diode will handle.

0.061 amps ≈ 0.5 watts / 8.2 volts

Our diode can handle about 61 milliamperes before it fails. In practice, it’s a good idea never to load a Zener diode with more than half its maximum allowed current. That gives us a max of 30 milliamperes to power our mixer with, which is plenty.

Thirty milliamperes of power minus the 2.4 milliamperes the mixer will draw leaves us with 27.6 milliamperes through our resistor. Ohm’s Law tells us that resistance is voltage divided by current.

R = V / I

Our Zener diode will use 8.2 volts and our resistor will pick up the rest. If we run with the minimum power of 10 volts, we’ll have 1.8 volts across our resistor. Plugging in 1.8 volts for V and 27.6 milliamperes for I gives us the minimum value of our resistor.

65 ohms ≈ 1.8 volts / 0.0276 amps

We don’t actually have a 65 ohm resistor in our junk box. The closest we’ve got are 50 ohm resistors and 100 ohm resistors. Using a 50 ohm resistor feeds our diode with about 36 milliamperes. That’s more than the 30 milliampere maximum we calculated. Using a 100 ohm resistor feeds our diode with about 18 milliamperes. That’s well under the 30 milliampere maximum and still leaves us with the 2.4 milliamperes we need to drive our mixer. Hence our choice of a 100 ohm resistor.

Kicking up the current

While 18 milliamperes might be enough to drive our mixer, it’s not enough to drive our mixer plus all the other parts in our radio. We’ve still got buffers, amplifiers, and oscillators we need to power as well. How do we go from 18 milliamperes to the 225 milliamperes the NorCal 40A consumes when it transmits?

The solution is a current amplifier, which we can implement with a 2N2222 transistor. Wayne Burdick, N6KR, once referred to the 2N2222 as “the cockroach of the transistor world.” As he said, “No matter what happens to us or the planet, you’ll sill be able to find them in huge quantities.” And it’s true. We’ve got one in our junk box. Here’s what it looks like plugged into our voltage regulator.

The positive terminal of an unregulated 12 volt battery is connected to the collector of a 2N2222 transistor. A reverse-biased 8.2 volt Zener diode is connected to the negative terminal of the battery and the base of the transistor. A 220 ohm resistor is shorted across the base and collector of the transistor. The result is a regulated 8.2 volt source (at the emitter of the transistor) that can handle a load of at least 225 milliamperes.

Current flows through our resistor into our Zener diode, which regulates the amount of current passing through it so the voltage at the base of the transistor is 8.2 volts. Since the transistor is connected in forward-emitter mode, it will open a path for current to flow from the collector to the emitter. This collector-emitter current is what powers our radio.

Let’s suppose we’ve got our receiver on, and it’s drawing 15 milliamperes. If we switch our transmitter on, the load current will increase to 225 milliamperes. Previously, that current would have to pass through our Zener diode, which we know can’t handle it. But the addition of the transistor puts the Zener diode on a separate branch. Load current passes through the transistor instead, which can handle the demand.

I addition to dropping in that transistor, we also increased the value of our resistor from 100 ohms to 220 ohms. The formula for computing that resistance in ohms is to take the minimum voltage across the resistor in volts and divide it by the sum of the minimum current through the diode in amperes, plus the value of the maximum load current in amperes divided by one plus the forward gain of the transistor.

R = VR / ID + IL ÷ (1 + hFE)

We know the minimum voltage we’ll supply is 10 volts, and our Zener diode will draw 8.2 volts, leaving 1.8 volts across our resistor for VR. We know our Zener diode provides 8.2 volts when the current through it is 5 milliamperes, so we can use that as the minimum current ID. The data sheet on the 2N2222 transistor tells us its minimum forward gain is 75, so we’ll plug that in for hFE. And our radio consumes 225 milliamperes when transmitting, so that’s our maximum load IL. Crunching through those numbers tells us how big our resistor needs to be.

226 ohms ≈ 1.8 volts / 0.005 amps + 0.255 amps ÷ (75 + 1)

The 220 ohm resistor in our junk box is close enough.

Stepping down the voltage

Our Zener diode is keeping our voltage regulated at 8.2 volts, and we know we can pull the 225 milliamperes of current we need through our transistor. But what do we do about the fact that our mixer doesn’t actually need 8.2 volts? We can step the voltage down from 8.2 volts to 6 volts with a voltage divider.

The simplest voltage divider is two resistors in series. Here’s what that looks like when we wire it into our circuit.

The positive terminal of an unregulated 12 volt battery is connected to the collector of a 2N2222 transistor. A reverse-biased 8.2 volt Zener diode is connected to the negative terminal of the battery and the base of the transistor. A 220 ohm resistor is shorted across the base and collector of the transistor. A voltage divider consisting of a 1000 ohm resistor and a 330 ohm resistor in series is place between the emitter of the transistor and the base of the Zener diode. The result is a regulated 6.2 volt source (at the junction of the voltage divider) that can handle a load of at least 225 milliamperes.

Given two resistors of the same value, the voltage at the point they join will be half the input voltage. The formula for output voltage given two arbitrary resistors is to take the value of the second resistor in ohms and divide it by the sum of the first resistor’s value in ohms plus the second resistor’s value in ohms. Then multiply the result by the input voltage.

Vout = R2 / R1 + R2 ⋅ Vin

We know that our input voltage is 8.2 volts and our output voltage is 6 volts. Digging through the set of resistors in our junk box, we find that a 330 ohm resistor and a 1000 ohm resistor will get us close.

6.2 volts ≈ 1000 ohms / 330 ohms + 1000 ohms ⋅ 8.2 volts

Our mixer needs at least 4.5 volts and can handle up to 8.5 volts, so driving it with 6.2 volts isn’t a problem. The reason we stepped down the voltage in the first place, is because our Zener diode can potentially deliver up to 8.7 volts, which is more than our mixer can handle.

What we’ve got so far

While I wouldn’t want to rebuild a 78L08 voltage regulator from scratch, at this point I’ve got a basic understanding of how one works. And I got to learn about polarity protection and decoupling capacitors in the process.

The image below shows the power circuit in relation to the transmit filter in the NorCal 40A. I put nuts on the stand offs for the circuit board, since without them the weight of the on/off switch caused the whole thing to tilt.

An overhead view of the NorCal 40A showing the power supply circuit and transmit filter.

Where we go from here

This is the third part in a multi-part series about building the NorCal 40A transceiver. Links to the other parts are below.

  1. Building my first HF radio
  2. Learning how a transmit filter works
  3. Regulating voltage with junk box parts

For the curious, photos where taken with an iPhone 5, cropped and resized with Acorn, and compressed with ImageOptim. Schematics where drawn with circuitikz.