Hello All, I am pretty new when it comes to arduino and DIY microcontrollers.

Hello All,
I am pretty new when it comes to arduino and DIY microcontrollers. I have been professionally using theatrical lighting control for 10+ years as well as the fixtures that come along with the territory. I have recently come across both APA 102 and APA101 LEDs and was considering implementing them into an installation/show i was designing. Due to budget i am limited to 2 universes of control but i need 50 feet(13 times! so more like 650 ft but only 50ft mirrored 13 times) of whichever pixel tape i decide to use. Before i waste days of my time trying to figure this out for myself i figured i would come to the community with questions…

Is it possible to take a DMX input and have it control 2 consecutive pixels as channels 1-3? SO instead of using over 1350 control channels im dropping it down to somewhere around 650-700 control channels?
pixels 1+2 respond as pixel ,1 3+4 as pixel 2, etc…
Doing this i would still get the effect i want without sacrificing the brightness of the “missing” LEDs
The controller i am planning on using can speak almost any lighting control language (DMX, Artnet, sACN, DALI, KiNet, etc…) so if one of those is easier to do this with let me know.

I am not looking for you guys to do the work for me, i just want to be pointed in the right direction so i dont waste a bunch of time that i don’t have.

Thank you!

just had another crazy thought. On top of all of the other “stuff” i am asking would i then be able to have an additional 39 channels correspond to each 50ft run so as well as chasing the individual pixels i could chase the full lines?

Thanks again

Is this possible? Yes. The Xmas light crowd do exactly this kind of thing. Drive thousands of pixels via DMX or sACN etc.

wrt your pixel addressing scheme I’m not sure I follow you fully.

Are you saying DMX channel 2 controls pixels 1, 3, and 4??

so imagine each pixel as a 3 channel fixture(RGB) so normally pixel 1 would be channels 1-3 pixel 2 would be 4-6 and so on. I am curious if i can essentially group the control of my pixels so i can use pixels 1 and 2 as a single 3 channel fixture. So basically if i have 1m of 30 pixels that would normally be 90 DMX channels i would instead have 15 fixtures consisting of 2 consecutive pixels each so i am only using 45 DMX channels and losing half my resolution without losing any brightness or having big gaps.

As for the additional comment with my secondary thought i was curious if i could also have each of my 13 runs(rounded to 15m each) be controlled as 13 additional(3ch) fixtures without screwing up my “normal” operation. so instead of having 13 mirroring 675 channels(because they would all be controlled as if they are the same fixture so i don’t count them as being 675 channels each)i would have 39 channels of control, RGB*13.

I am on my way out to meet up with the inlaws, let me know if you need any additional information.

I’m up to my armpits in domestic bliss myself, and I need to sketch this out, but I understand your challenge better now.

So, you’ll be running this from a desk (PC with pre programmeed scenes) for colour washes and fills, or from some dynamic input (frequency response, video etc)

I decided to have a go at this interesting challenge. @John_Beaulieu , if I understand correctly what you’re after then I think this could work.
Open your serial monitor to get some feed back when you run it.
https://github.com/marmilicious/FastLED_examples/blob/master/test_DMX_double_pixels_up.ino

Cheers.

I will try it at some point tonight or tomorrow. The girlfriend has expressed her dissatisfaction with me working this weekend ha ha

If i wanted to make your example relevant for dotstar(4wire) pixel tape what would i need to do?
Do i just add “include <Adafruit_DotStar.h>” and “#include <SPI.h>”
and “#define DATAPIN 4
#define CLOCKPIN 5”
or something along those lines?
sorry, as i stated im pretty new to this type of stuff.
Also… Do i need to build a circuit to receive DMX or could i use 2 pins on my MEGA(2560)? this question is literally because i am too lazy too look at the specs of the MEGA, you can ignore me if you want and i will figure it out myself haha

Hi @John_Beaulieu “DotStar” is the brand the clever marketing people at Adafruit have given to APA102 pixels.

You don’t need to include the adafruit library when working with FastLED.

This is from the wiki:

For four wire chipsets you have a couple of options. If you are using the hardware SPI pins for the device that you’re building for, then you don’t even have to specify the pins:

void setup() { 
    FastLED.addLeds<APA102>(leds, NUM_LEDS);
}

If you are specifying your own pins, you have to specify a clock and a data pin:

void setup() { 
  FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN>(leds, NUM_LEDS);
}

