## Polarity Inverters

What are polarity inverters and what are used for.

Sometimes we design and build a circuit that needs a dual power supply. But, in certain cases, we really need just a positive voltage to power a circuit and the negative is only used for some special polarization that doesn’t really need the same amount of power used for the positive. Consider, for example, a circuit with a depletion channel MOSFET that requires a negative voltage just for the polarization of its gate.

In such cases, it is economically better to use a different approach than having a full fledged dual power supply. This approach is called “polarity inversion”, resulting in a device that is able to convert the positive voltage of a power supply into a low current negative voltage.

A polarity inverter is, therefore, a circuit that is capable of taking a positive voltage with respect to the ground and generate a negative voltage also with respect to the ground, so that we can have both a positive and a negative voltage available at the same time to power another circuit, without using a dual power supply.

In principle, the inverter is based on the following circuit.

There are two capacitors and two diodes, and a switch that connects the positive of the first capacitor alternatively to the positive voltage source and to the ground.

When the switch is set toward the positive voltage, capacitor C1 starts charging through the first diode, which closes the circuit toward the ground. Given enough time, the voltage at the capacitor increases up to the input voltage minus the voltage drop on the diode.

For example, if the input voltage is 9V, the capacitor will charge to about 8.4V.

This is represented in the following diagram by the first pulse on Vin and the corresponding voltage on C1.

Now, once the capacitor is charged, we move the switch toward ground. Doing so, we open the circuit that connects capacitor C1 to the input voltage and, instead, we connect the same end of the capacitor toward ground.

This way, the voltage at the capacitor C1 is now providing a forward polarization to the second diode, the one on the right, and therefore we have a closed circuit that goes from capacitor C1, to capacitor C2 and through the second diode.

If we choose the two capacitors with the same capacitance, half of the charges on capacitor C1 will transfer to capacitor C2 and, as a result, both capacitors C1 and C2 will end up with half of the original charge and, therefore, with half of the original voltage that was on C1.

This is represented by the second part of the above diagram, where now the input voltage is zero, but capacitors C1 and C2 are at half the original voltage.

On the next cycle, we move the switch back toward the power supply, so capacitor C1 is again charged to the input voltage. In this case, however, the second diode is inversely polarized, so capacitor C2 is isolated and cannot either charge nor discharge, thus it keeps the previous value of voltage.

Moving the switch back to the ground, C1 gives now some more charge to C2 and, therefore, its voltage drops a bit while C2 voltage, instead, increases more.

And you can now see that if I keep switching back and forth, adding more cycles to the diagram, both C1 and C2 keep retaining more and more charges, and their voltage keep increasing so that, after a number of cycles, C2 has reached about the same voltage as the input.

Now, note how capacitor C2 is connected to the ground on its positive side, and the other end is offering its negative voltage to the the output of the circuit that is thus negative with respect to the ground.

If you look at the last of the four diagrams, in fact, you can see how the output voltage becomes more and more negative with respect to the ground, with a tendency to reach the 8.4 V we mentioned before.

So, if we keep moving the switch back and forth quickly, after reach that state we can sustain it, even if we remove a little amount of charge from C2 at each cycle, due to a load that we could put across its leads.

This circuit is called a charge pump, because is able to pump charges into the second capacitor, even if it is not directly connected to the input voltage.

Note that if we start applying a strong load to the output, C2 won’t be able to recharge fast enough and its voltage will start dropping. And that is why we cannot use this polarity inverter for loads comparable to those that we can put directly on the original power supply.

But, how do we move a switch fast enough to obtain this functionality?

The trick is to replace the mechanical switch with a a solid state one, and control it with a square wave oscillator, the so called astable multivibrator.

One way to do that is to use a 555 timer, like in the following schematic.

The circuit on the right half side is exactly the same as the one in the previous schematic. However, on the left half side, the mechanical switch has been replaced with a 555 timer setup as an astable multivibrator, with a duty cycle close to 0.5.

