Maker Pro
Maker Pro

Do i need resistors?

mollekake

Jun 30, 2014
37
Joined
Jun 30, 2014
Messages
37
Hello.
I want to hook up my rgb led to an attiny85. The attiny runs on 3v, so, do i need resistors for my led?
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Hello.
I want to hook up my rgb led to an attiny85. The attiny runs on 3v, so, do i need resistors for my led?
Are you using a neoPixel?
If not, it's always a good idea to use a resistor.
Additionally, you may not be able to light the Blue led with only 3V, so you may actually need a transistor, a higher voltage supply and a couple resistors.
 

Anon_LG

Jun 24, 2014
453
Joined
Jun 24, 2014
Messages
453
No, the attiny85 only provides enough current to light the LED, not enough to blow the LED.
 

mollekake

Jun 30, 2014
37
Joined
Jun 30, 2014
Messages
37
Yeah ok that's what i thought. But a side note, i saw somewhere that you could hook up only the anode of the rgb led with a resistor to 5v, but everywhere else they hook up each color pin with a resistor. Which is correct? I don't think i fully understand how a common anode led works
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
What LED are you using. It's just you might not have enough voltage to run the Green and Blue LEDs as Jerid mentioned. The Red will need a resistor not because it may be damaged but it will be a lot brighter than the others and may swamp the other colours.
Adam
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
You most likely need a higher supply (5V) and transistors and resistors.

A 3V micro is not going to be able to supply 20mA to a green or blue LED.

Bob
 

mollekake

Jun 30, 2014
37
Joined
Jun 30, 2014
Messages
37
Guess i'll have to boost it to a 5v :S Got any good suggestion on space saving but still getting 5v to the chip? 3 3v cell batteries through a regulator a good or bad idea?
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Guess i'll have to boost it to a 5v :S Got any good suggestion on space saving but still getting 5v to the chip? 3 3v cell batteries through a regulator a good or bad idea?
There are always multiple ways of doing things. That would work fine. Note that the regulator will waste some power and reduce overall battery life.
What are you attempting to build?
You could use a single 9V battery, or 4 x 1.5V batteries like AAAs or AAs.
 

mollekake

Jun 30, 2014
37
Joined
Jun 30, 2014
Messages
37
What other way would you suggest? I just want to make a small device that switches color at a push of a button (probably a interupt) driven by a attiny85
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Well.. because your LED is common Anode... the Attiny will be sinking current. (Active Low)
This would keep the current draw down on the Attiny because it won't be 'powering' the LED.
Perhaps there is a trick you can employ.

My thought is using a zener diode as a voltage regulator.. because I am assuming current draw in the Attiny will remain incredibly small if you will be sinking current rather than sourcing it. I am also assuming that the state of the pins could not simply jump from a high to a low output.. you would need to set the pin to a high impedance mode to turn off the LED.
I would feel a lot better if someone who has tried this gives some feedback.
 
Top