Hello,
newbie here.
I'm planning to wire up ~10m of WS2815 (12v) led strips (split in the middle to avoid power drops) controlled by an Arduino UNO or MEGA. I've read that the limited RAM of the UNO may be not enough to display complex patterns, which one should I get? I've also read that people use MOSFETs, but since most of the projects are with shorter strips I'm not sure how to proceed. Can someone help me with a schematic and part list?
I also have the same length of an old 5050 12v RGB strip laying around that I could use for the project. Will I be able to control it with the same Arduino and a copy of the circuit?
Thanks!
It sounds as if you are terribly confused!
12 V individually addressable strips are generally not individually addressable as each chip controls three actual LEDs in series (or else is grossly wasteful of power). You need to cite exactly what strips these are (Web link) so we know how many actual pixels you want to control.
You do not use MOSFETs to control individually addressable strips but you do need them (and they must be "logic-level" FETs such as the IRLR7843) to control each colour of a 5050 12v RGB strip using three PWM pins.
Well, thank you for helping me lean in the right direction.
I had initially chosen WS2815 12v strips (2 5m rolls with 60 leds/m) to avoid power drops, but I have no problem switching to WS2812B 5v ones if those would perform better. That would be a total of 600 individually addressable leds and 600 non-addressable ones from the 5050 strip.
Type of trip is just a choice. 12V is less current but does come at the price of having less "pixels" because as Paul say, every pixel is 3 leds.
But do you want addressable? Or do you want the whole strip in a single color?
But whatever you pick, it's still a lot of current. Even with a 12V strip, with 10m we talk about a maximum of 12A. So for the 12V I would inject power at least times (aka, every 2,5m) and still use 1,5mm2 (or more) parallel to the strip and connect both ends to the supply.
For 5V strip I would go to 2,5mm2 and make a loop per 5m. We're talking 36A(!!) max then.
I've took some measurements and came up this schematic. (The 12v power supply is 10A because that's what I have on hand)
Now, could I use only one Arduino (UNO or MEGA?) for both strips or will I need two?
@alemonti You ignored quite a lot of questions
For the 5V power injection, connect the end of the wire back to the power supply as well. Also, fuse it. It's a heck of a lot of power. Would recommend to fuse each section (aka, 2 here). Add a resistor (1k or something) in front of each first led to protect them when the power is off (for example, fuse blown).
And if the Arduino has enough memory really depends on what you want to display. 436 is to much for an Uno if you want complex animations. But if there is repetition, you might get away with it. Otherwise I would rather switch to an ESP8266 than a Mega.
I've checked this post of a similar design. Here it was suggested to not loop back into the power supply. Why? If the circuit doesn't benefit that much form it could I avoid having double the wires to route around. Also if I should do it I didn't completely understood how.
As in the linked post I've added an 1A fuse to protect the Arduino (I have a UNO laying around so for now I'm using that) and a resistor in line with the data wires. Also, as @septillion suggested I've (probably not correctly) added 1k resistors in front of the first leds and a fuse for each section.
From this article I've copied a schematic for the 5050 strips using MOSFETs and duplicated it to have two individual sections.
I've surely done something wrong so please review the schematic and let me know. I don't feel that sharing a common ground with two different voltages can be done. How could I overcome this while still being able to use only one Arduino? I could use two, one for each circuit, but then I think it could become a hassle syncing the lighting effects between the two strips.
Thank you again!
alemonti:
I've checked this post of a similar design. Here it was suggested to not loop back into the power supply. Why?
And that is correct. There is no advantage in looping back to the power supply if you are using adequately rated (at least 2.5 mm2) supply wire. Your general layout looks just fine, the 5 V power is injected mid-way into the chain of strips which minimises the overall length.
There is a concern - as I described - about having open loops in wiring, which is why I stress the need for the supply wire to be run along with the strips. The concern relates to the transmission of interference from one part of the circuit to another (or indeed from one circuit to another).
alemonti:
From this article I've copied a schematic for the 5050 strips using MOSFETs and duplicated it to have two individual sections.
I've surely done something wrong so please review the schematic and let me know.
Yep. You are missing the connection from the Arduino ground to the ground of your 12 V power supply. This introduces a slight concern as the power supplies are handing substantial current and if somehow there was an alternate path between the grounds from the two supplies (you do not want the negative of the supply connected to the mains ground), that current could cause trouble in the ground connection from the Arduino to the 5 V strips. perhaps that connection should be made with the heavier cable just in case.
OK, now you show 1k resistors between 5V and ground at each strip in your diagram. That should be capacitors!
Which FETs are you proposing to use? Need to be "logic-level".
I had added resistors as @septillion suggested, maybe it was a typo?
septillion:
Add a resistor (1k or something) in front of each first led to protect them when the power is off (for example, fuse blown).
I've updated the schematic with your suggestions, how does it look now?
For MOSFETs I found these alternatives: IRF520N, STP55NF06 or TIP120, what do you suggest? Also, do these get hot enough while running to require a heatsink?
Thank you again for your precious advice and time.
alemonti:
I've checked this post of a similar design. Here it was suggested to not loop back into the power supply. Why?
I don't know. There is no other disadvantage than it using more cable. Even if the wire is thick (>=2,5qmm), connecting it back to the supply will reduce the losses even more. I would really suggest to not do it in a single string. For that to have no problems I would say you need >= 6qmm, probably even 10qmm... Although, you seem to have reduced the number of LEDs
And you might intend to do it but the schematic does not show it: split everything directly at the supply, not mid way. Also, have the fuses as close as possible to the supply.
As in the linked post I've added an 1A fuse to protect the Arduino (I have a UNO laying around so for now I'm using that)
I would even reduce that value. And again, no wire sharing, fuse close to the PSU.
And if you want to power the Uno with 5V I would suggest wiring a USB cable to the supply and feed the Uno via USB. That way you know for sure you don't plug in your PC while having it connected that way and backfeed the PC. Not all PC's can appreciate that.
If you want to have the PC connected, just switch the USB for PSU to PC. But in order to have it work then, be sure to connect both data en GND between Arduino and ledstrip.
and a resistor in line with the data wires. Also, as @septillion suggested I've (probably not correctly) added 1k resistors in front of the first leds and a fuse for each section.
You are correct it's not correct I said, in line (aka, series) with the data line. Not between supply. And although it does not hurt to have it at the start of each strip, the only places that benefit from it are the first connections between section with seperate supply. Aka, between Arduino and strip and between the strips where you switch between power supply wire (and thus fuse). The leds tend to not like having voltage on the data wire without supply voltage. Which can happen is you only plug in the Arduino or when a fuse is blown. Resistor protects against that.
The strip probably already has a 100nF cap next to each pixel. Although adding a 100uF cap does not hurt, it's effect will be 0.
From this article I've copied a schematic for the 5050 strips using MOSFETs and duplicated it to have two individual sections.
Can't say anything about that because the MOSFETs are just blobs. If you draw them like MOSFETs it would be a lot clearer.
After a quick look at the website I really don't get his logic of current... So I would not pay to much attention to that. Also, do note the STP16NF06 is not a logic level MOSFET. So when driving it with logic levels like you do, it's limit is around 5A with already reduced efficiency. So I would look for a more suitable MOSFET.
And this is the point I notice I actually missed 4 pages.... That seems a bit to much for me. I will just post this and probably sign off from this topic. Especially because the discussion seems to have shifted to "dangerous current" territory. Sight....
alemonti:
I had added resistors as @septillion suggested, maybe it was a typo?I've updated the schematic with your suggestions, how does it look now?
No, no typo. septillion was advising you to add a series resistor at the "data in" terminal of each piece of strip, not just the first one connected to the Arduino. The usually recommended value is 330 or 470 Ohm. Putting a resistor across the power wires would do nothing, but a capacitor helps stabilise the voltage and suppress transients generated as the LEDs generate their internal PWM.
alemonti:
For MOSFETs I found these alternatives: IRF520N, STP55NF06 or TIP120, what do you suggest? Also, do these get hot enough while running to require a heatsink?
Tell, the IRF520 is not a logic level FET and a TIP120 is a Darlington transistor which requires a heatsink at 1 Amp or more. Looking up the STP55NF06, it is not a logic-level FET either.
That is why I specified a IRLR7843, or a AOD4184A or even a IRL540. The logic-level FETs will control many Amps without a heatsink.
septillion:
And you might intend to do it but the schematic does not show it: split everything directly at the supply, not mid way.
However you split it, the ground must always go with the data from one strip to the next.
septillion:
And if you want to power the Uno with 5V I would suggest wiring a USB cable to the supply and feed the Uno via USB. That way you know for sure you don't plug in your PC while having it connected that way and backfeed the PC. Not all PC's can appreciate that.
Well of course, it makes no sense whatsoever not to use the regulated 5 V power supply that is suitable for powering the LEDs, to also power the Arduino. And it is critical that the ground from the strips be securely connected to the ground on the Arduino.
Frankly, wiring a USB cable just to make the 5 V connection really makes the whole thing less reliable and durable, I think it is just a silly idea. If you must use a UNO rather than the more suitable Nano (which does not suffer from the problem you mention), then I think you simply need to remember the discipline of disconnecting the "5V" pin when you wish to connect to USB. And in fact, if you have a fuse in a fuseholder (how else would you do it?) in that 5 V line, then removing the fuse is the easy way.
One clear problem with the UNO which is primarily designed to mount "shields", is the means to connect to the sockets. Simply sticking wires in them is clearly unreliable. The proper way is to insert pin headers into the sockets, and solder to the pin headers. It is far more difficult to dislodge a whole multi-pin header than an individual wire.
septillion:
After a quick look at the website I really don't get his logic of current.
Well, that was after all, an "instructables" site and it is standard doctrine on these fora here that "instructables" falls somewhere between unreliable and grossly misleading.
I quoted the reference in #7 but cautiously avoided comment on it at the time.
I guess there is a lot of confusion between internet guides on how to wire up this things and choose components. And the fact that I'm not a native english speaker probably plays a role as well... Sorry about that. Once again a big thank you for the help you are giving me by answering my silly questions.
I've attached the (hopefully final) design.
Sorry, that diagram is wrong! septillion has been confusing you. The diagram in #8 was correct.
Why is it wrong?
Because the data connection - with the resistor - between the upper and lower runs of strips has been separated from the ground wire. They must run everywhere together.
While there is merit in running the supply wires (also Vcc and ground together) separately from the power supply, if you do that then the data wire from the connection to each of the strips must travel with the power wires from that strip back to the power supply where it then travels with the power wires from there to the other strip.
Which you can do, but it may conflict with the imperative to keep the data wire from any one part to another, as short as practical.
Using heavier power cable rather than multiple runs (i.e, 4 mm2 cable instead of two runs of 2 mm2 - it is simple addition) is likely to be more practical. You need proper connections, soldered or screw terminals.
Great thank you for explaining it well.
Now I should be able to start building (and learning ) from all your advice.
Thanks again!
Paul__B:
However you split it, the ground must always go with the data from one strip to the next.
You would need thick wire as well and basically create a loop back to the supply as well. Which will in turn load the second wire more. So you don't gain much. Just let the resistor take care of ground shifting and I would say you are fine.
Well of course, it makes no sense whatsoever not to use the regulated 5 V power supply that is suitable for powering the LEDs, to also power the Arduino. And it is critical that the ground from the strips be securely connected to the ground on the Arduino.
Yes, but not by using the Vcc / 5V pin of the Arduino. (Nor of course Vin). Indeed a Nano (or Pro Mini for that matter) does not suffer from this.
then I think you simply need to remember the discipline of disconnecting the "5V" pin when you wish to connect to USB. And in fact, if you have a fuse in a fuseholder (how else would you do it?) in that 5 V line, then removing the fuse is the easy way.
I rather make things fool proof. Although I probably remember it 99% of the time, I probably forget it it that "one time I quickly need to update it because I have a date and a terrible bug in the software". And I don't like that 1% risk for my computer.
One clear problem with the UNO which is primarily designed to mount "shields", is the means to connect to the sockets. Simply sticking wires in them is clearly unreliable. The proper way is to insert pin headers into the sockets, and solder to the pin headers. It is far more difficult to dislodge a whole multi-pin header than an individual wire.
Agreed. Alternative that would fix both issues and sticks to the same ATmega328 while being cheap would be to use a Nano with a screw terminal base.
Well, that was after all, an "instructables" site and it is standard doctrine on these fora here that "instructables" falls somewhere between unreliable and grossly misleading.
Haha, true
@alemonti But to conclude, I don't think the schematic is wrong. Although the added caps probably add little and I would not share cabes for powering the Arduino but run separate (they don't need to be thick).
That having said, I do read the schematic as that in a power section (after a single fuse) the power and data run parallel. Aka, from the 78 led strip the power wires run parralel to that strip to the end en from there go in parallel with the data to the next 50 led strip.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.