Connect with us

Sign with 175 LEDs

Discussion in 'LEDs and Optoelectronics' started by kevbo423, Jan 22, 2013.

  1. kevbo423

    kevbo423

    36
    0
    Jan 22, 2013
    Hello,

    I'm new to circuit building and to this forum and just thought I would ask the experts how to pursue this project. I want to make a sign similar to an "Open" sign. Where the LEDs are arranged in the shape of letters. I was hoping it would be battery powered and would turn on at the flick of a switch. I also want to use four different colored LEDs (blue, green, white, and red). If anyone can offer me some insight on how to start this project and anything I need to consider that would be great.

    Thanks.
     

    Attached Files:

  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,178
    2,690
    Jan 21, 2010
  3. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
    As Steve says, for a static display, all the connections and calculations are explained in that very helpful article. If you want an animated display, read on.

    For anything more complicated than a very basic sequence of illumination, you're going to need a micro of some kind to do the controlling. That means you're going to have to learn about programming. There are various options.

    The Microchip PIC is a range of popular devices with some good language compilers available. The first PICs were simple 8-bit devices but they have since expanded into more capable parts. The PIC device contains the MCU core (the processing engine), RAM (memory for storage of temporary data), Flash ROM (memory for storage of your program, which can be reprogrammed without removing the device from the board) and various internal peripherals which enable it to communicate with external devices - serial ports, acquisition of analogue signals, measurement of time intervals, generation of PWM (pulse width modulated) signals to control LED brightness or motor speed, that kind of thing.

    Atmel's AVR range is similar to the PIC. There is also the famous Arduino, which (as far as I can tell) is an AVR on one of several very standardised circuit boards, with lots of support software to ease development. They are quite popular.

    There are larger, more powerful devices such as the Texas Instruments MSP430, the ARM (a very popular architecture adopted by many manufacturers and used in almost all smartphones), and others. There are also smaller 4-bit devices that are used in digital watches and similar products. But for your project, an 8-bit device is probably a good fit.

    The LEDs can be driven by a series of cascaded shift registers such as the 74HC595 driving Darlington arrays such as ULN2003 or ULN2803, or by a proper driver chip (see the thread https://www.electronicspoint.com/transistor-mosfet-pairs-drive-led-cube-layers-t256325.html).

    As you can see, making the LEDs blink in an appealing way is quite a job. Have a think about it and let us know if there's anything we can help with.
     
  4. CocaCola

    CocaCola

    3,635
    4
    Apr 7, 2012
    Yep, just an old school AVR with a secondary USB interface circuit on the board to allow their IDE to interface the board...
     
  5. kevbo423

    kevbo423

    36
    0
    Jan 22, 2013
    Thanks for the quick response guys. Yes (*steve*), I just want a simple sign. After reading over the thread that you sent me to I still am very lost about how to go about this project :( I didn't understand most of what the thread was saying. I tried using the LED calculator found here: http://led.linear1.org/led.wiz using 6V as the source voltage because I was thinking of wiring up 4 D cell batteries in series. I also used 3.4V as the forward voltage, 25mA as the forward current, and a total of 175 LEDs. The wiring diagram that it gave me showed each individual LED being connected to a resistor and then to the power source. Any more help would be much appreciated.
     
  6. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,178
    2,690
    Jan 21, 2010
    Yes, 3.4V (white or blue presumably) LEDs running from 6V can only be driven 1 per string at 6V. Consider having 6 batteries rather than 4. From 9V you can run 2 and the current drawn will be half.

    175 strings at 25mA is over 4A! Those batteries will last between 1 and a few hours depending on the type of battery. Reducing that to 2A (by having a higher voltage and running 2 LEDs in a string will double that, but it's still not a lot).

    How did you arrive at 25mA? Is it just because that's the maximum for the LEDs you've chosen? With 175 of them, the sign is going to be awfully bright. Does it need to be that bright?

    Check the brightness of the LEDs and see what current you actually need, if it's less than 25mA, your batteries will last much longer.

    If you really do need 25mA, then maybe you can consider using fewer LEDs.

    The other option is a power supply so you don't have to worry about batteries. If you're doing this, maybe you can pick up an old laptop power supply. They're often rated at 18 to 19 volts at 2.5A or more. This will allow you to have many more LEDs in each string and you'll have plenty of power to run all your LEDs without the power supply breaking into a sweat.
     
  7. kevbo423

    kevbo423

    36
    0
    Jan 22, 2013
    Ok so the current running through the LEDs determines how bright they are? The LEDs don't need to be super bright. The reason I am using 175 LEDs is because I have them spelling out a few letters and a pattern. So using six D cell batteries would be more effective than running four? If that is the case, why not use a 9V battery? I really appreciate all the help.
     
  8. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
    Yes, the LED current determines the brightness. The relationship is not strictly linear.

    Reducing the current through an LED will also reduce its forward voltage somewhat. You need to take this into account when you calculate the series resistors.

    For best efficiency you would be better to have a higher battery voltage. Twelve D cells will give you 18V. You can connect your LEDs into series strings of up to about 15V, which will give you at least 5 LEDs per string. Only 3V is wasted in the series resistor for each string. This is also a good way of getting longer battery life, although of course the batteries will cost proportionally more to replace, so you don't get anything for free!

    You can reduce the sign brightness at night by using one less cell. Use a SPDT (changeover) switch to connect the sign to either the end of the string of cells, or one cell less than the full lot. Even then, 175 LEDs is a lot to power from batteries and it will become expensive pretty quickly.

    You can also use current regulators (one for each string) instead of series resistors; this will give consistent brightness as the battery voltage falls. I can draw up a schematic if you want. This is also a convenient way to vary the brightness. It could even be tied in to an LDR (light dependent resistor) to adjust the sign brightness automatically according to the daylight intensity.

    You asked about a 9V battery. If you mean the "PP3" type with the clip on the top, these have a low amp-hour rating and won't last long at all. The amount of energy that a battery can store depends on the chemistry and volume. Assuming the same chemistry (e.g. alkaline), energy storage is proportional to volume. Like I said, there's no such thing as a free lunch!

    Steve's suggestion about using an old laptop power supply is a very good one. They'll give a nice high voltage and plenty of current, and they're compact. You would have no need for current regulators with that approach.

    Edit: Remember that different colour LEDs have quite different forward voltages. For example with a 15V string voltage, you might only get 4 white LEDs per string, but you'd get at least 7 red LEDs. You don't have to keep the different colours in different strings, of course - the electrons don't become colour-coded!
     
    Last edited: Jan 23, 2013
  9. kevbo423

    kevbo423

    36
    0
    Jan 22, 2013
    If you could draw up a schematic that would be fantastic! Just a few comments though. Using twelve D cell batteries seems like a lot. Is there any way we can bring that number down? Or maybe use different batteries? Or could you explain a little bit more about using a laptop power supply. Are you referring to just the charging cable? Or would I need something else along with it? As you continue to describe what I need it does sound like a laptop power supply would be the best way to go.

    Also, what do you mean by "You don't have to keep the different colours in different strings, of course"? How would I determine how many different colored LEDs can be in a string? Like if I wanted a string consisting of: (Blue) (Blue) (Red) (Red) (Green)

    I can't thank you enough for helping me with this project.
     
  10. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,178
    2,690
    Jan 21, 2010
    Yes, the laptop charger is the thing I'm talking about. Often they have a standard plug and you just need the matching socket.

    If you have a string of different coloured LEDs, then you add up the Vf for each. So if you have B B R R G then you have something like 3.2+3.2+1.7+1.7+1.8 = 11.6. If you wanted to run them at 15mA from an 18V supply, you would need a resistor of (18 - 11.6)/0.015 ohms = approx 420 ohms

    Typically though you'd string LEDs together to get closer to your voltage, maybe up to 16V for an 18.5V power supply.

    It's easier if you can have as many strings with the same colour LEDs in them as possible, that way the resistance will be the same for each and you have fewer calculations to do
     
  11. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
    As far as batteries are concerned, the physics is pretty simple. For a given chemistry, larger volume means more energy available. You can use larger cells, or more cells, or both, to get more energy. Energy is measured in watt-hours (or Joules) and is power multiplied by time. So with more energy, you can run the LEDs at a higher power (i.e. higher brightness), or for a longer time, or a bit of both.

    Rechargeable batteries are just like normal batteries but their energy can be replaced when it's been depleted. A power supply provides power continuously; there is no energy limit.

    Steve has explained how you can mix LED colours within each string. You can do this in any manner you want. Probably I would connect them in a way that simplifies the connections between them, once you have decided how they will be laid out. If this allows you to repeat a pattern several times, that's a good idea, as Steve mentioned, because if all the strings have the same total LED voltage drop, you only calculate the current limiting resistor value once.

    Actually there might be a reason for keeping LEDs of the same colour in the same string - you may want to run the different colours at different currents. For example, red LEDs tend to look brighter than blue LEDs at the same current. So you might want to run all the red LEDs at a lower current than the blue LEDs, or something like that. LEDs that are in the same string operate at the same current, by definition, so you might need to separate them for that reason. Also, you might want certain areas of your sign, or some colours in your sign, to actually appear dimmer or brighter than the others. The same applies in that case too.

    A lot of this depends on the type of LEDs you get, how you arrange them, and your personal taste. Also, if you use some kind of plastic front piece to improve contrast, it might affect how the LEDs look as well. Only experimentation will tell you.

    If you use a power supply with a regulated output voltage, such as a laptop adapter, you can use resistors for current limiting and the LED brightness will stay the same at all times. If you use batteries (rechargeable or not), you should use a constant current circuit like the one below, instead of resistors, otherwise the LED brightness will drop as the battery discharges.

    Here is a diagram for a constant current circuit that can drive multiple LED strings, for use with battery power. It also has adjustable brightness.

    [​IMG]

    The left hand section produces an adjustable voltage on Q2's emitter, which controls the current sink circuits on the right side. In its current form, the circuit can deal with up to about ten LED strings, running at up to 30 mA each.

    Current through RD causes a roughly constant voltage drop across the four 1N914 diodes; nominally about 0.7V per diode, so about 2.8V at the top. VR1 and VR2 form a voltage divider that limits the range of voltage at the wiper of VR1 to approximately 2.0 (minimum brightness setting) to 2.8V (maximum brightness setting). VR2 provides exact adjustment of the bottom end of this voltage range.

    This voltage is buffered by Q1 and Q2 which are wired as a Darlington transistor. The emitter of Q2 will be about 1.3V lower than the voltage from VR1, i.e. a range of about 0.7V (minimum brightness) to 1.5V (maximum brightness). This voltage is fed to the bases of the current sink transistors.

    Each current sink transistor (these are all marked QS) operates independently but is controlled by the voltage from Q2 emitter. The transistor operates as an emitter follower (Wikipedia it), and tries to keep its emitter voltage equal to its base voltage minus about 0.7V. It does this by drawing current through its collector circuit, and therefore through the LEDs.

    Since QS's emitter voltage is set to a value between about 0V and 0.8V (depending on the brightness setting), the voltage across the emitter resistor, RE, is a set voltage in the range 0~0.8V (approx), and this causes a controlled (or regulated) current to flow in the collector, depending to the resistance of RE (which is fixed) and the brightness setting, according to Ohm's Law, which is I=V/R.

    Ohm's Law says that for a resistor, current = voltage divided by resistance. At maximum brightness setting, voltage is 0.8V. Choosing a resistance of about 40 ohms means that the current will be about 20 mA through the LED string in the collector circuit. When the brightness control is at half way, QS's emitter voltage will be 0.4V and this will produce a collector current of 10 mA. (From Ohm's Law; R=40, V=0.4, I=0.01 amps, or 10 mA.)

    An approximate value for RE can be chosen using a rearrangement of Ohm's Law to R = V / I but V=0.8V is only an approximation and it may be better to use a 50 ohm or 100 ohm trimpot for each RE, especially if you want different currents in different strings. Dissipation in RE is not significant at LED string current of 30 mA or less, so any small trimpot will be suitable.

    The actual voltage of the battery supply, Vbat, and the voltage dropped by the LED string, Vstring, are not critical, except that (Vbat - Vstring) must be at least 1.2V or so for proper operation of the current sink.

    The transistors used for QS may need to be rated for significant power dissipation and/or heatsinked. The power dissipated in each QS transistor is the product of the current through it (in amps) and the voltage across it. This comes from the Power Law, P = V I.

    For these calculations, the collector current can be assumed to be the LED current at the maximum brightness setting, and the voltage across the transistor is equal to (Vbat - Vstring - 0.8). The final 0.8 is the voltage across RE at maximum brightness.

    Multiplying these numbers gives the power dissipated in the transistor. A small transistor in a TO-92 package (Wikipedia it) has a thermal resistance to ambient of about 100 degrees Celsius per watt. Therefore, if it is dissipating 0.5W and has no heatsink, its temperature will be 50 degrees Celsius above ambient, which feels pretty hot (you can't touch it for very long).

    Some suitable transistors for QS, with their maximum collector current and maximum power dissipation figures in parentheses, are:

    TO-92:
    BC547B (0.1A 0.1W)
    BC337 (0.8A 0.6W)
    BC635/7/9 (1A 1W)
    2N3904 (0.2A 0.6W)
    2N4401 (0.6A 0.6W)
    SS8050 (1.5A 1W)
    Metal can:
    2N2222 (0.6A 0.5W)
    2N2219 (1A 0.8W)
    TO-126:
    BD135/7/9 (1.5A 1.2W).

    This circuit has a few weaknesses:

    1. Current regulation is not well controlled, and LED brightness may vary with ambient temperature and with heating of the transistors in the circuit.

    2. Supporting a wide battery voltage range, a wide LED current range, and a widely variable number of LED strings, leads to inefficiency and problems in worst case scenarios. Significant circuit changes would be needed to support a wider variety of applications. For example, QS transistors could be replaced with Darlington transistors (add a fifth 1N914) for high LED string currents and/or a large number of strings.

    3. The circuit relies on the sufficient current being available at the collector of each current sink transistor. If the battery voltage drops so low that the voltage at the collector of any QS transistor goes below about 1.2V, which will also happen if any LED chain fails open circuit, Q2 will try to provide a high current, and will overheat rapidly.

    I'm thinking about ways to avoid these problems without adding too much complexity. I may post an updated design.

    If this circuit is not useful to you, don't feel bad. Driving multiple LED strings with constant current is a common question and I will be able to point other users to this thread.
     

    Attached Files:

  12. kevbo423

    kevbo423

    36
    0
    Jan 22, 2013
    That schematic looks amazing. Although I think instead of using batteries I'll go with Steve's idea of using a laptop power supply. What would I need to change in the schematic to incorporate this?
     
  13. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
    If you have a regulated voltage, there is no need for transistors to regulate the current; you can just use a current limiting resistor in each string. The total LED string voltage will be fairly constant, and the power supply voltage is regulated, so the voltage that's left across the resistor will be fairly constant, so the LED current will be fairly constant.

    Use the formula in Steve's sticky article or from that online calculator you found.
     
  14. kevbo423

    kevbo423

    36
    0
    Jan 22, 2013
    Ok. So basically I'll have the power supply, the switch, and strings of LEDs with one resistor connected for each string. Does that sound correct?
     
  15. kevbo423

    kevbo423

    36
    0
    Jan 22, 2013
    So the schematic would look something like this?
     

    Attached Files:

    Last edited: Jan 23, 2013
  16. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
    Yes, that's dead right.
     
  17. kevbo423

    kevbo423

    36
    0
    Jan 22, 2013
    Awesome. So then to determine the resistor that I need, I just add up the forward voltages and currents then apply that to the Ohm's law equation?
     
  18. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
    Add up the forward voltages, subtract that from the power supply's output voltage. That tells you how much voltage will be dropped across the resistor. Then use Ohm's Law to calculate the current limiting resistance as R = V / I where R is the current limiting resistor value, V is the voltage across that resistor, and I is the desired LED chain current, in amps. In a series circuit, the current flowing through each element is the same, so you don't add the LED currents together.
     
  19. kevbo423

    kevbo423

    36
    0
    Jan 22, 2013
    Ok. Thank you so much for all of your help. In terms of mounting the circuit. What would you suggest. I've heard of people using perf board, but I'm not exactly sure what that is. Whatever I need to use, I need it at least to be 10" x 10"
     
  20. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,178
    2,690
    Jan 21, 2010
    The easiest way is to mount the LEDs first. You can use a board, drilled with holes in the patterns for the LEDs.

    Then insert the LEDs. It is best if you choose a drill size so that they are a firm press fit.

    I would start by adding (say) all the blue LEDs. Then, if I had (say) 5 blue LEDs in each string, and they were close enough together, I would bend the leads over and solder strings of 5 together, short lead to long lead. Clearly, some thought about this when you were inserting the LEDs would make this easier. If you have an odd number left over, you can make a shorter string (remember that the resistor value will be different)

    Then connect a resistor to the short lead on the end of the string and wire all these together (you'll need wire) and run that off to your negative connection. Use black wire for this if possible.

    Then connect a wire (red) to the long leads at the end of the strings and tie that back to the positive terminal.

    Repeat for other colours.

    You need to take care to avoid shorts. If the LEDs are far enough apart, this will be less of a problem. If they are closely spaced you may need to use insulated wire at points where wires cross.

    Alternatively you may decide to have strings with different colours in them (maybe it allows you to have less strings). If so, you need to plan how you're going to wire them, but the process is much the same (you just don't do it colour by colour any more).

    I would tend to suggest going colour by colour because depending on your LEDs, you may find that the colours appear to be of different brightness. If the colours are in strings by themselves, you can add a single resistor to reduce the current of all. If different colours are in the same string, it is much more difficult to adjust the current through just one colour.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-