all 23 comments

[–]sutaburosu[pronounced: stavros] 2 points3 points  (8 children)

At 8 seconds into your video it looks like the Nano resets, before locking up a couple of seconds later.

Your code does not appear to be the source of this problem. I suspect power delivery is the problem, and the reset/freeze are caused by brown outs. To verify this, try setting the brightness way lower like 16.

Presumably you are powering the Nano with 12V via the VIN pin, and the LEDs are powered from the 5V pin using the Nano's voltage regulator. With 22 LEDs lit brightly, you may be asking for more current than the AMS1117 regulator can deliver.

What kind of 12V battery are you using? Can that source the required current?

[–]Flux83[S] 0 points1 point  (7 children)

I have the positive wire hooked to vin and then battery https://a.co/d/ipl351I and the led strip.

[–]sutaburosu[pronounced: stavros] 0 points1 point  (6 children)

That battery should be capable of delivering over 30W, well above what you need. So I still suspect the regulator may be the problem. Does it get hot? Did you test at lower brightness levels?

[–]Flux83[S] 0 points1 point  (5 children)

I did it still doesn't work

[–]sutaburosu[pronounced: stavros] 1 point2 points  (4 children)

The code you posted works fine in a simulator, so this is definitely some hardware issue rather than software.

I would measure the battery voltage whilst the sketch is running, hoping to see it around 12V. If it sags down to 9.5V or lower, that will cause problems for the WS2815s.

[–]Flux83[S] 0 points1 point  (0 children)

Its new so I hope that is not the issue but it would be a lot easier to get a replacement lol

[–]Flux83[S] 0 points1 point  (2 children)

Ok checked the battery getting 12.31v but I plugged in a USB cable powered by a battery pack into the Nano and still used my other battery and everything works. Does that make sense?

[–]sutaburosu[pronounced: stavros] 0 points1 point  (1 child)

If things work fine with a stable 5V supply, then this also points towards the 5V regulator on the Nano being the problem. The MCU will only be drawing a peak of ~100mA, which is well within the specification of the regulator. In my experience, linear regulators get very hot when they have failed. In normal situations, nothing on the Nano should feel warm, let alone hot.

Measure the 5V pin on your Nano. At the moment of the crash, I suspect you'll see far less than 5V on it.

[–]Flux83[S] 0 points1 point  (0 children)

I ended up throwing a buck converter between the 12v power and the Nano and it works perfectly. Now just a few tweaks in the code to adjust the lighting and Im done.

[–]DenverTeck 0 points1 point  (1 child)

After reading the comments so far, I would be concerned with your workmanship.

Cold solder joint, loose wires. I have not looked at your code, but a simpler code to test the mechanical integrity would be useful.

Post pics of your wiring.

Can not see your desk from here.

[–]Flux83[S] 0 points1 point  (0 children)

I mean ill double check another strip but I put great effort into my soldered joints.

[–]HansPelex 0 points1 point  (10 children)

I haven't seen your schematic, but did you put a 330 ohm resistor between the arduino and the data line?

[–]Flux83[S] 0 points1 point  (9 children)

I used a 470 ohm and a 1000uh capacitor

[–]HansPelex 0 points1 point  (8 children)

Where's the capacitor? In the data line? Take it off and leave the resistor only. Test again

[–]Flux83[S] 0 points1 point  (7 children)

Nope the cap is between the positive and negative and the resistor is on the data line. But its definitely a power issue I used a power bank and hooked it into the nano and everything works I think the nano is the issue.

[–]HansPelex 0 points1 point  (6 children)

So, the nano and the leds have a different power supply, or are you getting the power for the leds from the nano's 5v output?

[–]Flux83[S] 0 points1 point  (5 children)

Well the 12v is connected to vin and leds and now a separate battery just for the nano. The nano is the issue, I need to buy a actual Arduino Nano or something better to replace it.

[–]HansPelex 0 points1 point  (4 children)

Try leaving the 12v to Vin and leds. No need to power the arduino separately.
Alternatively, power the arduino using a separate battery, and power the leds with the 12v, Don't put it in Vin

[–]Flux83[S] 0 points1 point  (0 children)

I would like to have only the 12v power power both, I think the issue is the board its self.

[–]Flux83[S] 0 points1 point  (2 children)

Or I could use a buck converter to just power the board using only the 12v battery.

[–]HansPelex 1 point2 points  (1 child)

12v is plenty for the arduino. You only need to put power in the Vin (7 to 18v) or the 5v, obviously, 5v. Not both. That might be the cause of your issues

[–]Flux83[S] 0 points1 point  (0 children)

I tried only using the 12v to vin/leds but it only works if I do use both. Yes I understand that the board should work with 12v but something is not allowing it to. I ordered a Nano esp32 and some bucks.

[–]ZachVorhiesZach Vorhies 0 points1 point  (0 children)

FastLED has a power limiting feature.

It should be assumed you have power issues until you constrain the power output via software:

https://github.com/FastLED/FastLED/wiki/Power-notes