hello everyone. I have questions about the schematic.
What resisters valves? if each pin output is five volts means three leds are still 20 mA or less mA. I am going to put 250 ohm each of leds. is it should be fine? should add more resister value for a red leds? or what.
Where can i put LDR? Can i hooked it up after the switch between to aTTiny 85 8 pins? or either way input 7 pins hooked up to LDR with ground and volt??
I hope you can see my schematic
answers these my questions and i will very appreciate very much thank you
ironheartbj18:
What resisters valves? if each pin output is five volts means three leds are still 20 mA or less mA. I am going to put 250 ohm each of leds. is it should be fine? should add more resister value for a red leds? or what.
That picture is too big for its information, need to scroll to see everything.
If you put 3 LEDs in series then the current of 20 mA will not change.
But a LED needs some voltage to work properly.
If you put them in series, you need 3 times that voltage.
So if your LED needs 1.5 volt to light up properly, you need 4.5 volts for 3.
Then you will have to pick a resistor that will have a drop of some 0.5 volts when the current for that LED is going through it.
Assumed the LED indeed is 20 mA (we don't know that for a fact), then you can calculate the needed resistance:
R = U/I; 0.5/0.02; R = 25 Ohms.
That translates to a standard value of 27 Ohms.
You need to find out at what current and what forward voltage your LEDs work.
Each color will probably have different values.
If you have LEDs that work on 1.7 Volts or more, you can't make them work optimal with just 5 volts, as 1.7 * 3 == 5.1 volts.
It depends what sort of LED. The voltage drop on a led depends on the type of junction in the led, and typically corresponds to the colour of the led.
A red led often has a voltage drop of 2 volts, which means you want the other 3 volts to be consumed by the resistor, which means you need a resistor of 150 ohms to create a voltage drop of 3 V when 20 mA is flowing through it.
But a blue led usually has a voltage drop of about 3 V. This means you only want to consume 2V in the resistor. If you want to put 20 mA through a blue led, you would want a 100 ohm resistor in series with it.
MAS3:
If you put them in series, you need 3 times that voltage.
So if your LED needs 1.5 volt to light up properly, you need 4.5 volts for 3.
Then you will have to pick a resistor that will have a drop of some 0.5 volts when the current for that LED is going through it.
If you have LEDs that work on 1.7 Volts or more, you can't make them work optimal with just 5 volts, as 1.7 * 3 == 5.1 volts.
that's great explained to me i applaud you and also others one. so if i have leds that work on 3 volts for each blue or green. Can I adding by transistor NPN to increase voltage. 3 forward voltage time three leds equal 9 volts. will it works?
It should.
But you need to consider that that transistor has a voltage drop too and you still need the resistor to limit the current through the LED, and another one to limit the base current for that transistor.
You will likely find you will need this kind of arrangement.
You 3 Red LEDs in series from 9V could work fine.
Green & Blue tho usually have Vf > 3.2V, so only 2 will light up from 9V.
Note that in CrossRoad's sketch shows resistors labeled R, but that that in this case doesn't mean they have the same value.
Those from Arduino to transistor would be the same value.
The ones that serve 2 LED's are for sure different from those that serve 1 LED,and it is likely that each LED type also has a different value.
How to calculate was explained already, if you need help with that you should tell us more about what transistors and exactly what LEDs you'll be using.
Hi , I am using RGB common anode. I am not sure which one i am using transistor or not. I am trying to figure it out to set up with the battery. I believe cheaper to replace new AA battery is 1.5 volt than 9 volts. Does 9 volts last longer than 1.5 volts? From i knowing three leds are more drain battery than a led. How often should i except to replace new battery. I need to know because i am working on the project with LDR during the night time the RGB works for us. during the day time LDR will turn it off leds to save the battery at same time turn on for microprocessor to communicate with LDR to wait for other night.
Actually 1.5V battery and 9V voltage battery would last same because they both would consume same power, remember the smaller the voltage the bigger current you will need. Of course it mostly depends on battery itself, different batteries have different capacity. I would prefer to use AC-DC adapter and to power these LED's from main if you are going to leave it for night or you could just use rechargeable batteries.
The battery voltage will determine how you connect things up.
If you have one 1.5V battery, you will a DC-DC converter to boost it high enough to allow the LEDs to turn on. Check the Vf of the LEDs, pretty sure you will find voltages like 2.5V for Red, and 3.3 or so for Green & Blue.
If you have 9V, you will either need to regulate it down to <=5.5V so you don't damage the '328P, or drive them separately with transistors.
RGBs cannot be set up in series either, if you want more to turn on together, you need to set them up in parallel.
I would probably using the AC to DC adapter with three led RGB with parallel circuits. one thing i don't like is wire to plug on the wall. I might changed my mind to use recharge battery with one RGB common anode trying to save the capacity. It will be showing of 40mA of leds. I have 3.7 vdc 3500 mAh recharageable lithium-ion battery. The datasheet for aTTiny85-20pu operating voltage is – 1.8 - 5.5V for ATtiny25V/45V/85V and – 2.7 - 5.5V for ATtiny25/45/85. I hope it would be last long.
Do you know how it would be last long?