Eye Candy 2

A bargraph display

The LM3914N is a chip specially designed to drive a bargraph display. The basic IC operates as a linear voltmeter with a 1.2v range, using 10 leds as the scale. Our need is to get full power showing all 10 leds lit, with just the bottom led lit when the fan controller is turned right down to around 6v.

bargraph circuit

To get the maximum input scaled down to suit, we use a variable potential divider VR1 on the input from the fan controller.

To raise the zero point, we add a resistor R2 between ground and the "lo" pin (#4) of the IC. The chip contains a chain of 10 x 1k resistors marking off the lit steps between zero and full-scale; we add to the first resistor in the chain (between zero and the first led pin) so there is another potential divider with 9k above the "led1 on" point, 1k+R2 below it.

The only other components needed are the 1k2 resistor R1 that sets the led current to 10mA and a couple of capacitors to get rid of any noise on the power or signal lines.

Here's a stripboard layout and construction plan with the parts list.


stripboard layout
Parts List
IC1 LM3914 and 18-pin DIL socket
C1 2.2uF 16v tantalum bead capacitor.
C2 0.47uF 16v tantalum bead capacitor
R1 1k2 resistor, 0.25W
R2 6k8 resistor, 0.25W (see notes)
VR1 10k horiz preset eg Maplin UH03D
D1-10 LEDs to suit.


bargraph construction guide

Notes:

  1. Resistor R2 may need to be a different value to suit your controller. A lower value will bring the bottom led on at a lower voltage, and vice-versa. An easy mod to save experimentation is to use a 10k cermet preset – the miniature horizontal types (eg Maplin WR42V) will span the 0.2" gap between pin #4 and pin #2, also a ground track. Put the wiper to the pin #2 track and a track break between the legs on pin #4 track.
  2. If you can't get tantalum bead capacitors, use a 10uF aluminium electrolytic for C1 and a 2.2uF for C2. Keep the led leads as short as possible (up to 12" is OK, 36" may cause problems;)
  3. Any colour leds can be used, or you can mix them, but bear in mind they all get the same 10mA current with this chip, so brightness may vary along the column.
  4. To set up, connect power, ground and signal wires. The signal comes from the regulator output or the fan red wire. Signal ground and power ground are connected together by a link, so everything works fine with just a single ground wire. With the controller on full, tweak VR1 so all the leds are lit, but any turn-down extinguishes the top led. It's very sensitive to adjustment. Then turn the controller down to check all leds go out in turn. Note D1 (the top led on the photo) is first on (the display is upside-down as shown).
  5. The 2nd 12v connection on track #10 is the common supply to the led anodes.
top side
bottom side

It can be fitted anywhere along the track (up as far as the IC) to suit. On the board left, I used a bargraph panel, with a length of wire along all the anode pins then soldered into the bottom track. The link to the left of the IC takes the connection onto the 12v rail. I also gained a few columns by putting some links under the preset.

More info and circuits for the LM3914 in the NS datasheet and their Linear Brief #48.