Evening all. I have started playing with a Arduino Mega, and would like to use it in the following project. Need a bit of advice on the components.
The project has 30 objects, where each has 7 White 0603 CHIPLED leds connected in Parallel. Due to the nature and size of the application there was no space to fit a resistor before each led. VF 3.1 IF 10mA.
All works fine and each piece lights up when connected to 2 1.5v batteries.
The main idea would be to Dimm or flash each object at various intervals as determined by the Arduino. This could be done by a transistor closing the "switch" on the ground wire of each object. I recall seeing a diagram someware on playground, but cant find it at this stage.
On the forum they looked at a 2n222 transistor.
So my main question would be what transistor would I use on each of the 30 objects to drive the 7 leds on each object. The good thing is that they will mostly flash for a second or 2 when they are on, and not for long periods of time.Then what would my power source be to power all the leds.
If you can't fit a resistor in line with each LED then quite simply you can't do the project. It might appear to work at first but it will burn out.
That's just voodoo, its quite possible to drive LEDs like this if (a) you don't mind some variation in brightness and (b) the temperature is not varied much (Vforward depends on temperature). Go by the curves in the datasheet and measure things - here you seem to have been lucky and your battery setup leads to 10mA forward current (at room temperature). This is within spec, but be careful about the temperature dependence. You may notice significant variation as batteries discharge.
If you haven't tested the current with fresh batteries, you'll need to check that too. If worried a small resistance in series with the whole batch of LEDs would be wise, perhaps 10 ohm.
If you are going to stick with this setup you might find that adding a bipolar transistor leads to significant dimming due to the Vsat. If so a logic-level MOSFET switch will be needed.
MarkT:
This might just save my bacon. The challenge that i have is that I have made 9 of this objects, and casted them into resin forms. Now I still need to make the rest. Variation in brightness will actually be a bonus for me. Not sure what the temp would do as they are casted into solid resin. This might be a blessing is disguise. Currently they were tested on a 3v batteries as mentioned below, but I will need to run the setup off a power source, of some kind as the batteries would drain. I know the Arduino provides a 5v, but I am sure that I van find a 3v regulated power source.
Seeing that I am planning on constantly switching them on and off, I could add a larger delay in the application thus giving them more time to cool after each pulse of power. I presume the 2N222 transistor would still be suffiecent, to cycle the power to he leds.
Could this work, and then maby add resistors in the form of adding a 0603 resistor to a0603 led and then solder them in parallel to my objects.
What ever you do and what ever that twit says you do need a resistor in line with an LED. An 0603 resistor is fine but you can't run an LED without some form of current limiting device. Controlling the voltage is simply not good enough for something that you expect to carry on working.
Look at the posts we get here, they are full of people saying that there system suddenly stopped working for no reason. While this does happen occasionally most of the time it is because they have stressed there system or a component in it. I don't know what Mark does for a living but I am an electronic engineer with over 40 years experience in control electronics.
d then maby add resistors in the form of adding a 0603 resistor to a0603 led and then solder them in parallel to my objects
Not too sure what you mean by that it would be best if you drew a schematic and we could comment on it.
Mike,
As per my diagram you can see that I will plan to add a 15 ohm resistor in series after each led with all the rest of the objects that I will make, will have to order resistors though. Plan to join the one end of the led directly to the resistor, as both will be 0603 and then the 2 ends to the wire.
Then all the each led and resistor should be in Series, while connected in parallel to each other and the power source.
Then a 2N222 switching transistor between the the ground and the led/ resistor array, to complete the circuit when the arduino dictates. I take this should be technically correct now.
The problem is that I still have 9 objects that is wired without resistors, and there is no way of adding any except to the V+ and V- wires that comes out of the resin piece. I will try what MarkT said and hope that they will last. Will have to test this tonight else redo all.
The problem is that this is for an exhibition that will be displayed for a week. So I might have to get this right the first time.
What would the resistors be if I would run the V+ directly form the Arduino or a 5v supply, (There will be 22 objects, of 7 leds each, so I take the A should have to be calculated.
I have taken all aboard and I think that I will have to bite the bullet, do it right and start from scratch.
Seeing that I expect this to be working for a week on display.
First a big thank you for all your comments and Please review my proposed solution and help me before I end up messing it up again.
Diagram
SMD LED 0603 Details
2.85 Vf
5mA
SMD Resistors 0603 470R
Then the 2N222A. Would the following Do?
All that is then left is the resistor before the 2N222A.
Any advice on that size should be appreciated.
Each array should draws current of 35 mA from the source, there will be 22 so I would have to make sure that my 5 Vcc supply is capable of 800mA or 1A to be safe. I have changed to 5v as then I can power my Arduino and the leds off the same power source. Ie a phone charger or adapter with 5v and 1A
Thus I will end up with 22 objects, with the capability of enabling them for brief moments via the Arduino.
OK looking good, just a few things.
You have shown 5V and Vcc as the same thing. If this point is the regulated 5V through the arduino's regulator or from the USB port then you can't get enough current at this point. So the LED's anodes should be connected to an external regulated 5V or a higher voltage from a wall wart.
Next do you want to have only that amount of current through the LEDs, they can pull more current and get brighter than that. I would try one LED first to see if you don't want a smaller resistor.
Finally the 2N2222 has a minimum gain of 50 and maximum of 300. So you have to assume the minimum. That means if you have a total of 70mA you have to put 70 / 50 = 1.4mA. To get that current from a 5V output into a 0.75V base diode the resistor has to be 4.25 / 1.4 = 3K. If you up the LED current you have to reduce the resistor accordingly.
The thing is I am right, LEDs have a well defined response curve and can be paralleled with care, especially if from the same batch. I was responding to the specific situations described by the person asking for help, and trying to prevent unnecessary re-working of a circuit that was already working (if not ideal).
'Rules' are there to be broken with care, in particular there is no hard and fast requirement to place resistors in series with forward biased diodes - LED or otherwise - so long as you are careful to check and ensure max ratings aren't exceeded. LEDs basically obey the Shockley diode equation but with a different bandgap value, so the forward current is pretty sensitive to voltage and temperature, but its not infinitely sensitive.
When designing one-off circuits like this a little ingenuity and rule-breaking can be fine - if spec'ing a production run, things are different as component variation must be allowed for or you risk manufacturing lots of junk.
I went and tested the 9 objects that I already made.
Supplied 1 with a 3.3v supply direct from the Arduino, and added a 22Ohm resistor on the return to GND. This worked fine, and has been shining for close to 2 days now. The resin covering all must be keeping te temp down, will keep this on for the rest of the weekend to test if I could salvage them. They might be in line with the usage curve, time will tell.
However on the rest I will stay on the side of caution and add a resistor to each, managed to find a way to add one. Ordered more if I have to redo all.
So to keep things simple I plan to reduce the Vcc voltage for all the leds to 3v, ie smaller resistors 18ohm, keeping them around 9mA.
All that I am not 100% sure off is to calculate the switching transistor that I need for each. I read what Grumpy said, but am still a bit lost. I have to purchase all the bits today and want to get it right. How do I assure I use the correct 2N222 as there is a few.
Just to inform you that I have redone the LED arrays with a resistor in series. All working fine and above board. This is all then connected up to a 5v supply and a logic mosfet for the trigger switch which will be connected to pinouts on the arduino.
Is there a limit to the amount of mosfets that I can trigger/ control with the arduino?