Novice project, help needed

Sheene76

Jan 22, 2017
3
Joined
Jan 22, 2017
Messages
3
Hi all, I've just signed up to this forum as I need your help. A very simple project, I need to mains power a single LED..
I've bought some LEDs & resistors, the LEDs are 20mA 2.8v-3.4v & 330 ohm.
I was originally going to power it with a 9v battery, but would now like to power it from the mains (UK 240v).
Any pointers would be hugely appreciated.
Many thanks
 

AnalogKid

Jun 10, 2015
3,045
Joined
Jun 10, 2015
Messages
3,045
From your question, it sounds like you don't have the experience needed to build *safely* a mains-powered power supply from scratch. So I recommend getting a generic USB charger/adapter with a 5 V output. Once you have a safe source of low voltage power, there are lots of things you can do with LEDs (and survive).

To start, read up on Ohm's Law. This is the most basic equation for all DC circuits. You can use it to calculate the correct resistor size for your LED type. The "right" way to drive a white LED is with a constant current source, but you can experiment with a constant voltage (5 V) source and resistors without damaging the LEDs.

Start with the datasheet for the LED, and get the for ward voltage (Vf) range for its standard current (probably 20 mA). Take the value in the center of the range and subtract it from 5. The remainder is the voltage that needs to be dropped by the current limiting resistor. Now that you have that voltage and the current, Ohm's Law gives you the resistance.

ak
 

Sheene76

Jan 22, 2017
3
Joined
Jan 22, 2017
Messages
3
Thanks for your quick reply, you are correct, the LEDs I have are 20mA the voltage range is 2.8v to 3.4v. I certainly wasn't looking to build my own power supply..that would be ridiculous. But was looking at an alternative to powering these LEDs with the 330 ohm resistors I have through the mains, be it USB or otherwise.
Thanks for your help
 
Top