Search Amazon.com:
Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us $3,400 per month for bandwidth bills alone, and since we don't believe in shoving popup ads to our registered users, we try to make the money back through forum registrations.
  • Post
  • Reply
Blatzmobile
Nov 1, 2012


My son and I want to build our own stuff animal night light. We would like to have 3-4 different color LED lights (red, blue, green) that we could switch between. we would like to have on/off switch and 20 min timer off switch.

What materials do I need?

What is the best source for the materials?

What would the circuit diagram look like?

Adbot
ADBOT LOVES YOU

Inferior Third Season
Jan 15, 2005



You can find everything you need at Radio Shack.

You'll need LEDs, wire, batteries, a resistor, a switch with at least four positions (one for each LED color plus one for 'off'), and some sort of timing mechanism. You'll probably want to buy a little battery pack thing, too, which is basically just a convenient way to get wire terminals from AA or AAA batteries. Altogether, it will probably be about $10 or so.

The resistor you'll need will be determined by the voltage (the sum of the voltages of the batteries in your battery pack minus the voltage for the LED, which is probably about 2V) divided by the required current for the LED lights (probably about 25 mA). It's just Ohm's law solved for resistance, R=V/I. It's better to have a few extra Ohms than not enough here.

Then all you have to do is basically make three separate circuits, with only one being completed at a time by the switch (or none for the 'off' position). A breadboard can make this easier. I am guessing Radio Shack probably has some sort of wind-up timing mechanism like an egg timer that could physically disconnect when it runs out, which you could also introduce into the circuit.

But I'd start with just putting together a single LED on a breadboard with the batteries and resistor, and watch it light up when you connect the wire and turn off when you disconnect it. You'll get the point pretty quickly, and you'll know what to do with the switch and timer.

Genewiz
Nov 21, 2005
oh darling...

Inferior Third Season pretty much nailed it about buying from Radioshack. I made an LED bacteriophage attack for my graduation cap and got most of my supplies from Radioshack except the LEDs. Radioshack did not have very nice/bright LEDs. I got mine from superbrightleds.com . When picking an LED, keep in mind that they are directional; do you want a 360 LED (dispersed) or an angled on (directional)? There are also LEDs with build in timer, flashing capabilities, flashing different colors, etc. Take a look and be amazed at the choices you have. As for a resistor, I thought I needed one too but looking back at my "in-progress" pictures, I do not see one and I used a 9V battery.
Completed:


LEDs are 2000mililumens for reference

In progress, inside of the bacteria:


Edit: Online circuit editor and simulator you can play around with to see what you need: https://www.circuitlab.com

nightchild12
Jan 8, 2005
hi i'm sexy

Blatzmobile posted:

My son and I want to build our own stuff animal night light. We would like to have 3-4 different color LED lights (red, blue, green) that we could switch between. we would like to have on/off switch and 20 min timer off switch.

Inferior Third Season has it pretty covered. You can also ask in the Electronics Megathread, they are pretty helpful in there.

To restate Inferior Third Season's answer:

quote:

What materials do I need?
Hookup Wire
3 LEDs in different colors
1 Resistor per LED (of appropriate values)
Battery holder
Batteries
4-position switch
Some way of joining the parts electrically (soldering iron + solder, conductive glue, something else?)

quote:

What is the best source for the materials?
Radio Shack will work for this, or a whole bunch of websites.

quote:

What would the circuit diagram look like?
Something like this:
code:
[+V]---[Sw]---[resistor]---[LED]---[GND]
[+V]---[it]---[resistor]---[LED]---[GND]
[+V]---[ch]---[resistor]---[LED]---[GND]
It doesn't matter what order the LED and resistor are in. LEDs must be hooked up in the correct way (usually, the longer lead goes to the +V side and the flat side lead goes to the ground or negative side).
Resistor values can be calculated like this: resistance in Ohms = (+V - LED voltage) / (LED current in Amps). More resistance than you need probably won't hurt.

Also agree with Inferior Third Season that you should get a breadboard and go nuts hooking stuff up and seeing what happens.

Blatzmobile
Nov 1, 2012


Great, thanks everyone for pointing me in the right direction. I didn't know Radioshack still supplied the hobbyist, I thought they turned into a cellphone and video game emporium.

