Go Down

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

floresta

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

Because he didn't try it before posting.

Don

GoForSmoke


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


The transistor is there because you don't want to run the current to power the lamp in that example through the Arduino. The light bulb needs more power than the Arduino pin can take without burning up. The small current from the Arduino is used to control the transistor which acts as an electric valve, allowing more power from the external power supply to flow through the light bulb.
Please note that the transistor only allows as much current as the external supply can provide to flow through the bulb, up to 100%. By removing the transistor you still allow 100% of the external power to flow with only the potentiometer acting as control.
External power flows through the pot to the light bulb to ground and there is your light circuit. When the pot is not turned up full, as that is wired, some of the power flows straight to ground which really you can disconnect that leg of the pot from ground and your circuit will still work and btw, waste less electricity.
Use a meter to check resistance between any two legs on a pot as you turn the dial. You need to use all three when you want to read the value on a pin but that doesn't mean it's the only way a pot can be used. With only two legs connected, a pot is just a variable resistor.

Do I have to test it? Do I have to check that 1 + 1 = 2?
I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

noobtoarduino

Ok GoForSmoke, I think I understand the concept of the transistor limiting the power to the lamp so it doesn't burn out.  In my mind I'm thinking of a dam built to hold back water and only let some water dribble through a little at a time. 


floresta

Quote
The transistor is there because you don't want to run the current to power the lamp in that example through the Arduino.

You don't want it going through the potentiometer either.

Quote
... you can disconnect that leg of the pot from ground and your circuit will still work and btw, waste less electricity.

It will waste a lot less electricity after the potentiometer (which is now connected as a rheostat) burns out - and it will burn out the first time you run the wiper up to the top.

Quote
Do I have to test it?

No, but you should warn others that it is untested and not guaranteed.  Anyone can post anything here, just look at the playground.  The problem is that the others read the stuff and think that it is correct.

Don

GoForSmoke

It depends on the pot, lamp and current supplied. I didn't think to check.
Perhaps that's because I have run low voltage DC light bulbs through pots before without burning anything up.

Perhaps no one should say use a resistor without specifying the wattage rating either. Come to think, I've never smoked a resistor before either but I know it can be done.

I've run examples from the playground and somehow they've worked. I'm just lucky to pick the right ones, I guess.
That includes using a led as a sensor and capacitive sensing though in the bare wire single-pin cap sense one I do understand there's a chance to have static go right into the sense pin.

What playground examples do you object to? There's some lessons to be learned here for sure!
Maybe a dumb klutz like me should get a Ruggeduino and a couple years in electronics tech.

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Go Up