You need budget (for safety) 60mA per LED. If you don't, you'll be sorry. Find a 2A wall-wart or bigger.
For my big projects I order the 5V/10A power supplies from Adafruit. Will be helping friends with a display that will use three of them to safely power everything.
I found a 2.4 amp so will try that. If it is dead I can revert to the Tenergy power pack I just bought as it says it pushes 5V 2.1Amp. Thanks for the help all. I will try to remember and get a video of everything before game time. Go Seahawks!!
In a pinch, since it is DC power can I connect multiple 5V supplies to obtain more amps?
Sort of. It's not a good idea to link the 5V lines together since they're unlikely to exactly match and some regulators get hot when their output is higher than the voltage they produce.
You could use multiple supplies if you isolate the 5V side of connection. You could have different supply and ten or so LEDs. I'm not positive this is okay. The WS2811 can pass current through it's I/O pins and I don't know is using multiple supplies will cause a problem the logic levels (it shouldn't). The grounds all need to be connected together.
pub chaseSingleAlternate(color1, color2, ms1, ms2, count) | ch, maxIndex
maxIndex := strip.num_pixels - 1
repeat count
repeat ch from 0 to maxIndex
strip.set(ch, color1)
pause(ms2)
if ch > 0
strip.set(ch - 1, color2)
pause(ms1)
strip.set(ch, 0)
pub chaseWithBackground(foreground, background, ms, count, size) | maxLed, maxIndex, head, tail
maxLed := strip.num_pixels - 1
maxIndex := maxLed + size
strip.set_all(background)
repeat count
repeat head from 0 to maxIndex
tail := head - size
if head =< maxLed
strip.set(head, foreground)
if tail => 0
strip.set(tail, background)
pause(ms)
The method "chaseSingleAlternate" sets the LED which had just been blue to green. Make sure and try out different timing values to find a look you like.
The "chaseWithBackground" keeps the background LEDs a second color rather than off.
Again, I haven't tested these. I often end up posting bad code when it's untested.
I will test a bit later. Even with a 2.4Amp 5V Wall Wart when the Blue/Green are on together only 10 LED's light up. I am at 14 right now and all 14 work except when it gets to the Blue/Green together. Any suggestions? I am thinking of maybe splitting the power up after 10.
I will test a bit later. Even with a 2.4Amp 5V Wall Wart when the Blue/Green are on together only 10 LED's light up. I am at 14 right now and all 14 work except when it gets to the Blue/Green together. Any suggestions? I am thinking of maybe splitting the power up after 10.
You can try reducing the brightness.
I set the "BRIGHTNESS" constant to 128 ($80 in hex). Jon's original code didn't include an overall brightness constant but the values he used was equivalent to having the brightness set to 32. You can try reducing the brightness to 32 or even lower and see if that helps.
I'm almost afraid to ask. Do you have decoupling capacitors on the LEDs? My little boards and all the other WS2812 boards I've used or seen have a 0.1uF cap either next each LED or sometimes shared between two LEDs (the NeoPixel rings share caps between two LEDs). These caps aren't optional.
Each LED has a resistor and cap on them. That is how they arrived.
So where is that code located? I am not seeing it and am sure I am just half blind right now!!! I only need it for the specific code that mixes Blue/Green.
con
STRIP_LEN = 10'21
[b]BRIGHTNESS[/b] = $80 '' How bright should LEDs get?
'' The value of BRIGHTNESS
'' should be between zero and
'' 255 ($FF).
BLUE_ = $FF_00_00
GREEN_ = $00_FF_00
You can use ctrl+f to "find" words in a program. I often use this to find where a constant is defined or where all instances of a variable occur.
Yea, I am changing STRIP_LEN as I attach each LED. I like the brightness of the of the LED's so would rather just remove the Blue/Green merging if at all possible, unless there is a way to just dim that portion.
You can either comment out the calls to methods using both colors at once or use zero as one of the color parameters to have the method use a single color.
The "extra_from_duane" method doesn't use colors as parameters when called. There are a couple of constants which set the limits of the which colors are blended but it would probably just be easier to comment out the last three lines of the method "main" to remove the call to the "extra_from_duane" method with it's accompanying pause and LED clearing.
I'm using the same code that I posted in the Archive. I tried the tm version last night and it made all LED's on and white. I am OK with the code that is in the Archive if I can just change the Blue/Green to one color at a time.
I'm using the same code that I posted in the Archive. I tried the tm version last night and it made all LED's on and white. I am OK with the code that is in the Archive if I can just change the Blue/Green to one color at a time.
I'm guessing the LEDs you tried the code on were WS2812 LEDs?
The two drivers are pretty similar. Jon has a few more methods in his WS2812 driver than the "tm" driver has. Rather than change the "tm" driver, I just copied Jon's WS2812 methods into the parent object for the "tm" demo. I think the methods in the "tm" demo should work in the WS2812 demo.
Any method which has two color parameters should work with one of the colors set to zero (though it might not look great).
Since I am getting short on time what code do I need to comment out to keep the colors from merging? I think that will be fine for the time being. I can mess with it more after the game.
Well, Not sure what the heck I did but the merge colors is gone now and everything is working just how I want it. Thanks for all the help and enjoy the game if you are a football fan!!!
Comments
For my big projects I order the 5V/10A power supplies from Adafruit. Will be helping friends with a display that will use three of them to safely power everything.
Sort of. It's not a good idea to link the 5V lines together since they're unlikely to exactly match and some regulators get hot when their output is higher than the voltage they produce.
You could use multiple supplies if you isolate the 5V side of connection. You could have different supply and ten or so LEDs. I'm not positive this is okay. The WS2811 can pass current through it's I/O pins and I don't know is using multiple supplies will cause a problem the logic levels (it shouldn't). The grounds all need to be connected together.
The method "chaseSingleAlternate" sets the LED which had just been blue to green. Make sure and try out different timing values to find a look you like.
The "chaseWithBackground" keeps the background LEDs a second color rather than off.
Again, I haven't tested these. I often end up posting bad code when it's untested.
You can try reducing the brightness.
I set the "BRIGHTNESS" constant to 128 ($80 in hex). Jon's original code didn't include an overall brightness constant but the values he used was equivalent to having the brightness set to 32. You can try reducing the brightness to 32 or even lower and see if that helps.
I'm almost afraid to ask. Do you have decoupling capacitors on the LEDs? My little boards and all the other WS2812 boards I've used or seen have a 0.1uF cap either next each LED or sometimes shared between two LEDs (the NeoPixel rings share caps between two LEDs). These caps aren't optional.
So where is that code located? I am not seeing it and am sure I am just half blind right now!!! I only need it for the specific code that mixes Blue/Green.
You can use ctrl+f to "find" words in a program. I often use this to find where a constant is defined or where all instances of a variable occur.
In the first method "main".
Here's an example of using zero as the background in one of the methods I added. Starting at line 90.
The "extra_from_duane" method doesn't use colors as parameters when called. There are a couple of constants which set the limits of the which colors are blended but it would probably just be easier to comment out the last three lines of the method "main" to remove the call to the "extra_from_duane" method with it's accompanying pause and LED clearing.
[//code//] extra_from_duane(20_000) ' max allowed time is 26_500 longer intervals will cause rollover
strip.off
pause(100)
' chaseSingle(blue, green, 167, 167, 2)
' strip.set_all(0)
' pause(1)
chaseWithBackground(blue, 0, 167, 1, 6)
chaseWithBackground(green, 0, 167, 1, 6)
strip.set_all(0)
pause(100)
[//code//]
If you click on "Reply With Quote" to a post with code, you can see the code tags used.
What was the error message?
I haven't used those particular LEDs. In general 5V devices will tolerate up to 5.5V.
Does the code you're using have the "chaseWithBackground" method?
The original code ("modified_tm1803_seahawks_swappedC.spin") had:
I changed it to:
Using zero instead of the color shouldn't cause a problem.
I'm guessing the LEDs you tried the code on were WS2812 LEDs?
The two drivers are pretty similar. Jon has a few more methods in his WS2812 driver than the "tm" driver has. Rather than change the "tm" driver, I just copied Jon's WS2812 methods into the parent object for the "tm" demo. I think the methods in the "tm" demo should work in the WS2812 demo.
Any method which has two color parameters should work with one of the colors set to zero (though it might not look great).