Ok I have two projects in mind, but I figured I would start asking for some info for, what I hope, is the easier one. Note that I know these are high level questions for now, and I will be investigating on my own, but any tips or pointers would be great (i.e. I don't expect you to do all the work for me ;))
The idea is to make some "lightning bug" led modules. I have two large olive trees in my back yard and would like to be able to put some lights in them all spread out. Then I would like to be able to update their behavior from time to time.
I realize I could just buy something like the BlipTronics LED Modules but what is the fun (and learning) in that? Plus they are too close together as-is.
So the questions I have are:
What is a good way to power these? I think there are going to be more than the Arduino can handle itself. I can run wire to an outlet, but would also like to consider a solar rechargeable battery setup.
If I go with RGB LEDs and would like to be able to have each LED be an independent color (or timing) will multiplexing work ok? -or-
Would it be better to build some hardware into each LED module to be able to communicate with each LED (similar to the BlipTronics)?
I am new to the hardware, but am very comfortable with the software side of things.
Yes you need an external power supply and to switch the LEDs through a transistor, or other form of driver if you are going to have more than 200mA of current in total.
Multiplexing cuts down on the number of pins but also reduces maximum brightness because the LEDs are turned on an off. Also sending high speed switching over very long wires is not very successful and it generates lots of electrical pollution (radiated noise). RGB LEDs often need some sort of diffuser like a ping pong ball to mix the colours, they are not very good raw. Do some tests first before buying a load of stuff.
Yes you need an external power supply and to switch the LEDs through a transistor, or other form of driver if you are going to have more than 200mA of current in total.
That is what I figured. Side question here, because multiplexing actually turns some LEDs off, can you run more from the same power source?
Do some tests first before buying a load of stuff.
3) I would try without hardware on each LED first.
Good plans. I have been starting small (up to 6 lights now! :)) and will slowly work my way up.
Much depends on what effect you are going for. Do you want to just pre-program them and hang them around the space? Or do you want to control them after they are installed?
Well I was looking more for having control after installation.
So one idea I just had was to have several independent modules. Say just 12-24 LEDs per module. If I did this I would cut down on the power requirements and the wire distance (per module obviously). It may not be super cost effective, but if I built a bare bones Arduino as a controller for each module, then I could just run through and update each for what ever program I want running at the time. Does this sound like a good or bad idea?
I felt like looking at the effect of lightning bugs and found this nice video
This made me think that I would like to have each light actually be a set of 3 or 4 lights. This way I could get that little bit of movement.
It also made me think that if I don't need to have more than a few lights on at once I could run quite a few more off of a single Arduino. I could easily limit it to only have a certain number of lights on at one time. So multiplexing is sounding better now. This would limit what effects I could pull off, but I am looking more for a slight effect, rather than a bunch of light.
Why is a transistor needed if the current is greater than 200 mA?
that is the max current you can pass through the atmega chip on the arduino before it is guaranteed to die, using a transistor the chip needs to only apply a tiny amount of current to switch the transistor, which can hold (typically) hundreds of ma depending on model
Do you want something that looks like real fireflies? Or were you just using the name to suggest lots of little points of light?
There are some LEDs out there that have a color similar to the real bugs, but the typical "green" ones don't. Look for a dominant wavelength near 562nm.
You can multiplex RGB LEDs, but it can get very tricky if you want more than one LED per multiplex group to appear to be on at a time. Typically, RGB LED color is controlled by PWMing the LEDs. If you're multiplexing them at the same time, you need to synchronize the multiplexing and the PWM waveforms, or the colors will go all weird on you.
If you're just sequencing from one LED in the group to the next, it's pretty easy.
Do you want something that looks like real fireflies? Or were you just using the name to suggest lots of little points of light?
More effect than anything. At this point I am really undecided on doing RGB LEDs or not. I would like to so I have more options, but I know it is going to take a bit more hardware and software.
If you're just sequencing from one LED in the group to the next, it's pretty easy
I am going to start doing some tests with this idea to see what kind of effect I can get.
The problem with multiplexing is that it involves rapid high speed signals that, in your case, you are going to send over a relatively long wire.
This will result in loss of speed of the signal's edge due to the capacitance of the wire. It will also cause lots of interference to things like AM radios and will probably be illegal (depending on your country). Also as the LED is turned on and off you will not get as bright a light out of it as you would if it were on for the length of time you want.
It will also cause lots of interference to things like AM radios and will probably be illegal (depending on your country).
I am in the US, so I'll have to keep my eyes out for the FCC.
This will result in loss of speed of the signal's edge due to the capacitance of the wire.
Is there any rule of thumb on how long a wire would be before I might start seeing problems? Or is this more of a problem that starts at 0 length and gets worse the longer the span?
If I were to have multiple controllers (Arduinos) running a smaller number of lights I could see limiting the wire runs to less than 7 feet.
Also as the LED is turned on and off you will not get as bright a light out of it as you would if it were on for the length of time you want.
So this raises a question for me. Lets say I have 4 lights running through a single multiplexer. If I just have one of the lights on, would it still be switching on and off? If so then I guess I need to read more on multiplexing to see if I really understand how they work.