@kat i can teach you with no payment involved, if you like
-F
@Felthry hell yes
@kat so first of all, which do you want: push the button to toggle between on and off, or hold down the button for light and release it for no light
-F
@Felthry uhhh the first one
@kat that one's a little more complicated but can make it work in one of two ways:
- normal tactile dome button (think those really cheap remote controls you get with cheap unbranded stuff from ebay/amazon), plus some active circuitry that will get moderately complicated
- slightly more expensive, but nicer-feeling, push-on-push-off toggle button with no additional components
I would suggest the latter, but it's up to you
-F
@Felthry either way works
@kat okay so here's a cheap little button you can use https://www.digikey.com/en/products/detail/nte-electronics-inc/54-125-2/11645665
Designed to be panel-mounted so you just need a hole of the appropriate dimensions and access to both sides of the panel to install it; if this is a problem there are ones that can be installed from one side only out there too
what you need to do is just wire up the button, the LED, the battery, and an appropriately-chosen resistor in series, it's as simple as that--just make sure the LED polarity is right
-F
@kat if you can tell me what LED you're planning to use i can help you figure out an appropriate resistor
-F
@Felthry okay we've skipped past the part i'm needing to learn where i don't know what parts to use or what order they go in or what the circuit looks like
@kat The thing about a series circuit is that the order the things go in doesn't matter. the circuit itself looks like this, though. are you familiar with what the symbols mean?
-F
@Felthry okay we're skipping past "which bits do you need to wire together" and into schematics and picking out specific resistor ratings, i might just be too stupid for this tbh
@kat sorry! you're not, i'm just really bad at knowing what things are and aren't common knowledge
-F
@kat you just need a wire from one side of the battery or batteries to one side of the switch, from the switch to a resistor, from the resistor to the LED, and from the LED back to the battery. the order of things does not matter, all that matters is that the LED is the right way around with respect to the battery (the long leg of the LED should be towards the positive side of the battery)
the resistance needed depends on what battery voltage and what LED you're using
-F
@Felthry okay rad, so literally just a battery, resistor, and a couple LEDs in series would be fine?
@kat again depends on the battery voltage! each LED you add in series will require another 2-4 volts depending on what color LED it is, so you'll need a higher voltage for more LEDs in series
-F
@kat you can put multiple LEDs in parallel without changing the voltage, but each LED will need its own resistor in this case, and you'll be pulling more current from the battery so if you want a lot of them you may need a beefy battery
-F
@Felthry okay that's clearing some stuff up, so if i want like 3 small white/orange LEDs, i'd want like
- in parallel, 1 resistor each, and a 2032 battery is fine
- in series, 1 resistor, and like... 2-3 stacked 2032 batteries i guess
longish, about batteries and LEDs
@kat orange LEDs are going to be more towards the 2 V end of the spectrum and white ones closer to 4 V (for physics reasons, the voltage needed increases as you move through the rainbow from red to violet, and white LEDs are usually blue or violet LEDs with a color-altering phosphor added)
Note that 2032s can't provide all that much current for very long; expect the battery to last maybe a day or so if powering one LED at 10 mA (a reasonable current for an LED, depending on how bright you want it to be, though you can get high-efficiency ones that are reasonably bright even at 1 or 2 mA)
A pair of AAs or AAAs could get you longer runtime if you can fit them into the thing. Or you could use the 5V out of one of those USB power banks and have it be rechargeable (just cram the power bank in there, i don't recommend dismantling it)
-F
longish, about batteries and LEDs
@Felthry so like if i want a little light capsule with a button on one end and a single bright LED on the other that i can insert into prints at the base, what battery is best for that
re: longish, about batteries and LEDs
@kat It depends on how big you can let the capsule be--if it's big enough two or three AAs that's what I'd go with, but if it needs to be smaller.... How bright are we talking? If you just want it to be visible, a button battery or two might be adequate, but if you want it to be usable like a flashlight, you'd probably need to go to a lithium cell and that gets complicated due to the need for protection circuitry
-F
re: longish, about batteries and LEDs
@Felthry i just want something i can put inside a transparent 3d print or something
i think it'll have to be smaller than a AA/AAA battery, i want to fit it into the base of a print
re: longish, about batteries and LEDs
@kat we have zero knowledge of 3d printing stuff, is "the base of a print" some specific size or does it vary between things?
-F
re: longish, about batteries and LEDs
@Felthry stuff like this
if i used AA/AAA batteries i'd have to make bases that are very wide/long, or have everything be like 2 inches off the table
re: longish, about batteries and LEDs
@kat those're going to need a fair bit of illumination... have you considered having them not be battery-powered? Wouldn't be too hard to plug them in with a wall wart, and then you wouldn't have to worry about fitting a battery in there
I think you could probably fit some AAAs in there, though, without making it too high? Just have one of these https://www.digikey.com/en/products/detail/keystone-electronics/2480/ or something similar in the bottom of the enclosure, exposed so you can change the batteries
The link is to a three-cell holder, but you can get four-cell ones too
-F
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
re: longish, about batteries and LEDs
@kat i'll admit battery-powered stuff isn't our specialty, and we've never done a design where size matters at all beyond "it costs more to get a bigger PCB made"
exactly how big are the things in the pictures? i'm imagining them like six inches across?
-F
re: longish, about batteries and LEDs
@Felthry do you know what a tea light is
re: longish, about batteries and LEDs
@kat yes, oh, you meant that's the size of the thing you want to make? okay hmm that makes things harder
at that scale.... well, if i was designing this myself, rather than trying to go with something simple to assemble that wouldn't really need a PCB, i would use a lithium-polymer battery and include some charging circuitry so it's rechargable with a micro-usb socket or something
sticking to simple things i think the cr2032 may be your only real option, have to see if that gives you bright enough light. will have to look for some high-efficiency LEDs, probably, designed for high brightness at low current, so that it lasts a reasonable length of time
are you planning for the battery to be replaceable in the final thing?
-F
re: longish, about batteries and LEDs
@kat yeah that's true, and you could probably fit some larger button batteries too, like a 2450 or 2477, both of which can handle a fair bit more current for a good while longer than a 2032
they're a little harder to get, though not that hard. Amazon has CR2477s from a reliable manufacturer (Panasonic) for $2.30-ish each; not cheap, but button cells never are
-F