Microcontrollers, the heart of all modern electronic gadgets, are increasingly powered with sub-5V power supplies. This complicates the control of external loads powered by higher voltages.

The trend towards low voltage supplies is dictated by the fact that modern digital and mixed-signal integrated circuits are CMOS based, and with an ever increasing demand for higher frequencies, the only way you can control the power dissipation is by lowering the supply voltage. As a result, supplies have dropped from 5V to 3.3V and down to 1.8V for many popular, low-power microcontrollers in even the 8-bit range. Typically, 8-bit microcontrollers have a single power supply rail. 32-bit devices may have multiple power supply rails: 3.3V for the physical interface, and 2.5V or lower for internal operation. Some 32-bit devices also have triple power supply rails: 3.3V, 1.8V, and 1.1V for instance.

The reduced I/O supply voltage leads to increased complexity in handling high-side voltage switching. Figure 1 illustrates the conventional solution for controlling a 5V high-side switch, driven here by a 3.3V signal.

Figure 1 Standard method for a high side switching circuit

The low voltage microcontroller switches the NPN transistor T2, which in turn drives the PNP transistor T1. R3 represents the load. The load is grounded, but can also be a floating load with a suitable low-side switch.

This Design Idea proposes an alternative (Figure 2 ). In place of T2, we make use of Zener diode D1 of appropriate breakdown voltage.

Figure 2 A simpler high side switching circuit using a Zener diode

Traversing the path x ? y ? z for the transistor in ‘OFF’ and ‘ON’ conditions, the following equations can be used to calculate the value of the breakdown voltage for the Zener diode. A high microcontroller output voltage, added to the Zener breakdown voltage, is enough to turn off T1 as presented in equation (1). When the microcontroller output is set to low, the voltage at node y is low enough to turn the transistor T1 on as presented in equation (2).

V OH(min) + V Z = V CC …(1)

V OL(max) + V Z + V BE(sat) + V R1 = V CC …(2)

Both these equations can be merged as:

V CC – V BE(sat) – V OL(max) – V R1 = V Z = V CC – V OH(min) …(3)

Where,

V OH(min) : minimum output voltage for logic HIGH for the selected microcontroller

V OL(max) : maximum output voltage for logic LOW for the selected microcontroller

V Z : Zener Breakdown Voltage

V BE(sat) : Base Emitter voltage of transistor T1 during saturation

V R1 : Voltage drop across resistance base resistor R1 due to the base current passing through it. It has been arbitrarily chosen as 0.5V when T1 is saturated. Whereas, when the transistor T1 is in cutoff state, hardly any current passes through R1 and therefore the voltage drop across it can be ignored.

V CC : Higher voltage Supply Voltage

The value of R1 can be found out using the following formula:

The parameters can be found out easily from the datasheets of the respective devices.

As a test case for switching 5V across the load using TI’s MSP430 powered with a 3.3V supply voltage, we have used the following data:

V OH(min) = 2.7V, V OL(max) = 0.3V

= 2.7V, V = 0.3V V BE(sat) = 1.2V

The range obtained for V Z by substituting the values in (1) and (2) comes out to be:

3.5V = V Z = 2.3V …(4)

For the above range, a commonly available Zener is the 1N5223 (V Z = 2.7V).

Similar calculations can be done for a 12V load with the following result:

10.5V = V Z = 9.3V …(5)

For the above range, a commonly available Zener diode is the 1N5240 (V Z = 10V).

The circuit in Figure 2 was simulated in TINA (with T1 = BC807), yielding these results:

Figure 3 A Zener based high side switching circuit Simulated in TINA

Figure 4 Simulation result, 5V load voltage, for Figure 3

Figure 5 Transient response, 5V load voltage, for Figure 3

Figure 6 Simulation result, 12V load voltage, for Figure 3

Figure 7 Transient response, 12V load voltage, for Figure 3

The above simulation results can be compared with those of the conventional circuit of Figure 1 (T1 is BC807 and T2 is BC547) as follows:

Figure 8 A conventional high-side switching circuit simulated in TINA

Figure 9 Simulation Result for circuit in Figure 8

Figure 10 Transient Response for circuit in Figure 8

The advantage of the conventional design over the Zener-based alternative is:

There is no change required to Figure 1 to be able to handle various supply voltages, such as 5V, 9V, 12V, etc.

The advantages of the Zener-based design over the conventional design are:

The switching frequencies attainable with Figure 2 (~1MHz) are higher than Figure 1 (~250kHz).

There is a cost reduction (a Zener diode is cheaper than an NPN transistor)

PCB layout becomes easier.

An electronic birthday candles application of this DI is presented in Figure 11 . It consists of a random mix of red, green, blue, and warm white LEDs in a 3×3 matrix, controlled by an MSP430 employing a standard multiplexing scheme. Since the system uses blue and white LEDs, it needs >3.3V to reasonably turn them on, and we have chosen to drive the LED matrix with 5V from a USB source.

Figure 11 Application involving MSP430 driving higher voltage high-side switches using Zener diode circuit