Run a string of LEDs from the mains


Closed Thread
Results 1 to 31 of 31

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Thanks for the info. I know the diodes are rated at 50V but my thinking was that the LEDs are rated at 3V and the diodes would be in series with them. Thats why i asked this seemingly silly question. I will make sure to use diodes suitable for mains.

    It seems i give the impression that im willing to plug things into the mains without caring if it will explode or not. I do actually think about these things. I usually check here even if i know what im doing but i have a few doubts. I wont be plugging these LEDs right into the mains. I will start with lower voltages and step it up gradually. I wont be touching random parts of this circuit while its turned on. I have been working with mains voltages for many years and i know how painfull it can be. I will be as careful as i always am when dealing with high voltage

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Multiply this by 95 LED's and a lot more vicious...



    OK... let's be helpful... look at this and follow instructions...



    I absolutely trust this guy... here's a great tip from him on how to make your workplace smell nice...


  3. #3
    timmers's Avatar
    timmers Guest


    Did you find this post helpful? Yes | No

    Default

    Don't forget that with all these LEDs in series that if one blows or goes high impedance (and they do change with time and temperature) they will all go off. Just like christmas tree lights.

    Put say 10 of them in series and use a boost driver like the Sipex SP6691 or similar with current regulation.

    8 banks of 10 will work much better than 1 bank of 80.

    Quote Originally Posted by The Master View Post
    I have been working with mains voltages for many years and i know how painfull it can be. I will be as careful as i always am when dealing with high voltage
    Your'e gonna have to be more careful than that!

    Rectified mains is not forgiving at all. -Ask any qualified TV engineer.
    Mains thats passed through a bridge rectifier will cause the resultant -v output to be at a half mains potential, and not ground as you would expect / hope.

    Good luck.

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    It seems i give the impression that im willing to plug things into the mains without caring if it will explode or not. I do actually think about these things. I usually check here even if i know what im doing but i have a few doubts. I wont be plugging these LEDs right into the mains. I will start with lower voltages and step it up gradually. I wont be touching random parts of this circuit while its turned on. I have been working with mains voltages for many years and i know how painfull it can be. I will be as careful as i always am when dealing with high voltage
    We are just concerned about your safety..

    I will now sound like the old gezzer I am and say that I have been "playing" with high voltage/amps for I will bet more years than you have been alive.

    I see NO reason to risk your health and safety doing something like this. I would not try it. To many things that can and probably will go wrong. Yes it can be done, but why? Just to say you did it?

    Do like timmers suggested and run multiple strings from a lower voltage.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Thanks for the links. I just need 4KV now... :P

    I am considering running multiple smaller strings already but using 1 long string seems to be more efficient.

    Im planning a few projects that will involve having hundreds of LEDs lighting up together. These LEDs use 50mA which adds up to quite a lot and i would probably need multiple transformers to run them all. Running them from the mains would mean theres no need for any transformers so it would be a lot cheaper

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Just wondering.

    All of the LEDs on one string will be a "spot light", no control.
    I would think you would want to be able to control at least "banks". You could then have dimming, blinking or what ever... For an idea...
    http://www.picbasic.co.uk/forum/showthread.php?t=10200

    As for the current. The LEDs will last much longer at 0.03 or even a bit lower. Running at the max will shorten the life a lot.

    100 LEds at 0.03 is only 3 amps. A 10 amp transformer would take care of 300 LEDs. With some cushion
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    In this case there will just be 1 set of LEDs. Some of the other projects will need multiple chanels but there will be 80 per chanel (maybe double that depending on the project).

    So far ive always been planning for the LEDs to use 50mA to make sure i dont get a transformer thats too small. I know in practice that they use a little less.

    Now for a dumb sounding question. How do i run the LEDs at 30mA instead of 50mA. Im lead to believe that if i use, for example, 5 LEDs on 12V instead of 4 then obviously the voltage drops but the current is supposed to drop too.

  8. #8
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    falingtrea: If i use a transformer inside a device then would it make a difference? 240V would still be going into it so i would need to look at all that safety stuff anyway

  9. #9
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    falingtrea: If i use a transformer inside a device then would it make a difference? 240V would still be going into it so i would need to look at all that safety stuff anyway
    But the "safety stuff" would be isolated to one point.
    Dave
    Always wear safety glasses while programming.

  10. #10


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    falingtrea: If i use a transformer inside a device then would it make a difference? 240V would still be going into it so i would need to look at all that safety stuff anyway
    Which is why most companies buy an off the shelf power supply solution. The power supply company handles the safety issues. If a part already meets UL or IEC standards, you usually don't have to requalify the part when you submit your product that includes the pre-approved product.
    Tim Barr

  11. #11
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,139


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    How do i run the LEDs at 30mA instead of 50mA. Im lead to believe that if i use, for example, 5 LEDs on 12V instead of 4 then obviously the voltage drops but the current is supposed to drop too.
    1. How do you run at 50mA ? The same way at 30mA.

    2. What do you mean the voltage drops? Every LED needs a forward voltage of about 3.4 volts and the current should stay about 30mA. So if your source is 12 Volts then your resistor which should always considered there has to drop the rest of thevoltage that is 12-3.4=8.6 and its vaue would be 8.6/.03=286.6 ohms

    Now if you want in series more leds, thats OK. put up to 3, and 3 x 3.4 = 10.2 volts. The rest should be dropped on the resistor in series. You cannot omit the resistor and put another LED. Chances are that they will not light.

    Why? The answer is simple. Look at the characteristic curve of a diode (or LED, its the same). It conducts the forward voltage at a very specific point and increasing the voltage slightly, the current increases dramaticaly. I said that on my previous post but you did not give it attention.

    Look at the attached photo.

    Ioannis
    Attached Images Attached Images  
    Last edited by Ioannis; - 30th September 2009 at 19:26.

  12. #12
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    Now for a dumb sounding question. How do i run the LEDs at 30mA instead of 50mA. Im lead to believe that if i use, for example, 5 LEDs on 12V instead of 4 then obviously the voltage drops but the current is supposed to drop too.
    No dumb questions

    Some of the confusion might go back to folks calling the resistor a current limiting device. It is and is not...

    In this case look at it as a voltage limiter. But being volts and amps kinda go together...

    Look at the math Ioannis gave you.
    1. Have a 4x1N4004 or 4007 diodes as a rectifier, or even better a bridge rectifier (4 pins) for 500Volts/2-5Amps.

    2. On the AC line, fuse and a small resistor for the in-rush currents, say 2-5 ohms.

    3. After rectification a capacitor of 220uF/500 Volts.

    4. Calculate maximum voltage as 250 Vac x 1,41=353 Volts DC on te capacitor.

    5. Calculate the total drop of LEDs say 332.5 Volts. Calculate the number of LEDs 332.5/3,5= 95 LEDs.

    6. Calculate the resistor to be in series as (353 - 332.5)/.03 = 680 Ohms

    7. Calculate the power of the resistor .03 x .03 x 680= 620mW. I would go x4 to set it at 2,5Watts
    6. Calculate the resistor to be in series as (353 - 332.5)/.03 = 680 Ohms
    Change .03 to .05 and the result is 410~ Ohms.

    So lets say you are running 5 LEDs from 12 volts and each LED uses 3.5 volts and you want to run at 0.03 amps.
    Well guess what... 5 LEDs at that voltage adds up to 17.5 volts.
    4 LEDs? = 14 volts...
    Do not need to worry here. Could be a bit dim...

    3 LEDs? = 10.5 volts. Yup, now we have a problem. There is 1.5 volts to much.
    12 - 10.5 = 1.5
    1.5 / 0.03 = 50 Ohm resistor.
    1.5 / 0.05 = 30 Ohm resistor.
    Dave
    Always wear safety glasses while programming.

  13. #13
    timmers's Avatar
    timmers Guest


    Did you find this post helpful? Yes | No

    Default

    ... or use a constant current regulator.

    Leds in series with a current sense resistor at the bottom. Regulator will up the supply voltage until enough current flows through the resistor to generate the devices feedback voltage. As the Leds age they go dim because their resistance increases. No problem, regulator will up the voltage to compensate giving you a constant brightness.
    Connect the enable function to a PWM output, and hey presto PWM dimming!

  14. #14
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Ioannis: I am trying to take all of this in but i dont understand all of it.

    These LEDs do work fine if i put 4 in series on 12V (3V per LED). Thats the min value specified in the datasheet. They are pleanty bright enough at that.

    Sorry but i dont understand what that pic means.

    mackrackit: This confuses me a bit. you say theres no need to worry with 5 LEDs on 12V but they could be a bit dim. Are you saying theres no need for any resistor? I wouldnt normally use a resistor in this case anyway.

    I may have misunderstood but i think some previous posts said that 80 LEDs (3V each at 240V) would blow up because of the current. If i use a transformer that supplies 12V 6A then isnt this the same problem?

  15. #15


    Did you find this post helpful? Yes | No

    Default

    Well, if you are planning to sell these commercially at some point, you should look at UL (and whatever the EU version is, IEC maybe?) requirements. Conencting directly to the mains may be cheaper from an implemetation standpoint, but all the extra safety features that would be required to meet these standards would probably drive the cost back up. Also High voltage is anything above about 40VAC or 60VDC.
    Last edited by falingtrea; - 30th September 2009 at 18:52. Reason: spelling correction
    Tim Barr

Similar Threads

  1. How about String Variables?
    By mytekcontrols in forum PBP Wish List
    Replies: 40
    Last Post: - 20th January 2015, 12:53
  2. Embedded Strings in your Code Space
    By mytekcontrols in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 9th March 2008, 07:50
  3. Using LEDs as light sensors
    By skimask in forum Code Examples
    Replies: 3
    Last Post: - 30th December 2006, 22:19
  4. Visual Basic 6 & Access 2000
    By Demon in forum Off Topic
    Replies: 33
    Last Post: - 7th September 2006, 04:39
  5. controlling leds with the switches
    By ilteris in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 12th October 2005, 21:02

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts