Posts | Comments

Planet Arduino

Archive for the ‘LM3914’ Category

Set
13

Tutorial – LM3914 Dot/Bar Display Driver IC

bar, display, dot, driver, Electronics, example, IC, LED, level, LM3914, LM3915, LM3916, TI, tronixstuff, tutorial, voltmeter Commenti disabilitati su Tutorial – LM3914 Dot/Bar Display Driver IC 

Introduction

This is the first of three tutorials that will examine the LM391x series of LED driver ICs. In this first tutorial we cover the LM3914, then the LM3915 and LM3916 will follow. The goal of these tutorials is to have you using the parts in a small amount of time and experiment with your driver ICs, from which point you can research further into their theory and application.

Although these parts have been around for many years, the LM3914 in particular is still quite popular. It offers a simple way to display a linear voltage level using one or more groups of ten LEDs with a minimum of fuss.

With a variety of external parts or circuitry these LEDs can then represent all sorts of data, or just blink for your amusement. We’ll run through a few example circuits that you can use in your own projects and hopefully give you some ideas for the future. Originally by National Semiconductor, the LM391X series is now handled by Texas Instruments.

LM3914

Getting Started

You will need the LM3914 data sheet, so please download that and keep it as a reference. So – back to basics. The LM3914 controls ten LEDs. It controls the current through the LEDs with the use of only one resistor, and the LEDs can appear in a bar graph or single ‘dot’ when in use. The LM3914 contains a ten-stage voltage divider, each stage when reached will illuminate the matching LED (and those below it in level meter mode).

Let’s consider the most basic of examples (from page two of the data sheet) – a voltmeter with a range of 0~5V:

 LM3914 5V voltmeter circuit

The Vled rail is also connected to the supply voltage in our example. Pin 9 controls the bar/dot display mode – with it connected to pin 3 the LEDs will operate in bar graph mode, leave it open for dot mode. The 2.2uF capacitor is required only when “leads to the LED supply are 6″ or longer”. We’ve hooked up the circuit above, and created a 0~5V DC source via a 10kΩ potentiometer with a multimeter to show the voltage – in the following video you can see the results of this circuit in action, in both dot and bar graph mode:

Customising the upper range and LED current

Well that was exciting, however what if you want a different reference voltage? That is you want your display to have a range of 0~3 V DC? And how do you control the current flow through each LED? With maths and resistors. Consider the following formulae:

LM3914 formulae

As you can see the LED current (Iled) is simple, our example is 12.5/1210 which returned 10.3 mA – and in real life 12.7 mA (resistor tolerance is going to affect the value of the calculations).

Now to calculate a new Ref Out voltage – for example  we’ll shoot for a 3 V meter, and keep the same current for the LEDs. This requires solving for R2 in the equation above, which results with R2 = -R1 + 0.8R1V. Substituting the values – R2 = -1210 + 0.8 x 1210 x 3 gives a value of 1694Ω for R2. Not everyone will have the E48 resistor range, so try and get something as close as possible. We found a 1.8 kΩ for R2 and show the results in the following video:

You can of course have larger display range values, but a supply voltage of no more than 25 V will need to be equal to or greater than that value. E.g. if you want a 0~10 V display, the supply voltage must be >= 10V DC.

Creating custom ranges

Now we’ll look at how to create  a lower range limit, so you can have displays that (for example) can range from a non-zero positive value. For example, you want to display levels between 3 and 5V DC. From the previous section, you know how to set the upper limit, and setting the lower limit is simple – just apply the lower voltage to pin 4 (Rlo).

You can derive this using a resistor divider or other form of supply with a common GND. When creating such circuits, remember that the tolerance of the resistors used in the voltage dividers will have an affect on the accuracy. Some may wish to fit trimpots, which after alignment can be set permanently with a blob of glue.

Finally, for more reading on this topic – download and review the TI application note.

Chaining multiple LM3914s

