LED Statue

Status
Not open for further replies.
I tried a butane powered iron and it broke after a few uses so I am stuck with the battery powered iron for now. Any suggestions on the solder?
 
I bought a power supply for experimenting with multiple strips at home before moving on to the bigger statue (I have been experimenting with small displays and a wall wart). My problem is there are only two leads (one +, one -) on the 5V output section of the power supply. How do I split this to accommodate multiple strips? I searched the internet but I am not sure I am googling with the right phrases.
 
I bought a power supply for experimenting with multiple strips at home before moving on to the bigger statue (I have been experimenting with small displays and a wall wart). My problem is there are only two leads (one +, one -) on the 5V output section of the power supply. How do I split this to accommodate multiple strips? I searched the internet but I am not sure I am googling with the right phrases.

You can either just tied a bunch of wired together with either solder or a twist on connector like one of these

http://www.homedepot.com/c/wire_connectors_shop_for_cable_and_wire_connectors_HT_BG_EL

or you can use a bus bar connector or terminal block like one of these

http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_659454_-1

Hopefully that's enough to get you started.
 
bus bar connector, that is what I was looking for. I thought about the twist connector but I thought that might be too unstable. Thanks!
 
I think not when it says "Maximum Current Rating 15A". Perhaps buy 3 four position units and share the load - especially if it might be enclosed. Of course the distribution point would need to be 30A capable, i.e. a daisy chain would have to pass a net 30A.
 
I am trying to upload a sketch but keep getting this error, even after I press the black button on the teensey:

Please press the RESET BUTTON on your Teensy to upload your sketch. Auto-reboot only works if the Teensy is running a previous sketch.

any idea what is going on?
 
So, I am experimenting with my new 40A power supply but it doesn't seem to be able to light up many more LEDs than the wall wart I was using before. I modified the Basic Test program to run 800 LEDs on one strip only. When I run the program, I start daisy chaining the strips together. Everything works fine until I connect about 250 LEDs. Any idea what the problem could be? Is there a limit to how much current can flow through the strips themselves?
 
