In today's episode, we will see how we can power LEDs from the mains for the purposes of building an indicator light for my soldering iron. If video is your thing, feel free to watch me build this indicator below.
Sometimes when I work on projects, I forget to turn off my soldering iron and that is bad for several reasons.
First, the prolonged exposure to heat makes the tip oxidize faster and once it does, the tip no longer accepts solder as it should. Conditioning and fixing the tip once it is corroded is a lengthy process and requires adding solder paste, scraping, and reflowing the tip with solder multiple times so enough of a coating is created.
Another issue is the electricity wasted on heat. My soldering iron is rated at about 50W so having it on is like running several LED bulbs. Although that is not much, it is still wasted energy.
Last but not least, leaving a hot soldering iron unattended is a fire hazard. The stand does a great job at mitigating this since it keeps the tip elevated from the table, but still, something might come close enough to the tip and enough energy might be transferred so it catches fire.
Soldering iron construction
The soldering iron that I have is a really cheap one where I've added lights dimmer in series with it so I'm able to regulate the output power. In between soldering, I can lower the amount of power that goes into the soldering tip and this really prolongs the life of both the heating element and the tip of the iron as well.
However, because of that dimmer, I'm not really sure how this modification will work. The dimmer has its own switch that I use to turn on the soldering iron, but once turned on, the voltage after that switch is not always the same.
The dimmer cuts part of the mains sinewave thus reducing the power that gets to the soldering iron. I'm afraid that this reduced power might not be enough for the LED to be lit consistently or bright enough on lower power to serve the purpose that I need.
The only way that we can find that out is by opening the enclosure and testing a few different circuits to see how they will behave.
Opening up the soldering iron
Before opening any mains operated appliance, make sure that it is unplugged from the wall.
We can pop the lid off the dimmer box with a screwdriver and that will reveal the insides. The circuit is straightforward where one of the input wires goes directly through and the other one has the dimmer in series.
Since I only want the indicator LED to turn on with the soldering iron, I will need to tap into the wires after the dimmer. If I add the indicator circuit before it, then, the LED will turn on as soon as the iron is connected to the mains.
For testing purposes, I'll add two wires and we will connect the circuits on them before we make anything permanent.
Indicator LED power circuits
There are multiple ways how you can safely connect an LED to mains voltage as an indicator and for todays purposes I'll stick to the very basic one. There is an awesome video by Big Clive where he goes and shows all of the different circuits so I recommend that you go and watch it as well, but, only after reading this one till the end!
So the most basic way to connect an LED to the mains is through a resistor. However, some considerations need to be made before we actually connect it.
Let's start by assuming that we want about 10mA of current through the LED. In my case, the mains voltage is 220 to 230V but for ease of math, I'll go with 220V.
To get 10mA, following Ohm's law (V = IR), we can divide 220V by 0.01A and we get a resistance of 22k Ohm. However, we now need to see how much power that current will dissipate on the resistor to determine its required power rating.
This is calculated by multiplying the current, 0.01A in our case by the voltage that will be across the resistor. I want to use a red LED so it has a forward voltage of around 2 volts so its drop will be almost negligible and I will calculate as if the full 220V are applied through the resistor.
If we now multiply 0.01A by 220V, we get a power dissipation of about 2.2W which is huge for just running an LED so let's see how we can mitigate this.
Since the LED will only be used as an indicator, we can run it on a much smaller current than this. Let's see how our math will look like if we choose to run the LED on just 1mA. By dividing 220V with 0.001A we now get a value of 220K for the resistor.
The power dissipation now is 220V times 0.001A, that equals 0.22W and this is close to the power rating of a standard resistor of quarter of a watt.
Test the circuits with the dimmer
A key element in my use case is the presence of the dimmer in the circuit. This dimmer will very often run the circuit with less power so I wanted to see how different combination of resistors will affect the LED brightness and the power dissipation.
For my tests, I made 4 circuits on a breadboard that consists of a single red LED and one resistor where I used 270, 220, 180, and 150K Ohm resistors respectively.
More or less, all of the LEDs look OK and are fairly visible even with the lights on. There is a slight but visibly noticable difference in light intensity as expected where the LED with 270K Ohm is the dimmest and the one with the 150K is the brightest.
This difference is most noticeable when the dimmer is set on its lowest setting and not so much on the highest.
In the case of the 150K Ohm resistor, we can determine the current that the LED runs by dividing the voltage with the resistance. So by dividing 220V with 150000 Ohms we get a theoretical maximum current of about 1.5mA.
With this current the resistor will dissipate about 0.3W which is slightly over it's rating.
However, this is only the theoretical maximum since as I said earlier, there will be some voltage drop inside the dimmer and almost always I'm using the soldering iron on about 70 to 75%. In such case, the voltage will be at around 165V and that will give us a current of 1.1mA and a power rating of about 0.18W.
As a final test, I left the soldering iron running for about 15 minutes to properly heat up on maximum current with the 150 and 180K Ohm versions of the indicator LED attached to see what temperature will the resistor get to.
The soldering iron heat up to about 300 degrees Celsius while the resistors only got to slightly less than 40 degrees Celsius.
With all this, I'm OK to use the 150K Ohm resistor with the indicator even though I know that it is below the required rating. Keep in mind that I'm not saying that you should do the same as well. A much better-suited option is to go with the 220K or even with the 270K for a project that does not have a dimmer in the circuit.
Install the LED in the soldering iron
These projects and videos take up a lot of my free time so any help that I can get from you is more than welcomed. The least you can do is to hit that subscribe button and ring the bell so you get notified when I release new videos.
If you want to go a step further, I have a Patreon account where you can sign up for as low as $1 and receive some of the perks that I offer as well as some exclusive content that is only for my Patrons.
Head out to Patreon and once again, Thank you for your support.
I went ahead and installed the LED in the dimmer case and I directly soldered the resistor to it. I've used a piece of shrink tubing to protect all of the connection and I've then soldered the LED leads to the connecting wires across the soldering iron.
Once we put everything back together, we can give it one final test and declare this project as done.
The brightness of the LED is decent, even in the lowest setting on the dimmer and it will be a real indicator that the soldering iron is on.
Now lets see some exploding LEDs.
Connecting LEDs to the mains
Although not always spectacular, an LED connected to mains might and will explode at times. I'm wearing safety goggles while doing these experiments and I mostly know what I'm doing.
Do not try this at home unless you know exactly what you do and if you choose to still do it, its all on your own risk.
However, don't get your hopes high. Most of the modern LEDs are made to fail in a controlled matter so even if you burn through your entire supply of LEDs you might not get an explosion.
For me, the first three LEDs that I tried, red, green, and white failed in a controlled manner.
A very brief flash of light can be observed inside the LED followed by a black burn mark close to the anvil.
One LED that can for sure provide amusement is this flashing LED that has a driver chip inside and switches between red, green and blue chips inside.
When I connected this one, it went with a bang followed by tripping the circuit breaker in my house.
My guess is that it first melted the driver chip inside and this created enough space for the electricity to arc through and create plasma. This plasma then immediately created a lot of expanding gas that broke the LED enclosure.
Let me know down in the comments if you have a better explanation of what is really going on inside the LED during the explosion.
I hope that you had fun watching exploding LEDs and that you also managed to learn something new.
Be sure to hit the like or dislike button bellow, make sure to subscribe, ring the bell and keep making things.
Thank you for reading and I'll see you in the next one.
Tools and materials needed for the project:
- Soldering iron - https://s.click.aliexpress.com/e/_A12obJ
- Red LEDs - https://s.click.aliexpress.com/e/_AaHtDr
- Assorted resistors - https://s.click.aliexpress.com/e/_AdviSH
- Shrink tubing - https://s.click.aliexpress.com/e/_AtC7eh
- Wire snips - https://s.click.aliexpress.com/e/_AnkpeZ