Go Down

Topic: Super basic question on how to connect LED to a breadboard. Please help! (Read 3 times) previous topic - next topic

GoForSmoke

Your lamp circuit -- http://itp.nyu.edu/physcomp/Tutorials/HighCurrentLoads
You see 3.2? You can ditch the Arduino and transistor amd the wires that connect to them.
External power goes to power and ground directly since it's the -only- power left.
The yellow wire on the lamp goes to the middle leg of the pot and the green wire goes to ground.
Turn the pot adjusts the lamp.
The Arduino is for when you want to add intelligence to adjusting your lamp. That's where 'magic' comes in.

What you need to be able to do with these circuits is follow the flow of power to ground for every part. If you can't do that then you need to learn more. It's critical.

For your ultra-bright led you would need to protect the led from getting too much power even when the pot is turned all the way up and split the power and ground into 3 each to connect. How much resistor in the power line (1 for each line) depends on your external power supply. 
A 3V to 3.3V regulated power supply that can provide 600-650 mA wouldn't need any resistors since it would never provide enough current to burn the led out and still make the thing a lot brighter than you'd want to stare at. Uh-huh, you don't -have- to run the led to max and it will have a longer life if you don't.
Mount the led on a metal lamp shade for a heat sink and there's your room lamp.

If it was me, I'd just go with a bunch of regular bright or ultrabright (as opposed to insanely bright) 5mm leds that don't need heat sinks wired in parallel for light. I could wire a cheap chip socket with power on the legs of one side and ground on the legs of the other if I could be sure that power would be just enough volts to not burn my leds up. Then I'd plug the leds into the socket, long leg on the power side, short on ground. If a led does die, it'd be no big deal to pull it out and stick another one in as they wouldn't be soldered in place.
It's more likely I'd be using 5V power and need a resistor on each leg of one side (I choose the power side) or at least the legs that will get leds stuck in (probably every 2 or 3). That would be better anyway since I could set up more than 1 socket and use different resistors on each to plug different color leds in each socket. Oh yah, different color leds need different voltages. Red needs the least, then orange, yellow, green, and blue. White leds need the most.
There's an actual bit of health/psychologic benefit to having a certain mix of colors but look that up. We are made to have blue sky and a lot of yellow in sunlight, ever noticed how gray skies or too much indoor lights influence people? And just FYI, house plants need only red and blue about 4:1 depending on the season, but sunlight for them is still best.

--------------------

It's mostly about the circuits that I pointed out that Radio Shack kit, but to tell the truth it is a way to wire circuits faster.

OTOH you can buy a lot of small parts through allelectronics.com for $30 even with the $7 shipping... but still the pieces add up. It's very easy to spend over $50 there. VERY easy. I've got a lot of small plastic bags from there and though they aren't filled with certain substances, the electronic parts in them have an addiction all their own!

I like the starter kit here: http://arduino-direct.com/sunshop/index.php?l=product_detail&p=109
But last time I tried, the size and/or weight pushed the cost of shipping way up!
At the same shop they have nice assortment packs that don't add badly to the Hong Kong shipping.

There are other online shops with good assortments tailored for starting out with Arduino, so definitely look around and always, always figure the shipping in.

Don't forget that one way or another you will need a soldering station (iron, holder, solder, flux, sponge/cloth) and good ventilation (flux and lead in them fumes) and a multimeter at some point not far along.

The Radio Shack kit has 1 or 2 values of a number of resistors and a hand full of other parts that is enough to do a -lot- of things but you won't be making anything even semi-permanent with it. Still ot's possible to close the box with project wires in place, but you might want to take the batteries out when you shelf the thing. Having a meter as well would be a real big plus. I can't say how fast but you'll grow out of the thing and still at times miss how easy those springs are for hooking up simple rigs while at the same time not missing the limited parts selection.
I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Flame Soulis

To answer a bit about PWM from an earlier post, it stands for Pulse Width Modulation. It's a pretty simple concept: it's where a signal (the pulse) has a set period of time (the width) for which it is active before being shut off (modulation). This event occurs rapidly to create multiple 'pulses.'

In how it would help with fading an LED, each 'pulse' is a signal equal to a certain voltage (in the case of an Arduino, 5 volts). If we are at half the maximum PWM, meaning per instance of a pulse, half the time the pulse is on, and half the time it is not, the LED would light up half as much as it would normally. If we set it to the maximum, then the pulse signal is 'solid' and the LED will illuminate all the way. So we we use the Arduino to cycle back and forth from the lowest to the highest point for the PWM signal, we can make the LED fade.

That's just an extreme nutshell explanation. 90% of the forum could explain it a lot better and in greater detail, but that should at least provide a basic explanation.

-Flame
Arduino Mega (ATMega1280) & ATTiny85 user

noobtoarduino

GoForSmoke,

THANK YOU for the very helpful explanation.  I now see the 'flow' of electricity that you refer to.  You're like a Jedi master teaching me the ways of the Force. 

I see you got rid of the Arduino and transistor...then that leads me to ask, what did I need the transistor for originally?

I know you would go the superbright LED route instead of "insanely bright: route.  For my purposes, I just want to light up my dreary 9 foot by 8 foot room with a regular/warm white light.  Do you think an array of superbright LEDs are bright enough to light up a room?

And YES, the cost of these little electronic things add up fast.  I think I might forego the Ebay kit and buy that beginner's kit you linked to since it's closer to what I'll be working with, and not a Mickey Mouse version of the real thing. 

noobtoarduino

Flame,

I appreciate the time you took to explain that to me. I successfully used PWM on some LEDs to fade them.  Although I got it to work, I'm still honestly trying to wrap my head around the concept.  I think it will slowly sink in over time.  :)

floresta

Quote
Your lamp circuit -- http://itp.nyu.edu/physcomp/Tutorials/HighCurrentLoads
You see 3.2? You can ditch the Arduino and transistor amd the wires that connect to them.
External power goes to power and ground directly since it's the -only- power left.
The yellow wire on the lamp goes to the middle leg of the pot and the green wire goes to ground.
Turn the pot adjusts the lamp.

Have you actually tried this?

Don

Go Up