Easiest way to slowly ramp LED strip?

I'm a 100% pure noob with both arduinos and electric wiring. Just want to get a general idea of how hard this is going to be and get a shopping list to get started.

I want to make an LED lit background panel for an aquarium. My only requirement is that the LEDs ramp up slowly in the morning and back down in the evening, with a brighter period in between. Color control or the ability to add that later would be nice but not at all required. A single LED strip along the top or bottom will do, I'll build a casing for it so light doesn't spill out the sides and put frosted cling film on the backside of the aquarium. It doesn't have to be particularly bright either.

Do I even need an arduino for this? If anyone knows of a product that can do this out of the box, I might go for it, but at the same time I like learning new things and am very willing to learn some basic programming for this. The idea is pretty simple, but I'm wondering if I'm getting into a weekend project or a 200 hour project.

A basic shopping list would be very much appreciated, so that when I have some spare time I can get started and learn as I go.

Thank you very much, and I apologize if I haven't done enough research. I spent about 2 hours looking into arduinos and honestly I'm not sure I'm on the right track for this project.

Probbly.

There have been lots of aquarium projects posted inthe past. Why not search the forum for some?

There are three in the links under this post.

Good to know that I'll probably need an arduino for this. Do you think this is going to be suitable for a first time project?

I did look at about 10 or 15 threads, and found some interesting stuff, but most people want something more complicated than I do. Also unfortunately a lot of threads only get a few replies. I did gather from context that if I want to have bright LEDs, I need an extra component? It doesn't have to be very bright at all.

If I just buy an LED strip with individually adressable LEDs, and an arduino uno, can I build this?

You can practice coding using Wokwi.com (an Arduino simulator). Select your devices, "wire" them together, write your code or use examples, press "play." If you need help, ask.

Here is a pageful of Arduino example sketches.
https://docs.arduino.cc/built-in-examples/

Thanks. That website looks super useful. I'll try it right now. Can you maybe just point me in the right direction ever so slightly? All I understand at the moment is that I will need an arduino with code on it, and an LED light strip. What goes in between the two? Does the power go: wall socket>arduino>light strip? Or does it go to the arduino and the light strip seperately?

Cool thing is, you do not need an account for Wokwi...

  1. Surf to wokwi.com
  2. Click the "Uno" board in the upper-left.
  3. Scroll down to "Start from scratch" and select the "Nano" board (or "Uno")
  4. At this point you are in "Minimal Sketch" which is the very least you can have to compile, upload and "run" a sketch.
  5. Click the green/white "play" button to compile and run the sketch. (you will see nothing happen, as the sketch has nothing in it).
  6. Here is where you can copy/paste from the Built-In examples (link above) or find your own sketch.
  7. To add devices, click the blue "+" button
  8. The dropdown will let you select any device on the dropdown to include in your circuit.
  9. To connect the Nano/Uno to the device, click the correct the "pin" of the Nano/Uno... and then click to the correct pin on the device. You will see a "wire" drawn from pin to pin.

Again... always ask if you have questions.

Here's a toy to play with...

And here is a small sketch to get you going on WS2812...

Do you need/want to have the possibility of every LED being a different colour and intensity?

If yes, you need the Arduino, the strip and a power supply of sufficient capacity for the strip and some minimal extra for the Arduino.

If al the LEDs are always the same colour and intensity, then you nee d dumb strip and three channels of a simple driver circuit, for which modules can be found, and that power supply... of sufficient capacity for the strip and some minimal extra for the Arduino.

If accurate real time of day is important, you'll need to add a simple RTC "real time clock" module, these are fairly easy to use, inexpensive and there are a crap-ton of examples sketches.

Except for the power supply, all those can be put together in the wokwi and the software nearly 100 percent perfected.

Recommended highly, so that all the "fun" you will need to have in real life can be done focussing on wires and power supplies and so forth without the coplication of software thsat might confuse and obscure the source of your new headaches.

Sry, I have one of those right now (headache), I don't meant to sound pessimistic , this is a reasnable project and as said, there are many who have done this from whom to learn and steal borrow.

a7

Thanks. I'm going to follow your steps and see how far I can get. Will surely be back for questions haha, my knowledge right now is very limited. The most important thing for me right now is to know the components I need, so I can order them and hopefully have them delivered by this weekend so I can start building it saturday or sunday.

Sorry for being such a noob, I found it a little difficult to find what I need. When I search about ramping LEDs, sometimes I find things that can ramp in a matter of seconds but not very slowly, due to some electrical limitations or something. Or I find people trying to control several LED strips simultaneously. One guy wanted to use a light sensor to time the ramping up and down of the light. All these things are extra requirements that I don't need, and it really muddied the water for me. I just need one programmable light strip. I'm going to try your steps now and report back.

Sorry for not quoting properly before, I'm on my phone and I wasn't sure how.

Nope, just slow ramping up and down with a brighter period in between.

So does that mean any LED strip will do? Are they all dimmable? I don't know what a driver circuit or a module is, will look into it. The power supply, do I wire it to something that then powers the arduino and the light strip?

Yep that's important. Didn't think about that, thanks.

Gonna give it a try now.

