@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
@Felthry so a 2032 battery can't even power two LEDs??
@kat not in series no, but you can power two in parallel if you give them each their own resistor
-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
@Felthry hell yes