I think the rule of thumb is you need to supply power every 100 LEDs or so, and you need thicker power/ground wires to run back to the power supply (run separate wires for each segment, don't daisy chain the power line). If you are using separate power supplies, be sure to interconnect the ground wires.

If you are using ws2812's (i.e. neopixels), be sure to read and use the best practices guide that Adafruit has documented, https://learn.adafruit.com/adafruit-neopixel-uberguide/best-practices:
  • If doing level conversions, use a level shifter that is compatible with neopixels, such as the 74AHCT125 or 74AHCT245;
  • Place a 300-500 ohm resistor between the shifted data pin and the first LED;
  • Place a 10 or 100 ohm resistor between the shifted data pin and ground;
  • Place a large capacitor (1000 µF, 6.3V or higher) between the power/ground pins.

I would suspect (but I don't know) if you are using multiple power units, that each one needs a capacitor.
 
The brightness plays a big role re: the power consumption. For example, the Halloween color chaser on our paper mâché UFO ran at a 4 out of 255 brightness setting. The 4A power supply handled all of those LEDs without issues and I simply daisy-chained 3 strips to each other to supply the necessary power. Obviously not something I'd attempt to do with a higher power load.

But voltage drop is not to be toyed with. In a former life, I pulled 1/0AWG wire through a boat for a windlass to ensure it had a good power supply. Bit of an upgrade from the corroded 2 AWG stuff the OEM put in. In fact, I got to rewire the whole boat because of British wiring practices. Real bus bars are a big plus, especially when bringing all the GND connections together in one spot.
 
@MichaelMeissner, good suggestions. I am using WS2811's but I am sure that they still apply. I was wondering if you have to do all of that if you are using the Octows2811 adapter on your Teensy. I am guessing the 74AHCT125 is not necessary because I am using WS2811's. I am also guessing the resistors are not necessary with the Octo. Not sure about the capacitor. Why is that necessary?

If I want to connect 800 LEDs to one pin on the Teensy (Octo), then it sounds like I need to connect each successive strip to the power supply directly instead of daisy chaining. Is it sufficient that only the power wire be connected to the power supply and that the ground wires are still daisy chained?
 
No, I doubt that will work - the issue is the current flowing in and out. Just as the power lines has to be right-sized, so do the GND returns.

If it was me, I'd mount busbars to the back of the display, one of for 5V, the other for GND at either end or at regular intervals. Then tie the strips directly into those.

McMaster Carr sells brass stock that you can use for that purpose, i.e. drill, tap, insert brass bolts as needed, then use a nut to secure the ring terminal. That's what I did on the boat. You can buy pre-made busbars but you likely won't have the spacing you need for your stock. See http://www.vonwentzel.net/Prout/02.Electrical/06.Busbars/ for a laugh.
 
It really depends on the LEDs, when Adafruit switched the neopixels from WS2812's to WS2812B's, I did have to pay more attention to level shifting, etc.
 
I am trying to edit movie2serial to output what is in my Processing window frame to an LED matrix. In my window, I am scrolling text across an image. The program seems to be outputting the image to the matrix without any text. I am new to Processing so I am not sure where I am going wrong but I am editing this line:

ledImage.copy(img, xoffset, yoffset, xwidth, yheight,
0, 0, ledImage.width, ledImage.height);

to:

ledImage.copy(xoffset, yoffset, xwidth, yheight,
0, 0, ledImage.width, ledImage.height);

I thought removing the img reference would tell Processing to copy the whole frame but changing this frame doesn't seem to output anything. Here is my full code:

import processing.serial.*;
import java.awt.Rectangle;

float gamma = 1.7;

int numPorts=0; // the number of serial ports in use
int maxPorts=24; // maximum number of serial ports

PImage img; // Declare variable "a" of type PImage
float x; // horizontal location of headline
XML xml;
String[] headlines;
int index = 0;

Serial[] ledSerial = new Serial[maxPorts]; // each port's actual Serial port
Rectangle[] ledArea = new Rectangle[maxPorts]; // the area of the movie each port gets, in % (0-100)
boolean[] ledLayout = new boolean[maxPorts]; // layout of rows, true = even is left->right
PImage[] ledImage = new PImage[maxPorts]; // image sent to each port
int[] gammatable = new int[256];
int errorCount=0;

void setup() {
String[] list = Serial.list();
delay(20);
println("Serial Ports List:");
println(list);
serialConfigure("COM4"); // change these to your port names
if (errorCount > 0) exit();
for (int i=0; i < 256; i++) {
gammatable = (int)(pow((float)i / 255.0, gamma) * 255.0 + 0.5);
}
size(480, 400); // create the window


x = width;
// The image file must be in the data folder of the current sketch
// to load successfully
img = loadImage("moonwalk.jpg"); // Load the image into the program

// The URL for the XML document
String url = "http://news.google.com/news?cf=all&hl=en&pz=1&ned=us&output=rss";
// Load the XML document
xml = loadXML(url);
// Grab the element we want
XML[] headers = xml.getChildren("channel/item/title");
headlines = new String[headers.length];
for (int i = 0; i < headers.length; i++) {
headlines = headers.getContent();
}
}

// image2data converts an image to OctoWS2811's raw data format.
// The number of vertical pixels in the image must be a multiple
// of 8. The data array must be the proper size for the image.
void image2data(PImage image, byte[] data, boolean layout) {
int offset = 3;
int x, y, xbegin, xend, xinc, mask;
int linesPerPin = image.height / 8;
int pixel[] = new int[8];

for (y = 0; y < linesPerPin; y++) {
if ((y & 1) == (layout ? 0 : 1)) {
// even numbered rows are left to right
xbegin = 0;
xend = image.width;
xinc = 1;
} else {
// odd numbered rows are right to left
xbegin = image.width - 1;
xend = -1;
xinc = -1;
}
for (x = xbegin; x != xend; x += xinc) {
for (int i=0; i < 8; i++) {
// fetch 8 pixels from the image, 1 for each pin
pixel = image.pixels[x + (y + linesPerPin * i) * image.width];
pixel = colorWiring(pixel);
}
// convert 8 pixels to 24 bytes
for (mask = 0x800000; mask != 0; mask >>= 1) {
byte b = 0;
for (int i=0; i < 8; i++) {
if ((pixel & mask) != 0) b |= (1 << i);
}
data[offset++] = b;
}
}
}
}

// translate the 24 bit color from RGB to the actual
// order used by the LED wiring. GRB is the most common.
int colorWiring(int c) {
int green = (c & 0xFF0000) >> 16;
int red = (c & 0x00FF00) >> 8;
int blue = (c & 0x0000FF);
red = gammatable[red];
green = gammatable[green];
blue = gammatable[blue];
return (green << 16) | (red << 8) | (blue); // GRB - most common wiring
}

// ask a Teensy board for its LED configuration, and set up the info for it.
void serialConfigure(String portName) {
if (numPorts >= maxPorts) {
println("too many serial ports, please increase maxPorts");
errorCount++;
return;
}
try {
ledSerial[numPorts] = new Serial(this, portName);
if (ledSerial[numPorts] == null) throw new NullPointerException();
ledSerial[numPorts].write('?');
} catch (Throwable e) {
println("Serial port " + portName + " does not exist or is non-functional");
errorCount++;
return;
}
delay(50);
String line = ledSerial[numPorts].readStringUntil(10);
if (line == null) {
println("Serial port " + portName + " is not responding.");
println("Is it really a Teensy 3.0 running VideoDisplay?");
errorCount++;
return;
}
String param[] = line.split(",");
if (param.length != 12) {
println("Error: port " + portName + " did not respond to LED config query");
errorCount++;
return;
}
// only store the info and increase numPorts if Teensy responds properly
ledImage[numPorts] = new PImage(Integer.parseInt(param[0]), Integer.parseInt(param[1]), RGB);
ledArea[numPorts] = new Rectangle(Integer.parseInt(param[5]), Integer.parseInt(param[6]),
Integer.parseInt(param[7]), Integer.parseInt(param[8]));
ledLayout[numPorts] = (Integer.parseInt(param[5]) == 0);
numPorts++;
}

void draw() {
// Displays the image at its actual size at point (0,0)
image(img, 0, 0);
textSize(32);
fill(255,255,255);
text(headlines[index], x, 90);
x = x - 3;
float w = textWidth(headlines[index]);
if (x < -w) {
x = width;
index = (index + 1) % headlines.length;
}


for (int i=0; i < numPorts; i++) {
// copy a portion of the movie's image to the LED image
int xoffset = percentage(img.width, ledArea.x);
int yoffset = percentage(img.height, ledArea.y);
int xwidth = percentage(img.width, ledArea.width);
int yheight = percentage(img.height, ledArea.height);
ledImage.copy(img, xoffset, yoffset, xwidth, yheight,
0, 0, ledImage.width, ledImage.height);
// convert the LED image to raw data
byte[] ledData = new byte[(ledImage.width * ledImage.height * 3) + 3];
image2data(ledImage, ledData, ledLayout);
if (i == 0) {
ledData[0] = '*'; // first Teensy is the frame sync master
int usec = (int)((1000000.0 / 30) * 0.75);
ledData[1] = (byte)(usec); // request the frame sync pulse
ledData[2] = (byte)(usec >> 8); // at 75% of the frame time
} else {
ledData[0] = '%'; // others sync to the master board
ledData[1] = 0;
ledData[2] = 0;
}
// send the raw data to the LEDs :)
ledSerial.write(ledData);
}


}

// scale a number by a percentage, from 0 to 100
int percentage(int num, int percent) {
double mult = percentageFloat(percent);
double output = num * mult;
return (int)output;
}

// scale a number by the inverse of a percentage, from 0 to 100
int percentageInverse(int num, int percent) {
double div = percentageFloat(percent);
double output = num / div;
return (int)output;
}

// convert an integer from 0 to 100 to a float percentage
// from 0.0 to 1.0. Special cases for 1/3, 1/6, 1/7, etc
// are handled automatically to fix integer rounding.
double percentageFloat(int percent) {
if (percent == 33) return 1.0 / 3.0;
if (percent == 17) return 1.0 / 6.0;
if (percent == 14) return 1.0 / 7.0;
if (percent == 13) return 1.0 / 8.0;
if (percent == 11) return 1.0 / 9.0;
if (percent == 9) return 1.0 / 11.0;
if (percent == 8) return 1.0 / 12.0;
return (double)percent / 100.0;
}
 
Status
Not open for further replies.
Back
Top