Show older

re: longish, about batteries and LEDs 

@Felthry i kind of need something in the form factor of a tea light at most, four AAA batteries is a pretty giant square

iunno about hooking it up to a wall outlet, that seems a little overboard tbh

parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @Felthry if I may offer a suggestion?

look into lithium-polymer batteries and USB-standard charging boards for them. sparkfun is a great place to start. LEDs draw so little power that you'll basically never overload one.

battery: sparkfun.com/products/13851
charger: sparkfun.com/products/10217

it should be easy enough to tap off of the board's battery connection points to power your LED circuit.

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@LexYeen @kat didn't know they made those little charger boards, we've always made our own when needed
-F

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@Felthry @kat they're apparently good for prototyping work, given the popularity and variety available.

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@LexYeen @Felthry ah yeah i'm definitely not able to make my own charging circuitry but if there's a good cheap "buy this thing and wire it up like a regular battery and it makes it USB chargeable" that'd rule

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@LexYeen @Felthry i guess alternately i could just like... somehow wire these up to be USB powered, get a USB battery, a cheap USB hub, and just some little microUSB cables and deal with having a black box behind/under them

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @Felthry USB is a 5v standard, with amp limits based on the spec IIRC.

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@LexYeen @Felthry sooooo does that mean i can't power an LED with it or

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @LexYeen no that means there's more than enough power for an LED
-F

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@Felthry @LexYeen also wait, so hooking the LEDs up in parallel means i can have as many as i want on a single power supply as long as its voltage is higher than one LED needs, right

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @LexYeen as long as the voltage is higher, and the total current isn't too much for the power source

every USB power supply should be able to handle 100 mA by the standard, and most can do at least 500 mA. one typical LED needs somewhere around 20 mA for max brightness, so you can theoretically power 25 of them off of a 500 mA supply
-F

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@Felthry @LexYeen okay, so if i want i could just take a USB power bank i've got on my desk already, and like... just have a rechargeable battery

then i can just wire 3 LEDs in parallel, wire them to a USB plug, and plug a couple of those into the bank via a USB hub

and then when they stop lighting up i just recharge the bank

i'm assuming this wont work but i'm not sure where the problem is

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @LexYeen no that would work fine, as long as you put resistors in series with the LEDs

an LED without a resistor would just immediately fry
-F

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@Felthry @LexYeen so like is it always just the same resistor before the LED if i'm hooking it up to a USB power line, or do they need different resistors if they're in series/parallel or if there's different numbers of them?

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @LexYeen same resistor regardless of number of LEDs, the resistor sets the current through the LED
-F

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@Felthry @LexYeen okay rad, do i need a different resistor depending on the LED itself? or are they like... standard

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @LexYeen yeah it depends on the LED and the power supply voltage and the current you want to drive the LED at. The power supply voltage is fixed at 5 V if you're using a USB thingy, but the other two are your choices
-F

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@Felthry @LexYeen so like... how wildly do LEDs vary? will i still need a bunch of different resistors even if they're all just drawing from USB

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @LexYeen if they're all different LEDs and not a bunch of the same part number, then yes, but if you only need like, five of the same type, they'd all use the same one

if you can give more info on what LEDs you want, i can give specific examples
-F

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@Felthry @LexYeen i don't... really know what to shop for haha

is every individual type of LED just going to need a different resistor or is there any sort of standardization at all

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @LexYeen this isn't really something where standardization is even possible

the formula is ((power supply voltage) - (LED forward voltage)) / (desired current)

-F

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@Felthry @LexYeen there's no standardization for LED voltage at all?? like not even a common one?

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @LexYeen the voltage isn't just something the person making the LED decides, it's constrained by physical limitations that depend on a number of interrelated things like the color of the LED, the exact semiconductor used, dopant concentrations, temperature of the LED (temperature is only significant in high-power illumination LEDs though)

so like i said, standardization isn't really *possible*
-F

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@Felthry @LexYeen so you need a different resistor for every single LED? how do you even calculate it if it's impossible to know

how does anyone manufacture anything

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @LexYeen you read the LED datasheet, it tells you what the forward voltage is
-F

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@Felthry @LexYeen so like... is it really just impossible to look up "2.5V LED" or something and find things that match

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @LexYeen no you can do that, but you'll probably only get red and orange ones, and maybe the old technology low-efficiency green, at that voltage
-F

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@Felthry @LexYeen okay, so i can just look them up by voltage and i don't need every possible resistor between 2 and 5V, cool

that's what i was asking haha

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @LexYeen oh i didn't understand what you meant at all, sorry
-F

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@Felthry @LexYeen so how do you actually... calculate which resistor you need to lower 5V to like 2.8V or whatever

i'm also assuming i'm missing like ten other factors i need to know to keep my house from catching on fire here

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @LexYeen it's just (5-2.8)/(desired current); the datasheet will also tell you what brightness you'll get at different currents and what the rated maximum current is
-F

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@Felthry @LexYeen okay, so i picked out an example LED

3V would mean 2 over 20mA, the listed current

that gives me... 10 of something

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @LexYeen 2V/20mA = 100 Ω
-F

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@Felthry @LexYeen okay, so you multiply it by 10 at the end??? and then what is 100 Ω

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @LexYeen no, remember that 20 mA is 0.02 A
-F

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @LexYeen 2/0.02 = 100
-F

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @LexYeen and 100 Ω is the resistance of the resistor you'll need
-F

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@Felthry @LexYeen okay, so you convert mA to A, so it's a 2V difference divided by 0.02 A

so it's always voltage difference in volts over amperage in amps, and then the result is the Ω whatever of the resistor i need to order

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @LexYeen right

(Ω is the symbol for ohms, incidentally, if you needed the name)

also don't order resistors from ebay or something, get them from a proper supplier

not because you run the risk of getting bad ones or anything, you'll jus tbe massively overcharged. the average resistor costs about 1¢ if you buy in sufficient quantity, or maybe 10¢ if you just buy one, but if you get it on amazon you'll be paying something like $5 for five of them or something
-F

Follow

re: parts suggestion specifically about batteries re: longish, about batteries and LEDs 

@kat @LexYeen so like if you order anything else that i linked from digikey, get the resistors from them too (don't order just resistors though or you'll be paying 10 cents for a resistor and $7 for shipping the single resistor)
-F

Sign in to participate in the conversation
Awoo Space

Awoo.space is a Mastodon instance where members can rely on a team of moderators to help resolve conflict, and limits federation with other instances using a specific access list to minimize abuse.

While mature content is allowed here, we strongly believe in being able to choose to engage with content on your own terms, so please make sure to put mature and potentially sensitive content behind the CW feature with enough description that people know what it's about.

Before signing up, please read our community guidelines. While it's a very broad swath of topics it covers, please do your best! We believe that as long as you're putting forth genuine effort to limit harm you might cause – even if you haven't read the document – you'll be okay!