I am trying to think up a way to use an arduino to control many individual LEDs on a strip light I design. I want it to run through two pins at most. I came up with the idea of having an output line that runs through each LED individually branching off to the ground line and the mechanism to control each LED would be to have some sort of integrated circuit that can be set to a specific PWM so through my programming I could call out each LED individually.
I am assuming you can send multiple signals at one time through one pin, and that I would be restricted to higher work cycle PWM to have visibility. Maybe possibly using a capaciter at each LED circuit to keep it fully lit.
Please let me know if this makes any sense. I am brand new to this.
There are addressable LED strips such as WS2812 ("NeoPixels"). The WS2812 is serially addressed/controlled with one data line. There are some addressable strips that use 2 control lines, data and clock.
If you want higher power LEDs, the WS28xx driver chip or equivalents are available separately from the LEDs itself, so you can add MOSFETs per LED to handle the power.
I guess this comes back to the first question, what are the strips being used for !
Indoors, outdoors, daytime, nighttime…
LOL. As you have been told, your idea is so good that it got done.
So called smart LEDs come in a wide variety of mechanical styles; flexible strips, hard strips of 4 or 8 &c., rings of a few sizes and numbers of pixels, matrices like 4x4 and up and last but not least, individual LEDs with the controller build in, power ground data in and data out on the legs.
I thought the entire thing was silly, then I started seeing them used, now they are part of many things I do.
I've done some strictly amateur work on making it so that digitalWrite() and digitalRead() syntax can be used and the control routed to one neopixels strip (or daisy chain of individuals) can be substituted, freeing up N - 1 pins.
There is a least you need to know amount of knowledge that is, if you like, can be very little to know.
I use exactly three methods with neopixels: begin(), setPixelColor() and show(). Oh, and clear(), so four.
The libraries provide many other features. I like making my own features. If it weren't for the need to meticulously code for neopixel tricky protocol at the lowest level (way above my pay grade) I would not need to exploit a library at all.
Just for fun, I asked chatGPT to make a case for Neopixels:
The technology is well-documented and supported by a vibrant online community,…
I guess that's us all here and elsewhere!
Uh, no. chatGPT said it has no real time browsing capability when I asked it about these alleged "vibrant communities". Told me to do my own web searches but suggested Reddit and GitHub.
You can make them "from scratch" if you get special driver chips. Otherwise, it gets really complicated if you want PWM. It might require multiple chips for each LED color... It's not hard to use shift registers for on/off control of multiple LEDs without PWM/dimming.
I'm not sure how much you'd learn by building your own hardware... The complicated part is the SOFTWARE protocol. There's a LOT to learn there, if you really want to dig-in. You COULD write your own code or your own library from scratch without using a pre-existing library. But I'd only recommend that if you are already an experienced programmer. (I wouldn't try it!)
These chips/LEDs have PWM built-in. With RGB strips, you send 3 bytes to each LED/chip where each byte sets the brightness of one color. Once the data has been sent, the chip holds the same colors-brightness until new data is sent.
The way these things work serially, the data has to shift-through all of the LEDs... You CAN update just one LED in the strip but you have to re-send the data for all of them. Whereas with regular LEDs, you have to continuously send the PWM.
There's so much I have to learn. I'm realizing I was thinking about this in terms of power and circuits with no thought put to data being sent through. Tutorials seem to go from baby stuff of making an LED with a switch to expert mode programming and circuitry so it's hard to make sense of it. Thank you so much.