Pin 3 of the 555, which is the output pin, will move alternatively from the voltage of the power supply to the ground, thus working as if it was the switch of the previous schematic.

The oscillation frequency is provided by R1, R2 and C4, which I calculated in this example to provide a frequency of about 30 kHz with a duty cycle very close to 0.5.

If you would like to know more about the 555 timer, I suggest you to watch the video I made about one year ago where I describe what it is and how it works. Here is the link to the video.

In order to be able to support relatively higher currents with the polarity inverter, we need to be able to recharge the capacitors at a faster pace, which translates in a higher current. One way do so is by using the output of the 555 to pilot a couple of transistors with a high value of beta, the coefficient that express the amplification in current of the transistors. With a higher available current, the capacitors will charge faster and, therefore, it will be possible to handle a higher load current.

Here is an example circuit that can provide higher currents:

This circuit is basically identical to the previous one but, instead of applying the output voltage of the 555 directly to the charge pump, made of C1, C2, D1, and D2, the 555 controls the two transistors 8050 and 8550, respectively an NPN and a PNP.

With these transistors, we can still connect the positive lead of C2 to the positive of the power supply and to the ground alternatively, and we can force the charges in and out of the two capacitors to move at a faster pace.

The two resistors R3 and R4 are necessary to limit the amount of current through the base of the transistors. Too much current in there would have two unwanted side effects:

First, the transistors could burn because of too much current.

Second, even if the transistors did not burn, they would still go deep into saturation, which would make them spend more time moving between the on and off states and causing the circuit not to work as expected.

In addition to that, since the voltage at the output of the 555 does not change instantaneously between 0 and Vin, there would be a period, during the transition, where both transistors would be on at the same time. As a result, the input voltage would be short circuited for a little while during each cycle, which is a condition definitively to avoid.

To fix the problem, I added those two Zener diodes to the circuit. The Zener diodes create a gap between 4.7V and 5.1V that will prevent the transistors from being both on at the same time, thus fixing the short circuit problem.

Here is how it works.

During the transition from 0 to 9V on pin 3 of the 555, transistor 8550 will be on in the interval between 0 and 4.7V.

During the interval between 4.7V and 5.1V both transistors will be off and, finally, during the transition between 5.1V and 9V, transistor 8050 will be on.

Viceversa, during the transition from 9V to 0, the opposite sequence will happen: first, transistor 8050 will be on, then both transistors will be off, then transistor 8550 will be on, alone.

And that is why the two zener diodes make sure that the two transistors will never be on at the same time, thus protecting them and the power supply.

The final effect will still be the same: the positive lead of C2 will be alternatively connected to the positive and to the ground, making the charge pump to work, and creating the negative output.

To conclude, polarity inverters have their usefulness in certain situations, but are not good enough to replace a full fledged dual power supply.

So, when do we use one or the other?

We will use the polarity inverter in those cases where only a little load is required on that specific pole, whereas the majority of the load would depend on the single power supply.

Whenever we need considerable and comparable amount of power on both the positive and the negative poles, we will need to use a dual power supply.

And finally, if you would like to see the polarity inverter in action, you may want to watch this video, which I posted back in December 2020.

## Fundamentals Of Electric Circuits

Some basic nomenclature and information on electric circuits.

When we think of an electric circuit, the first thing that comes to mind is a bunch of electric and electronic components put together to make a device that provides a certain functionality.

This is totally right, of course, but it is not a precise definition of an electric circuit. In fact, circuits can be defined in different ways, depending on the particular aspect of them that we want to highlight.

If we want to define a circuit with respect to the wave length of the voltage and current that the circuit handles, we will distinguish between “lumped” and “distributed” circuits.

If instead we want to highlight the kind of electric or electronic components the circuit is made of, then we need to talk about linear and non-linear circuits.

And, finally, depending on the temporal stability of the components, we can talk about “time-invariant” and “time-variant” circuits.

And, of course, we can consider combinations of the properties and, therefore, combinations of different circuit types.