BirdbrainedPhoenix
Mar 18, 2010


nightchild12 posted:


Something like this:
code:
[+V]---[Sw]---[resistor]---[LED]---[GND]
[+V]---[it]---[resistor]---[LED]---[GND]
[+V]---[ch]---[resistor]---[LED]---[GND]

Couldn't you use 1 resistor for all the LEDs? Something like this:
code:
[+V]--[resistor]----[Switch position 1]---[LED 1]---[Gnd]
                 |--[Switch position 2]---[LED 2]---[Gnd]
                 |--[Switch position 3]---[LED 3]---[Gnd]
Am I missing something really obvious here? I'm just getting into electronics, so if I'm making faulty assumptions here, I'd really be interested in hearing about it, thanks.

nightchild12
Jan 8, 2005
hi i'm sexy

BirdbrainedPhoenix posted:

Couldn't you use 1 resistor for all the LEDs? Something like this:
code:
[+V]--[resistor]----[Switch position 1]---[LED 1]---[Gnd]
                 |--[Switch position 2]---[LED 2]---[Gnd]
                 |--[Switch position 3]---[LED 3]---[Gnd]
Am I missing something really obvious here? I'm just getting into electronics, so if I'm making faulty assumptions here, I'd really be interested in hearing about it, thanks.

You can, if your LEDs have similar enough ratings and your power source provides the right voltage and current. Differently colored LEDs usually have different voltage drops and current requirements / limits. You should work out the math for each LED and then see if you can use one value for them all. You would want to use the largest value resistor required, and it will probably make the LEDs with smaller resistor requirements dimmer than they would be.

You should also ask any questions you have in the Learning Electronics Megathread in DIY & Hobbies. They are quite knowledgeable in there, and willing to answer any questions you have.

Base Emitter
Apr 1, 2012

and collector.

A few random thoughts.

1. LEDs can be surprisingly bright in the dark, and when they're small ones the light can look pretty concentrated. You might think about putting the LEDs under some kind of translucent plastic diffusing thing so its not too bright for a nightlight.

2. For your batteries, you'll want a voltage high enough to power the highest voltage LED, but not too much higher, otherwise you're just wasting battery in the resistor. The highest voltage LED is probably blue, at a bit more than 3V, and the lowest red at 2.2V give or take. If you powering it with a couple of AA or AAA batteries, two cells might not be enough. 3 cells would be 4.5V and all you need. If you add a 4th cell, it's power will effectively be wasted.

3. Also on batteries, if this is a long term project, i.e. your bear will be glowing every night for a couple of years, you'll probably want to use rechargable batteries. The easiest would be removable NiCd or NiMH batteries, which run about 1.2V, so 3 of them will be 3.6V which is still enough to run a blue LED. You can get much more pro with your battery setup but its probably overkill.

4. If this is for a younger child obviously think about the safety of all these small parts. Use lead-free solder or non-solder assembly and try to seal the circuitry inside where it can't easily be reached.

5. If you use an RGB LED, you can turn on more than one of the LEDs at a time to mix colors. For example if you turn on red + green you'll get a yellowish color.

6. When you're ready for the timer part of the project you've got a bunch of options. The 555 timer chip is a basic old-school chip for making timing circuits and there's tons of circuits on the web. A more modern approach would be a programmable controller like an Arduino. Which might take up more space, be easier or harder depending on your preferences, complicate powering the thing, but definitely would bring a lot of flexibility. There's also an Arduino thread, I think it's in the hobbies section.

Shasta Orange Soda
Apr 24, 2007


Blatzmobile posted:

Great, thanks everyone for pointing me in the right direction. I didn't know Radioshack still supplied the hobbyist, I thought they turned into a cellphone and video game emporium.

I think some of the Radio Shacks took their electronics sections out. Even in the ones that still have them, expect to spend a good 5 times more than you would ordering off the Internet. In the case of LEDs, expect to spend more like 10-15 times extra for a product that's inferior in every way.

Adbot
ADBOT LOVES YOU

Eggplant Wizard
Jul 8, 2005


i loev catte


god I wish we had some kind of forum and thread for small electronics projects

and many like a stickied thread up in here with a link to said forum

  • Post
  • Reply