I'm working on repairing an installation at my local children's museum. The project is a volcano installation -- kids press a button and a speaker inside the volcano rumbles and LED strips embedded in the volcano glow in a way that simulates lava flowing.
So, I have a few addressable LED strips (WS2812B, 5V), a DFPlayer, a speaker, an Arduino UNO, and a MeanWell 5V power supply that connects to an outlet. See my rough sketch below -- emphasis on rough but hopefully my follow-ups on this thread will have more fleshed-out diagrams.
I have MANY questions as I'm starting out:
Should I try to wire the LEDs in series or in parallel? If I were to do them in series, I'd have to run them back up the length of the volcano and I don't know if doing that comes with a trade-off
Capacitors? Resistors? I probably need both of those. What components do I need, what am I missing? (And generally, how do you know what you need?)
Any other advice for setting up this circuit, or helpful materials people have found for managing a circuit like this?
My experience: It's been about a decade since I last worked with Arduino and circuits in general. It's coming back but I'm a little rusty. I am pretty confident in my coding abilities and I've been able to make some pretty displays by just playing around with a single LED strip and my UNO.
if you have addressable leds, connecting them into a strip will let you drive any led just with its position in the strip and from just one pin. If you keep them independent, you would need a pin per led...
so I would say go for one or a few strips (if they have different purpose or if you have strips that have the exact same behavior - like duplicating the lava flow on the side of the volcano, are they different ? )
Then when it comes to wiring, powering, resistor or capacitor the answer is in the adafruit-neopixel-uberguide
PS:
I would discourage you to go through a breadboard, esp. if you have lots of leds and require multiple amps to drive all that. use a perfboard and solder your wires.
Update! Thank you everyone for the help, I feel like I got some great nudges in the right direction. I feel like I'm drinking from a fire hose, but this is also so fun!
I've made a lot of changes, mostly because my LED parameters changed. So, now I am working with 5 continuous meters of a 160 LED/m WS2812B strip -- so 800 LEDs total! To handle that many moving parts I am switching to a different processor (ESP32). I also had to upgrade my power supply, to a 5V 15A power supply. Because of the way I want the lava to "flow", I'll have about 300-400 LEDs lit up at any given time, so I feel OK with that amount of amperage. From my understanding it wouldn't be able to handle all 800 LEDs at white and max brightness but... I'm not doing that.
I'm attaching my Cirkit diagram. How does it look? What am I missing?
@J-M-L I am now using one continuous strip, so using only one data pin now. I'm testing on the breadboard for now but I'll be soldering on a perfboard for the install. Thank you for the uberguide, that's been a lifesaver.
@jim-p Since I'm switching to a different (smaller) processor, I can't use the barrel jack anymore. Does it work if I just connect the arduino to a common rail on the breadboard/perfboard, where my 5V power supply goes? And thanks for the tip on Wagos!
You will need to have power feeds at intervals along the strip.
You would be best to have a pair of power wires running parallel to the strip, connecting into it at intervals.
This will even out the current through the strip.
Does it work if I just connect the arduino to a common rail on the breadboard/perfboard, where my 5V power supply goes?
If it's an ESP32 as you show it will be OK.
I just made this diagram for another forum topic where they are doing something similar, it uses a D1 mini. They said if worked perfect. Notice that the unused inputs on the 125 are connected to ground or 5V and unused OEs go to 5V
It is much better to wire the diagonal corners. That way, it will work no matter how you rotate it during installation. One less thing to worry about/debug.
Thanks everyone! I appreciate the help. Looking into fuses actually pointed me to an ESP32 WLED Controller, and I'll be using that along with a DFPlayer in "standalone" mode.
Since Arduino is no longer involved in the circuit at all, I'm going to post further troubleshooting questions on other forums, but I'll come back and post about the final results if people are interested in following that.
Out of curiosity, what kinds of microcontrollers do people use for big projects like this? When do you use Arduinos/ when do you go to other types of microcontrollers? The number of LEDs I'll be controlling quickly overtook the amount of memory on my Uno. Maybe that's the point where one would buy something in the Arduino Mega family?
@LarryD I swear I know LEDs are directional... I just didn't look at this Cirkit component close enough :P The new controlle includes a capacitor, a resistor, and a fuse in it, so that takes some of the human error away.
@TomGeorge Amazing, will do. The user manual for my particular strip recommends power injection every 5M (which is the length of my strip) so I assumed I didn't need to. But there is a convenient place 3M down the length of the strip to feed power, so I might as well use that. Is there a rule of thumb that you use when determining how frequently you feed power into your strips?
@jim-p Sweet - this is so similar to what I have, this is helpful!
@blh64 Noted - I am going to be using a pre-packaged button that just has two wires going out of it. But's that's a great thing to practice, thanks.
If you power from the center you really have only 2/3m length on both sides so if that’s a possibility, don’t hesitate - it’s never good to get close to the hard max limits of any component.
(Also that when they say every 5m that might mean that if you have 5m you already need it at both end so that power only « travels » 2.5m esp. with high density strips)
Power requirement is dependent on the LED count more than distance. Not too long ago, the tightest-packed WS2812B had 144LED/M down to 30LED/M, and the recommendation was to inject power every 1M to 3M (dependent on LED density). Your WS2812B have 160LED/M to 180LED/M, so maybe look at 1M power injection if fading is a problem.
What is right without measuring? I set up my longest WS2812B run, then note where the color WHITE (255, 255, 255) fades to a slight orange. I inject power where the fade is noticeable, and my problem is solved. Your experience might be different. I like those COB LEDs that you got.
The 800 LED strip will take 0.024 seconds during the process invoked by the library's
strip.show(); // send out new values
update. During that time, interrupts will be turned off, so regular time-keeping and program sequencing informed by millis() won't work the way you might want it to.
During testing, even if you use a shorter strip, always claim in your code the true intended deployment number; the software does not know you lie.
In this way the impact of the eternity which is 24 milliseconds (!) and the suspension of interrupts will be observable.
But another issue is the RAM required to hold the pixel data.
800 * 3 =2400 bytes, not gonna fly on the UNO.
That is if you literally want to be able to make every pixel control abel.
If you are creating an animation or f/x where strips of, say, 80 each do the exzct same thing (10 in all (800 real,pixels)), then you can feed the same output control signal to all 10 strips.
Hi folks -- I just wanted to follow up here now that this project is done. This forum post has been super helpful and pointed me in the right direction(s) for all of these components. Many thanks to everyone who pitched in! I did end up using an Arduino after all -- in addition to the ESP32 WLED Controller.
@xfpd and @J-M-L Thanks for the help/clarification regarding power injections. I ended up splitting the strip since my WLED controller had 4 outputs, so I then had three 1-2m strips. I didn't observe a problem with fading. @xfpd , that's a great suggestion for measuring where the fade happens, I will be using that in the future!
Thanks @alto777 for the thoughts re: UNO, memory, and ways I might program more efficiently. The WLED controller was the way to go for this project but good to know how I might use the UNO for future LED projects.
Other takeaways that hopefully someone else can learn from:
Do NOT buy off-brand DFPlayers. Only buy the DFPlayerMini sold by DFRobot
Same with MicroSD cards. Shell out for the nice SanDisk kind, even if it's more storage than you need. Off-brand SD cards sometimes come with hidden partitions that DFPlayers don't like
The ESP32-powered WLED controller was necessary for this volume of LEDs. It has enough RAM to handle 800 LEDs (unlike the UNO), and it also comes with a 15A fuse. I still ended up needing an Arduino to handle sound and button controls.