White LED resistors...

26 views
Skip to first unread message

jmk...@mta.ca

unread,
May 22, 2021, 8:17:33 AM5/22/21
to Halifax Makerspace

Hi all,

I am very new to LED wiring and I am really struggling to figure out picking the right resistor.

I want two cool white bright LEDs that can flash, and I was looking through the LEDs in the Makerspace and trying to calculate online what I would need but I am not sure.

I want it to hook up to a 9V power adapter too.

Can anyone help me out?

Thanks!

Jessica

Shawn Wilson

unread,
May 22, 2021, 8:33:36 AM5/22/21
to Halifax Makerspace
Hi Jessica,
Did you have the flashing circuitry done? If so, can you post a diagram or photo?

If not, what are your requirements re: the flashing?  Fast/slow/variable, alternating or in sync?  And assuming this is for an art project, what are your requirements for housing/concealing the circuitry?  Do you have space or are you working in tight quarters?

The reason I ask is you could do a minimalist 555 timer circuit or similar, but then all your components need to be exact if your flasher timing needs to be exact.  Or you could put an arduino on it, which some would say is overkill, but it's just a few bucks, it's quick, and it's adjustable.  If you have room for an arduino, I would personally go that route.  Arduino will also take 9V.

I have some white LEDs I could drop off to the space this weekend if you like.  I probably have an extra arduino around too, or you could borrow one from the space as our library program is on hold during Covid.

Best,
Shawn


--

---
You received this message because you are subscribed to the Google Groups "Halifax Makerspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to halifaxmakersp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/halifaxmakerspace/6a5130a3-349a-4d1b-b193-a5eb8a0c1413n%40googlegroups.com.

Adam Cox

unread,
May 22, 2021, 9:51:28 AM5/22/21
to halifaxm...@googlegroups.com
I typically try to find an online calculator for stuff like this. 
This calculator has a drop down for various led colours. The default 20ma current can be left as-is. It is pretty handy. 

I’ll throw in another flashing alternative from what Shawn already mentioned. If you just need a steady flashing and aren’t too particular on the specific timing there are leds that have a built-in flashing circuit and just need to be wired to power and a resistor. 
Cheers,
Adam

jmk...@mta.ca

unread,
May 22, 2021, 9:59:25 AM5/22/21
to Halifax Makerspace
Thanks guys,

I have an Arduino hook up that Bill put together for me after taking the workshop (maybe I was supposed to give that back, sorry!) that has a blue and red led that are programmed to flash like cop car lights, so I was just going to use that to work off of.

Basically I want a lightning flash affect, set off and various intervals. I am good on the programming and playing around with that, but for some reason these resistor calculations are not clicking with me.

There are lots of white LEDs in the space, but I didn't see any markings on them or labels, so I wasn't sure what to put in.

Can I just pay the space back for this Arduino I have? It's been sitting in my locker for over a year... that project didn't pan out and I kinda forgot about it.

Thanks guys

Jessica

Shawn Wilson

unread,
May 22, 2021, 11:10:34 AM5/22/21
to Halifax Makerspace
If you're just replacing the current limiting resistors on the setup Bill helped you with, what's on there now? Can you post a pic? I would guess you are dealing with 5V going to the LEDs rather than 9V, which will affect the needed resistor values.

Shawn Wilson

unread,
May 22, 2021, 11:13:20 AM5/22/21
to halifaxm...@googlegroups.com
Oh, if you have a Makerspace Arduino, from a class feel free to drop $5 in the piggy and I can replace it when needed.

jmk...@mta.ca

unread,
May 24, 2021, 4:34:27 PM5/24/21
to Halifax Makerspace

Photo 2021-05-24, 3 26 52 PM.jpg

here is what I have, I guess I don't need the 9v adapter I can just use the USB power source. (and I will put the $5 in the bank)

So I just need to replace and lights with cool white LEDs, but I can't figure out the resistors to use.

Thanks!

spie...@gmail.com

unread,
May 25, 2021, 8:23:32 AM5/25/21
to Halifax Makerspace
The board in your photo looks like a Teensy LC. While it receives 5V from the USB input, it can only tolerate 3.3V on its other pins, and at a maximum current of about 5mA. A cool white LED needs a minimum of 3.2V to turn on, and the Teensy pin can provide 3.3V. This means you have 0.1V headroom. You want to limit the current of 5mA (which is the max that a pin can provide) so we divide 0.1V/5mA or 100mV/5mA and get 20 ohms. So, a resistor on the order of 20 ohms should do the trick.

Hope that helps.

Peter.

Shawn Wilson

unread,
May 25, 2021, 8:48:28 AM5/25/21
to Halifax Makerspace

I'd assumed you were using one of our Unos. I am not sure that board you showed is ours.  So I wouldn't worry about paying for it. :)

morr...@gmail.com

unread,
May 25, 2021, 9:49:55 AM5/25/21
to Halifax Makerspace
Hi Jessica,
Yeah, that is all my stuff, not the Makespace's. That Teensy LC is overkill for what you are trying to do, but don't worry about that for now. I also wouldn't mind getting it back some day, but don't worry about that either. I have lots of other Arduino-like parts.

The output pins of the Teensy LC provide ~3.3 volts or zero, depending on whether your program tells the output to be HIGH or LOW.

LEDs need a certain amount of voltage across them to turn on. It depends on the colour of the LED. Blue/white need the most, and red the least. They all need less than 3.3 volts, so the Teensy digital output can light them up.

But, if you don't put a resistor in series, if you just hook up the resistor directly, the current that rushes out of the port will be more than the LED can handle, and it may get destroyed immediately. 

LEDs typically like about 0.025 amps, or 25 milliamps.

As Peter said, white LEDs need about 3 volts, and the output port of the Teensy LC should be pretty much 3.3 volts. That means if we connect a white LED and a resistor together and put 3.3 volts across them, 0.3 volts are left for the resistor.  And we want 25 milliamps flowing from to port through the LED, through the resistor to ground. Ohms law:

voltage = current x resistance

tells us the value for the resistor.

0.3 volts = 0.025 amps x resistance in ohms
resistance = 0.3 / 0.025 = 12 ohms.

The resistor you have in series with the blue LED should already be about 12 ohms.  So pretty much what Peter said (20 ohms). 

However, here is empirical evidence: https://youtu.be/fm8CcSeUiPk that maybe you don't even need a resistor. 

Red LEDs need less voltage than white/blue. Green, yellow and orange are in between. 

The (ahem) proper thing to use to make a lightning effect, which only needs a few outputs, and not a ton of processing power, might be the Adafruit Trinket https://www.adafruit.com/product/3500 

It is very small, but still as easy to work with as an Arduino.

The Makerspace has some microscopic ATTiny44 (I think) chips, but getting them to work would mean hacking together the circuit and having something to program it. Might be too much hassle.

morr...@gmail.com

unread,
May 25, 2021, 9:54:15 AM5/25/21
to Halifax Makerspace
TLDR: use the same resistor as you have for the blue LED.
Reply all
Reply to author
Forward
0 new messages