Two or more LM3914s can be chained together to increase the number of LEDs used to display the levels over an expanded range. The circuitry is similar to using two independent units, except the REFout (pin 7) from the first LM3914 is fed to the REFlo (pin 4) of the second LM3914 – whose REFout is set as required for the upper range limit. Consider the following example schematic which gave a real-world range of 0~3.8V DC:

LM3914

The 20~22kΩ resistor is required if you’re using dot mode (see “Dot mode carry” in page ten of the data sheet). Moving on, the circuit above results with the following:

Where to from here?

Now you can visually represent all sorts of low voltages for many purposes. There’s more example circuits and notes in the LM3914 data sheet, so have a read through and delve deeper into the operation of the LM3914. Furthermore Dave Jones from eevblog.com has made a great video whcih describes a practical application of the LM3914:

Conclusion

As always I hope you found this useful. Don’t forget to stay tuned for the second and third instalments using the LM3915 and LM3916. Full-sized images are on flickr. And if you made it this far – check out my new book “Arduino Workshop” from No Starch Press.

In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, subscribe  for email updates or RSS using the links on the right-hand column? And join our friendly Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

The post Tutorial – LM3914 Dot/Bar Display Driver IC appeared first on tronixstuff.

Ago
01

Announcement – August Competition!

74HC595, competition, DSO, JYE Tech, LED, LM3914, MSP430, RGB, RGB LED, TLC5940, tronixstuff Commenti disabilitati su Announcement – August Competition! 

Hello everyone!

During July there was another competition which was quite fun, so from August and onwards we shall do it again. The winner ‘S.R.’ won the minor prize so the major prize jackpots into this month. Running these competitions are a way of saying thank you to my readers, and to generate some interaction. So …

All you have to do for a chance to win is the following:

  1. Read the blog posts and articles in August, as there will be six questions you will need to answer placed randomly amongst the posts. To keep track, subscribe using one of the methods on the right hand side of this page
  2. When you have answers for all six questions, email them to competition@tronixstuff.com
  3. If you follow me on twitter (@tronixstuff) and retweet one post in August, you will receive two entries, so put your twitter address in your email.
  4. On September the 1st, all the email addresses will be placed in a random draw and one selected. If the entry drawn has all six questions correct, they will win the major prize!
  5. If the first entry drawn does not have six correct answers, they will win the minor prize, and the major prize will carry over until September, to be combined with the new major prize.

The prizes!

Major prize

The major prize for August consists of the following:

  • One assembled, used JYE Tech Digital Storage Oscilloscope – from the kit review;
  • One new pair of 315 MHz wireless data modules, as used in Getting Started with Arduino – Chapter Eleven;
  • And something different, the new Texas Instruments MSP430 Launchpad kit, including evaluation board, two MCUs  and the USB cable.

Minor prize

The minor prize for August is John’s Fun with LEDs! pack, consisting of:

  • ten each of red, green, yellow and orange 5mm LEDs;
  • four RGB 10mm diffused LEDs
  • three 74HC595 shift registers
  • two Texas Instruments TLC5940 16-channel LED driver ICs
  • two LM3914 bar graph/dot driver ICs
  • 20 x 560 ohm 1% resistors (they missed the photo call)

Hopefully everyone can have some fun reading about electronics and learning along the way. As with any competition, there are a few rules:

  1. If you have won a previous competition, you cannot enter
  2. If you know me personally, you cannot enter
  3. The prizes carry no warranty, we accept no liability for anything at all that they may cause
  4. Prizes only include what is in the photograph, and will be sent via standard airmail free of charge
  5. My decision is final
  6. You can witness the draw in person with prior arrangement
  7. The time used is Australian Eastern Standard Time (GMT: +10)

If you cannot wait for a chance to win, the DSO and and a range of LEDs are available from our friends at Little Bird Electronics.

So keep your eyes peeled and have fun!



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook