DIY Mains LED Panel

DIY Mains LED Panel

CAUTION! This project works with mains voltage! This can be lethal, so do not attempt unless you are familiar with the necessary safety precautions and understand the risk!

To help with taking higher quality pictures, I thought I should improve my lighting in my workspace so I decided to see how hard it would be to make some LED lights that get power from ordinary mains voltage.

I want to start with saying that I would not leave these plugged in or unsupervised as they lack many safety features. I put this together for use in taking photos, so they are only plugged in while supervised, and for that they serve their purpose just fine. If you are interested in putting together a light of your own that can be used for ordinary lighting, it would be best to implement some basic safety features, which we will go over later in this post.

Build Process and Design

The design for this circuit is quite simple, it is made up of a rectifier, a smoothing capacitor, and a load (the LEDs). To make things a bit better and safer, we add current limiting resistors to save our LEDs, an inrush current limitor to prevent blown breakers, and a capacitor discharging resistor to prevent any unexpected shocks after removing power from the device. Alright, so the general design is out of the way, how should you determine what values to use or how many LEDs you need? Let's start with the LEDs and what we know about basic white LEDs.

White LEDs have a voltage drop of 3-3.7 volts, generally take from 5-150mA, and produce about the equivalent of an ordinary light bulb with every 10 watts of power put in. So to get a decently bright light we want to make an array of LEDs that can handle 10 watts. How much current can the LEDs you use handle? Mine are rated for 150mA so I should use about 10/0.15= ~66 of them, but my board only fit 44, so I did that. It's more to see how well it would work anyways.

In addition to considering total number needed, you'll need to consider how you will arrange them. If you arrange them such that the voltage drop is near your source voltage (~170VDC for rectified 120VAC) your current limiting resistor will be held responsible for dropping a very small voltage, which means if the source voltage fluctuates, the current will fluctuate more. Take for example if your LEDs dropped 150 volts and your smoothing capacitor was able to limit ripple to about 3 volts, the voltage dropped by your current limiting resistor would fluctuate from 17-20 volts, this is considerable but not excessive. If your LEDs dropped 160 volts and your smoothing capacitor was the same, you would be dropping 7-10 volts, so you would have fluctuations of 30%, that is substantial. Because the load is primarily resistive, fluctuations in voltage across the resistor are proportional to fluctuation in current, which for an LED means fluctuation in brightness. More LEDs in series mean less power wasted in the resistor and less waste heat, but also means it will be more sensitive to ripple.

Alright, so we know a bit more about LEDs and the implications of how we decide to arrange them. What value should we use for the current limiting resistor? That depends. For the resistor, take a look at the datasheet for your LEDs, what current do you need through them and how much voltage is dropped by the array at that current? If you use 40 LEDs in series and need 100mA and they drop 3.5 volts each at 100mA then they will drop 40*3.5=140 volts. So we need our ~170VDC to be reduced to 100mA after dropping 140 volts on our lights, so we need to drop 170-140=30 volts across our resistor at 100mA. Time for a little math.

 Recall our formula V=IR 
 So we have 30=0.1*R
 R=30/0.1=300 Ohms

Not too bad, we've got most of our design done. Now we need to decide on a value for our capacitor. We first make sure it's voltage rating is good for at least 170VDC plus some room to accommodate brief surges, so say a minimum of 250 volts. Now what capacity to use? As much as I would like to be able to give you a formula for this, it is much easier to use a tool online alongside the information we gathered above.Come up with what ripple you are comfortable with personally, lets say 5% for the sake of simplicity (also the threshold for changes in brightness that can be perceived). If we go with our design with 40 LEDs, we have a voltage drop of 30 volts at our full 170VDC, and we want that to never drop beneath 30*0.95, that is 95% brightness. In order to do this, our smoothing capacitor needs to be able to prevent the voltage from dropping any more than 1.5 volts, to find out how to achieve this we will turn to an online tool. We have a starting voltage of 170VDC, a load of 100mA at that voltage, and a frequency of 120Hz when using a full bridge rectifier, so we need to be able to sustain a load of 100mA for 83 milliseconds. To get that current, I approximate our load as a 1700 Ohm resistor. But with these requirements, we would need a large 550μF capacitor, so you can either go with that or lower your current, number of LEDs, or increase your ripple tolerance.

See this example plugged in at Must Calculate it's a tool I have used for years now.
Now we have our components, just wire everything according the schematic and add your high value resistor across the capacitor terminals and the project is complete! To make mine a bit safer to handle, I designed and printed an enclosure and coated the exposed components in silicon modified conformal coating to prevent accidental shock. Happy building!

What components are needed:

  • LEDs, anywhere from ~30 up to 50 or so
  • Resistors, a couple in the 1kOhm range, and 1 in the 200kOhm range
  • Thermistor for inrush limiting (can use low value resistor ~10 ohm)
  • High voltage capacitor (I used a flash capacitor from a disposable camera)
  • 4 generic diodes or a full bridge rectifier, can use just 1 or 2 diodes as well
  • some wire
  • Perf board
  • Basic tools (iron, solder, wire cutter)
Battery Recycling

Battery Recycling

If you have batteries or battery packs that you are unsure how to dispose of, I am currently accepting drop offs! I am taking old batteries, testing and disassembling them, then discarding unusable cells and components to local centers for recycling. I am only able to accept drop offs or pick up in the Dallas area currently, but if you need assistance feel free to reach out and I can help.

What will I dispose of for you?

  • Phone and laptop batteries
  • Automotive batteries
  • Used solar light batteries
  • Individual cells from RC devices
  • Dead packs from electric devices (power tools, hover boards, roombas)
  • Any other worn out or unusable batteries you have

Disposing of batteries can be a pain, but every bit we keep out of the trash helps the environment and supports a culture of reusing and recycling, so please reach out if you need help!

Recycle With Us!