Finally, sometimes you may want to change the data rate that you are running your leds at. In this case, you’ll also need to specify the RGB ordering:

void setup() { 
    FastLED.addLeds<APA102, RGB, DATA_RATE_MHZ(12)>(leds, NUM_LEDS);
}

or

void setup() { 
    FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, RGB, DATA_RATE_MHZ(12)>(leds, NUM_LEDS);
}

The above example tells the library to run the APA102’s at a 12Mhz data rate instead of the 24Mhz data rate that it will prefer to try for.

So a typical stanza would be

#include “FastLED.h”

#define NUM_LEDS 115
#define LED_TYPE APA102
#define COLOR_ORDER RGB

void setup() {
delay(2000);
FastLED.addLeds<LED_TYPE,COLOR_ORDER,DATA_RATE_MHZ(1)>(leds, NUM_LEDS);
}

void loop() {
//do stuff here
}

Thank you @Stuart_Taylor and @marmil
I am going to throw this together and try it out now. I will let you know what the outcome is.
This is what it ended up looking like, dont know if i changed it accurately

http://pastebin.com/nHSaKvvu

I left my breadboard and MAX485 at home so i cant build my DMX circuit to test it out for a few hours. Once i build my circuit do i have to specify what pin i am on in the code or is it assumed that i am using any of the rx pins on the MEGA and i do not need to specify? Sorry i am just not seeing anything that specifies this.

ah, so most of the DMX libraries i have used, including the one in the FastLED library, use the onboard UART aka serial port. the MAX485 is used to turn the serial (5v RS232) into DMX (which is RS485). It just connect to the serial port RX/TX on the arduino.

There is lots of good info on DMX and Arduino here: http://playground.arduino.cc/Learning/DMX

I’ve got some sACN code on my gist repo, and a basic DMX example here: https://gist.github.com/hsiboy/7e23ec783d8b2131133f

easy enough! Thank you have have literally saved me hours of a reading

@Stuart_Taylor receiving DMX with the arduino is apparently a lot more difficult than i had thought. in your example you are using “#include <DmxReceiver.h>” i can not find this library anywhere. fastLED has DMX.h. I am going to try to mess with it more to get some progress but any help to save time would be super helpful…
and then i looked to the right and say another post that had a link to it, damn it! haha

@marmil your example with the simulated DMX works, at least it does with about 72 pixels. There is a weird delay with the pairs, I dont think it will be an issue when i actually put it to practice with real DMX. Thank you for your help! Any other input would be much appreciated.

John, in that example I added in a bunch of delays to slow things down to show what was going on. They should all be removed for actual use once things are confirmed to work. And indeed there was a small delay between lighting a pixel and it’s duplicate just to clarify it was operating on one and then the other, so definitely delete that (lines 89 and 90 from my example) if you haven’t and they should light together.

There also could very well be something else that could be causing a slowdown related to 72 pixels, but I can’t think of what that would be at the moment. Hummmm. Be sure to remove all the delays and ping back.

Glad you’re making progress!

Also, looks like that library might be from here:
https://forum.pjrc.com/threads/19662-Arduinoesque-overriding-of-core-functionality?p=24993&viewfull=1#post24993

But I’m not sure if that’s the most current though. From further down in the thread, looks like two others had a go a updating Ward’s code. I’d probably try out one of those.

I have no idea why i am still fighting with this thing. I have built 3 different DMX “shields” using different brands/model numbers of rs485 transceivers. and have even tried different examples of different DMX libraries. At this point would it be easier if i went out and purchased an ethernet shield and used artnet or sACN instead? Has anyone played with KiNet?

OK! I have been playing with @Tobias_Ebsen s OpenPixelNode project and i can easily see it doing everything i want it to do. Now i am curious HOW i would merge it with @marmil s example to do everything i want the way i want it to do it. Currently I cant seem to get the OpenPixelNode project to work with the APA102 LEDs i am still troubleshooting but it keeps telling me things are not defined and wont let me upload. im sure if i pound my head against the monitor for a bit longer i will fix all of my errors… or find out i cant use this flavor pixel with the ethernet shield. i am using the ws5200 version of the shield if it helps anyone

Can you give more info about the error as to what it’s saying is not defined, and post your code to pastebin?

I have to do actual job duties today, i will set up all of the mock up stuff this afternoon and get back to you with exactly what the error messages were as well as provide what i am attempting to use for code.

Thank you for being so helpful