Electronic Design

Firmware-Adjustable LCD Bias Generator Swings Outside The Rails

Using liquid-crystal-display (LCD) modules over a wide range of temperatures sometimes requires adjustment of the bias voltage to maintain an acceptable contrast level. This adjustment ideally should be automatic, so the user needn’t make the adjustment. A temperature sensor that’s already present for other system functions can provide temperature information for selecting LCD bias voltage.

A digital-to-analog converter (DAC) or electronic pot can provide a means for this automatic adjustment. However, the added cost, size, power consumption, weight, or volume can be prohibitive in a tiny portable instrument, where all of these parameters come at a premium. Such a system often includes a microcontroller with a pulse-width-modulated (PWM) output capability. The PWM output can be filtered with a simple resistorcapacitor (RC) filter to produce a variable voltage under firmware control.

In particular, many members of the popular family of Microchip PIC microcontrollers include a dedicated PWM output, which can be adjusted easily in firmware just by changing a single register value. Others can produce a PWM output by combining on-chip features. For instance, the Motorola 68HC11 family provides a timer system with several available timer output compare (TOC) functions, where TOC1 can be combined with any of TOC2 thru TOC5 to produce a PWM output. Neither of these options require any interrupt support to produce a PWM output. Other microcontrollers which lack the appropriate PWM hardware can produce such an output by using interrupts along with a timer interrupt.

Applying an RC filter to such a PWM output is straightforward and commonly used method for generating an analog voltage inexpensively. When the output must be quickly adjustable, the filter cutoff must be set to a relatively high frequency, which usually dictates an even higher frequency of the PWM generator to avoid generating a noticeable amount of ripple on the output. However, LCD bias voltage is relatively insensitive to ripple, and rapid changes aren’t needed, making this application ideal for PWM techniques.

Using simple PWM voltage control is very straightforward until the LCD display becomes an extended-temperature version, used at extremely cold temperatures. Under these conditions, most such displays require a bias voltage that’s negative with respect to ground. If negative voltage isn’t already present in the system, significant amount of additional circuitry is required for two reasons. First, it must generate a negative supply rail and secondly, it has to provide the appropriate level shifting for the PWM output. However, we can take advantage of the alternating nature of the PWM output to provide charge pump to produce this negative voltage (see the figure).

When the PWM output is high, capacitor C1 charges through the series combination of R1 and D1. At the low currents involved, the forward voltage of a Schottky diode is negligible and may be safely ignored. When the PWM generator is programmed for low duty cycle, this charging operates in a current-starved mode and C1 does not attain a significant voltage. Therefore, the charge delivered during the high time of the PWM output is essentially linear:

Charge = tHIGH * VCC/R1

where Charge is the final charge on C1 in coulombs; tHIGH is the high time PWM in seconds; VCC is the PWM high-state voltage in volts; and R1 resistance in ohms.

After charging, the voltage across C1 is given by Charge/C1, since farad is just a coulomb per volt. When the PWM output signal goes low V), V1 then goes to −tHIGH VCC/(R1/C1), charging C2 through R1 and D2. When steady state is reached, the voltage at Output then reaches tHIGH * VCC/(R1/C1), which is negative with respect to ground.

Note that the calculations above ignore the voltage developed across C1 in computing the amount of charge. Because Output goes only slightly negative, this is a reasonable assumption. But if a significant negative voltage is required, this voltage cannot be ignored. In addition, R2 bleeds off charge from C2, in parallel with any load current involved. If the PWM is stopped, Output will rise to VCC if there’s no load current. In the case of LCD bias, the load is to VCC and R2 may be omitted, with the pull-up effectively provided by the LCD module itself.

The second-order effect of the voltage developed on C1 during charge makes the actual output voltage nonlinear with respect to the PWM duty cycle. The actual output voltage developed reaches its minimum (i.e. most negative) at a 50% duty cycle and then begins to fall back toward VCC with further increases in the duty cycle. The function that describes the behavior of the output voltage with PWM duty cycle is a quadratic, with the minimum at 50% duty cycle.

Another non-ideal effect that must be considered is the loading presented by R2 in parallel with the load. This loading acts in series with the effective output impedance of the circuit to produce a resistor divider, raising the final output voltage toward VCC. In LCD bias applications, this falls into the “If you can’t fix it, feature it” category. The actual attainable output voltage falls in the range of +1 to −3 V. This is ideal for the application, because the typical LCD bias voltage is required to be about +0.5 V at high temperatures, falling to around −2 V at extremely cold temperatures.

This circuit also has other potential applications, such as varactor biasing. By swapping connections such that D1 goes to VCC and C2 goes to ground, it’s possible to produce an output voltage that’s adjustable above and below VCC. In general, any application that requires a voltage which is adjustable outside the supply rails, and can tolerate some ripple and a relatively high Thevenin impedance, can use this circuit. If surface-mount components are used, only about 0.2 in.2 of space is required. The often-unused PWM capability of the microcontroller can be used to good advantage to produce a variable output voltage that exceeds the supply rails, using minimal programming and no interrupts.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish