I am new to both Arduino and EE, and am currently working on a multi-faceted project. One of my needs is producing a lot of light in a small space, and so two 5050 SMD LEDs seem to fit the bill. They can be controlled from a single pin since they will operate in unison.
The LEDs have a forward voltage of 3.2 - 3.4V and are 20mA (60mA total per SMD).
I am looking at powering the LEDs either with 5v from my Arduino or from the 7.4v power source available to my project. I've created breadboards for both options [JPEG is attached], and am looking for feedback from wiser members of the community on both approaches. So, please, take a look and let me know if you see any problems with my work.
Hello, can you explain again how you calculate that 60mA figure?
Your circuit on the left will probably not work. 5V is not enough to light the two leds in series. Can you explain how you chose that series resistor ?
Your circuit on the right looks ok at first glance. You may be able to wire the two leds in series because 7.5V might be just enough.
Hi Paul, thank you for your feedbacK! The 60mA comes from the datasheet. The 5050 LEDs have three LEDs, each one using 20mA.
For the left hand circuit I made a mistake, and calculated with 7.4v instead of 5. Using the correct voltage (and your advice about not running the LEDs in series), I have come up with this new circuit.
Thanks Paul. I was under the false impression that I could get around the 40mA current limitation by sourcing from the VCC, and sinking with the pin.
Having a difficult time finding the datasheet. I ordered them in bulk on ebay here. They were sold as PLCC-6 3 Chip Blue. This datasheet looks like it might be the correct one, but the mA rating is a little different from what the ebay seller said, so it might not be the correct one.
BlackLab:
Thanks Paul. I was under the false impression that I could get around the 40mA current limitation by sourcing from the VCC, and sinking with the pin.
Whatever caused you to imagine that? What other limitation did you propose?
CMOS is essentially symmetrical - in general, the same specifications apply to both positive and negative sides of the circuit. So this is a serious question - just what source of "information" led you to believe otherwise?
Beginner's ignorance, or possibly outright ignorance. I read this thread before creating my post, and one of the members perfectly explained the limitation. So, there is no excuse.
If the "Absolute maximum rating" specification is 40 mA, then it follows that you design for no more than 30 mA which is for example, just sufficient to control the backlight on a common 1602 LCD display. But there are strong hints in the design examples; all the specifications for output voltages are referenced to 20 mA.
The absolute maximum rating for voltage is a trifle closer; it is 6 V and working voltage is specified up to 5.5 V. This is because you expect to be using a properly regulated supply which simply will not deviate beyond.
I think wiring the two leds in parallel, using the npn transistor and the 7.4V supply might be your best plan.
Wiring them in series would mean a forward voltage of around 6.6V for the two. The transistor might drop as much as 0.7V. That would only leave 0.1V to be dropped by the series resistor, which is too little for it to work effectively and protect the leds. And when the cell's voltage drops a little, the leds might switch off, forcing you to recharge them when they still have plenty to give.
Wiring the leds in parallel could be done with 5V supply and the transistor, but would put an unnecessary load on the Arduino's regulator.
For wiring in parallel, assuming the transistor drops 0.7V, the series resistors should be (7.4 - 3.3 - 0.7) / 0.060 = 57R
That is is exactly. Truthfully I have learned from this thread, which is why I am here.
PaulRB:
For wiring in parallel, assuming the transistor drops 0.7V, the series resistors should be (7.4 - 3.3 - 0.7) / 0.060 = 57R
It never occurred to me to calculate the voltage drop of the resistor [oops I meant to say transistor - sorry] when I did the math, so thank you for that. Can I ask how you determine what the drop is? Is it a standard value for the 3904, or based on the source voltage?
0.7V is a typical voltage drop for most ordinary npn transistors.
Wait a moment... i misread your post. You are asking about the voltage drop of the resistor not the transistor. I didn't expect that! I have no idea how you have been choosing the value your series resistors without understanding how to calculate this.
Resistors follow Ohm's law. The voltage drop accross them is proportional to the current flowing through them. Leds and transistors do not follow Ohm's law. They were not invented when Mr Ohm was alive. Their voltage drop is more-or-less the same for any current in the range they are normally expected to work with.
So you need to subtract those fixed voltage drops off the supply voltage. Whatever is left will be dropped by the resistor. To calculate the resistor for value to allow a desired current to flow, use Ohm's law R = V / I.
PaulRB:
0.7V is a typical voltage drop for most ordinary npn transistors.
Wait a moment... i misread your post. You are asking about the voltage drop of the resistor not the transistor. I didn't expect that! I have no idea how you have been choosing the value your series resistors without understanding how to calculate this.
Resistors follow Ohm's law. The voltage drop accross them is proportional to the current flowing through them. Leds and transistors do not follow Ohm's law. They were not invented when Mr Ohm was alive. Their voltage drop is more-or-less the same for any current in the range they are normally expected to work with.
So you need to subtract those fixed voltage drops off the supply voltage. Whatever is left will be dropped by the resistor. To calculate the resistor for value to allow a desired current to flow, use Ohm's law R = V / I.
I apologize, but that was a typo in my post. I did intend to ask about the voltage drop along the transistor. My mistake entirely.
Calculating the voltage drop of transistors is not something I had come across in my reading, and when you mentioned it I looked at a few datasheets and couldn't find anything. That's why it peaked my interest.
BlackLab:
I looked at a few datasheets and couldn't find anything.
If you look at page 2 of the 2n3904 data sheet, I think its the figure called VBE(sat), although that's not what I expected it to be called. Perhaps a real transistor expert will chip in and explain something we can both learn from.
PaulRB:
If you look at page 2 of the 2n3904 data sheet, I think its the figure called VBE(sat), although that's not what I expected it to be called. Perhaps a real transistor expert will chip in and explain something we can both learn from.
VCE(sat) Collector-to-emitter saturation voltage.
Note the conditions - the base current is one tenth the collector current - the gain is only ten for saturation. As someone else here commonly explains, this is because in saturation, VCE is actually less than VBE as you see comparing those two figures.
Ok, thanks. A base current of one tenth of the collector current is possible for the OP's circuit. The emitter current is only around 120mA and a base current could be 12mA from Arduino pin. Does this mean the voltage drop Vce will only be 0.2V? If so, is that the best solution? The OP's circuit has enough headroom for a higher Vce, so could a lower base current be appropriate?
Using the 0.2 voltage drop, Ohm's law suggests a 65 Ohm resistor. I have 68, so have used those in my circuit. The LEDs are bright and I am comforted knowing that I am not placing a strain on the Arduino pins.
A big thanks to you gentlemen for your guidance with this circuit.