WS-2812B LED strip (ranging from 30 LED's per meter, to 144), an Uno, a 330 ohm resistor and an appropriate 5V power supply is all you need.

Using the FastLED library, changing the intensity is as easy as setBrightness() at the appropriate times.

Very probably. Just post on this thread before you spend any money. :expressionless:

I don't suggest buying this, it's just a plausible module that showed up googling:

Very probably overkill, very probably able to handle most RGB strips. You'll still need a power supply (wait for it) of sufficient capacity for the strip, here the voltage needn't be the aource of power for the Ardiuno, so you can shop 5 or 12 or 24 volt strips for aesthetics or price.

a7

1 Like

This is great, you guys are teaching me much more applicable information with each post than I found in 2 hours searching by myself.

So I went ito wokwi. I decided to try to build this example:
https://docs.arduino.cc/built-in-examples/communication/Dimmer/

Seems like a good place to start. Is it going to be any different for a single LED vs a strip of LEDs?

The thing I'm running into now in this built in example, is that the required components don't list the white square thing with all the holes. I think it's a breadboard.
I see a black wire coming from a hole next to a hole that has the straight prod of the LED. A resistor comes from the hole next to the bent prod of the LED, skips 2 holes, enters the third and then a red wire comes from the hole next to that. Then it says this:

So the black wire is the ground, and that hole it goes into the arduino is where the ground wire goes? It's a hard to read on the image what it says on the arduino. What I remember from connecting ceiling lamps, there is a blue wire, a brown or black wire, and a green/yellow wire, which is the ground. That has three wires, this has only 2. Shouldn't there be a positive, a negative, and a ground?

No, but yes, because the LED strip will have three LEDs per "pixel" to give the "dimming" value you are learning with the single LED. Wokwi has "Neopixels" in rings, matrices or individual that will need "neopixel" commands.

If I understand correctly, Neopixel is the brand that produces the LED strips you recommend, and the commands I need to give it must be commands it understands, which can be different for another LED strip, and I can find the commands on the website you posted above? I might be way off with this understanding. By a "pixel", you mean a group of 3 LEDs that are receiving the command as a group? So let's say I have a strip with 90 LEDs, there are 30 "sections" that can dim independently? For now it's fine for me if all LEDs do the same thing simultaneously. Does buying an LED strip that can adress each LED individually make my current task more complicated?

Made by Adafruit.

You will use values ranging from 0 to 255 to change the intensity of red, green and blue LED inside each "pixel".

You are trying to play a piano before practicing... you will do fine when you get them... get some 1000uF electrolytic capacitors (for smoothing of the power/ground which will undergo changes when pixel values are changed) and some 470 ohm resistors (for current limiting of the data pin).

And... a power supply... the Neopixel strips have three LEDs per Pixel. Each R/G/B LED will need about 20mA current per LED, so that is 60mA per Pixel. Multiply 60 times the number of Pixels on the strip. If the strip has 100 pixels, the power supply will need to source EDIT: 600mA (0.6A) 6000mA (6A) [/edit] (sorry) // and about 20% more (600 * 1.2 = 720mA) for electrical safety.

This won't be a one-stop-shop. You will need to learn as you go.

I'll just throw this in: Don't let eagerness get the better of you.  Get individual pieces working on their own (neopixel, real time clock, power supply, etc.) then add them in one at a time 'til you get there.

# Rome wasn't built in a day.

True. It was built in Italy.

2 Likes

Alright guys. I spent a little more time watching a very basic 15 minute arduino intro on youtube, will watch a 1.5 hour one next. You guys have been super helpful so far. I was a little overwhelmed at first but I feel confident now that I should be able to do this as a noob in maybe a few weekends.

So I will order:

30 sounds fine to me. Does that have any implications for any other components? Will any LED strip that says WS-2812B be fine?

Can it be a nano? If so, will limit me in the future if I want to change the color spectrum gradually throughout the day?

How do I search for this? What kind of connectors does it need to have, just wires on one end and a plug for the wall on the other end?

Does a capacitor "eat" power that would otherwise turn to heat, so that when the lights are dimmed and less power is consumed by them, other parts don't burn?

I understand the calculation, thanks. Still a little confused about Neopixel strips. If I buy a strip that says WS-2812B, does that mean it's a Neopixel strip?

Also,

Here 5V is mentioned, do you also agree I need a 5V supply with mA according to your calculations? And what makes for the difference in the resistor ohms?

Also I'm wondering about this:

Wouldn't this just make things easier for me as then all I need is a LED strip, a power supply and some instructions?

Edit:
Oh and a real time clock. I found a DS3231 Real Time Clock Module I2C, looks like what I need.

So in short what I need:
Arduino uno
DS3231 clock module
WS-2812B (any number of LEDs)
5v power supply with mA dependant on amount of LEDs
some 1000uF electrolytic capacitors
some 470 ohm resistors

Edit 2:
And wiring of course. Any specific kind? And do I need a breadboard?

A capacitor dampens changing voltage levels like a shock absorber on an automobile.

The difference is that of "soda pop" and "Coca-Cola"

5V is a popular voltage for the WS2812/Neopixel.

Between 300 ohm and 500 ohm. It limits the current OUT of the Arduino and INTO the Neopixel (too much current will cause damage). 330 and 470 are common values (500 is not a common value).

Read the Adafruit Neopixel U:berguide.