In this article, I will go through the above list of circuit types and provide a proper definition and description of each one of them. Combination of those types will lead to combined definitions and descriptions of the basic types. However, in this context, I will go through only the basic types of circuit, leaving to you the task to provide definitions and descriptions of the combinations.

## Lumped and Distributed Circuits

Let’s go now into more details about these kind of circuits. What differentiates these circuits is the size of their components compared to the size of the wavelength of the electric current flowing through them. Hum, well, I guess we need to back up a little bit first. Let’s start with the types of current.

We have two kind of currents: the direct current, or DC, and the alternate current, or AC. DC current always flows in the same direction and never changes. AC current has usually the shape of a sine wave, or some other shape that periodically inverts the direction of the current. The number of times the current inverts its flow depends on the number of times the voltage flips its polarity. When the Voltage goes from positive to negative n number of times in a second, we say that its frequency is n and it is measured in Hertz.

Since the flow of the current in a conductor is not instantaneous, it makes sense to think that a change in the voltage at the ends of a conductor makes the current change progressively through the conductor. And if the voltage keeps changing back and forth, so does the current. At the end, both the instantaneous values of the current and the voltage across the length of the conductor follow in space the same shape of the voltage changes (in time) applied at the ends of the conductor. So, if the voltage changes in time like a sine wave at the ends of the conductor, it will follow a similar shape in space throughout the length of the conductor. The length of such a sine wave in space throughout the conductor is called wavelength of the voltage, or the current. Such length in space depends on the length in time of the corresponding voltage applied at the ends of the conductor.

We can calculate the wavelength using the following formula:

The Greek letter “lambda” represents the wavelength, the f represents the frequency of the voltage, which is how many times the voltage goes from positive to negative and back in one second. And, finally, the letter ‘c’ represents the speed of light. Yes, you got it right, it is the speed of light!

When the wavelength is much longer than the physical size of the components of the circuit, we say that it is a lumped circuit, because the components are just small lumps with respect to the wavelength itself. In such a case voltage and current are practically constant across the whole length of the component.

When the wavelength is comparable with the physical size of the components of the circuit, we say that it is a distributed circuit, because the components are so big compared with the size of the wavelength that the wave itself is distributed across them. In such a case voltage and current will be different in different sections of the component, at any instant in time.

Distributed circuits cannot be analyzed with normal algebra equations. For those, it is necessary to heavily use calculus. Example of such circuits are the microwave circuits, those used to deal with radars and satellite signals.

## Linear and Non-Linear Circuits

A component is defined as linear if it can be represented in a I-V (current-voltage) diagram with a straight line.

A component is defined as not linear if its representation on a I-V diagram is not a straight line.

Simply put, a linear circuit is one made with only linear components, while a non-linear circuit is one that has at least one non-linear component.

Note the difference: for a circuit to be linear, ALL the components must be linear; for a circuit to be non-linear, it is enough that ONLY ONE component is non-linear. All the other components can be linear and still the whole circuit is non linear.

## Time-Invariant and Time-Variant Circuits

Difference between time-invariant and time-variant circuits is also straightforward.

A time-invariant component is one for which the measurements that define it never change over time.

A time-variant component is one for which the measurements that define it can change over time.

As a result, a time-invariant circuit is one made only with time-invariant components. A time-variant circuit is one made with at least one time-variant component. This is a subtle definition, very similar in its form to the one for linear and non-linear circuits.

## Circuits in Series and in Parallel

One last thing I would like to discuss about circuits in general is related on their topology or, in other words, on how the components in a circuit are connected to each other.

There are two main configurations of connected components:

1. components in series
2. components in parallel

Components are said to be connected in series when they are traversed by the same current.

Components are said to be connected in parallel when the voltage on each one of them is the same.

When we talk about connections in series and in parallel, of course, we refer to components directly attached to one another, at least on one terminal, or lead. Components that are far away in the circuit diagram, or that are not directly connected together cannot be defined as in series or in parallel.

So, now, can you tell me what kind of circuit is the one at the very beginning of this article? Put your answer in the comments and let’s see who gets it right.