The Shop > Electronics & IC Programing

Led voltage indicator

(1/5) > >>

Chris_b:
Hi everyone,

I rashly offered in another thread to "put together a design.. and post it", thinking this would take half an hour with a pen and paper. Then I thought I should do a quick layout and build something to photograph, and I should make sure it can be built by anyone who can solder and wire things up. So a little later than I planned, here it is.... I'm going to do this in several posts as I can't use the picture uploader recommended to me because I use linux not windoze on my pcs  :thumbup:.

The spec:

- A reproducible circuit that runs off a PP3 (alkaline or rechargeable), measures voltage and displays it on a row of 10 leds
- Led current controlled so they don't blow up!
- Choice of bar display (more volts = more leds alight along the row), or dot display (more volts = lit led moves across the row)
- Basic input range 0 to 5 volts. Can be increased to anything you like with 2 resistors

Notes:

- You don't have to use all 10 leds
- observe + and - signs. The circuit does NOT measure voltages that are negative with respect to the battery negative terminal
- I've set the led current to about 10mA each (can be varied, see later). If you run from a PP3 and use the bar display option, the battery won't last too long. I suggest a rechargeable which would give you about an hour with all 10 leds on. Or you could use a 9 or 12 volt dc mains power unit eg one of the plug-top power supplies.

The circuit and layout on a piece of stripboard is attached in the picture. Parts list for the basic circuit:

a) Piece of stripboard at least 13 strips wide, 14 holes long
b) LM3914 or LM3914-1 integrated circuit (these are quite commonly available in UK-  Maplin, Rapid, etc)
c) 10 uF 16 volt electrolytic capacitor (or bigger is ok if it fits on the board)
d) 3.9 Kohm resistor **
e) 10 Kohm resistor **
f) a few inches/cm of tinned copper wire for links

optional:
g) terminal pins - useful at the edge of the board for connecting wires. Careful as you push them in or the board will break.
e) 18 pin socket for the LM3914

** these resistors set the voltage range, AND the led current (= brightness). More combinations later...

Chris_b:
Here's pictures working in bar mode

The input range is 0 to 5 volts. As the voltage rises past each 0.5 volt interval, the next led along will light.

I used a bar led display in a socket as it was quicker to put together for testing; this is a set of 10 individual leds in a handy package. You can use whatever you like, mix colours, sizes etc. Forget about the terminal pin in the top left of the photo, the LED +ve wire just connects to the top of the strip, and the link across the board goes on the hole where the pin is (as in the layout picture earlier)

The ic is in a socket - again so I could change it easily to make sure the circuit is repeatable. Not compulsory.

Mode change requires removing/adding the wire link just below the ic in the picture. I unsoldered/lifted the right hand end for the dot picture. Note it isn't connected to the link next to it, that's just how it looks in the photo.

Chris_b:
...and now in dot mode

Chris_b:
Details of how to make a 10 volt version.

The basic circuit has a range of 0 - 5 volts (chosen because the input must always be a bit below the battery voltage).

To increase the range, we fit resistors RX and RY to make a potential divider on the input to the ic, and move the input wire (the mauve one) to a different place on the circuit board (labelled "alternate +ve input > 5 volts" on the layout).

For a 10 volt input, use 10 Kohms for RX and RY. In practice, almost any values will do provided they are the same, and the value isn't small enough so it overloads whatever you're measuring. As its name suggests, this divider takes 10 volts in and divides it down to 5 volts to suit the basic range.

You can set almost any range you want with appropriate values of RX and RY; I'll post equations later.

Chris_b:
Other possibilities:

You can run the leds from a different voltage source to the rest of the circuit by disconnecting the "led +ve wire" from the circuit board and connecting the other voltage source +ve here (its -ve connects to the battery -ve pin at the other end of the board).

This reduces the battery current to just a few milliamps so battery life will be much longer. Provided the other voltage is above about 3 volts, the leds will light. Note they won't change in brightness as the voltage rises above this, because the LM3914 passes a constant current through them, regardless of the voltage. Beware that the LM3914 will get hot and eventually burn out if you use a voltage that's too high. What's too high you ask? Well, it depends on how many leds are lit and for how long. I wouldn't suggest more than 15 volts in bar mode where you might have most of the leds lit. In dot mode you could probably use up to 20 volts.

Varying the led current

As I said above, R1 and R2 do two things, and they are inter-related. They set the voltage range and they also determine the value of the constant current that is passed through a led when it's lit. I calculated values according to the data sheet and the led current was more than specified. I don't know why this is, and I tried several LM3914 bought from different places (so different manufacturing batches) with the same result. So I calculated sets of resistors R1 and R2 that gave decreasing led currents whilst keeping the 5 volt range.

R1 = 1.2Kohm; R2 = 3.6Kohm  led current about 18mA
R1 = 2.2Kohm; R2 = 5.6Kohm  led current about 14mA
R1 = 3.9Kohm; R2 = 10Kohm   led current about 10mA

If you wanted something seriously bright, then use the smallest set of values (and a big battery or a mains power supply!).

Note that high-intensity leds are very bright at the lower current, though they have a narrower viewing angle than ordinary leds.



If you wish to choose your own input range that is greater than 5 volts, I suggest the following

Use 10Kohm for RY

Set RX (in Kohm) = 2 (Vin - 5)   where Vin is your desired maximum input voltage



Hope this is of interest to some folk. Do post if you make one and it works (or even if it doesn't!)

Chris

Navigation

[0] Message Index

[#] Next page

Go to full version