Recent Posts

Newsletter

info@ledstripstudio.com
+421 (2) 20 283 002

SPI LED Controller

Tutorials

1. Introduction and hardware description

 

Hardware board contains connectors, buttons and some control diodes.

SPI LED Controller board inputs/outputs

DMX In / DMX Out

input/output for DMX signal. SPI LED Controller contains standard RJ45 connectors where only some lines
are used for Data +, Data – and Ground (GND).

RJ-45 connector lines usage for
1 D+
2 D-
7 GND
8 GND

Micro SD card slot

Slot for standard micro SD Card. All the animations for digital LED strips or pixels can be saved on a FAT32 formatted card with size up to 32GB.

Mode/Status indicators

three control diodes displaying the status of the device.

 

Frame sending – in case some picture is being sent to SPI out, this diode flashes.

 

DMX signal detecteddiode flashes in case DMX signal is detected.

 

Power ondiode turns on if power is connected.

Animation switch buttons

You can store multiple animations on the SD Card. Using these two up/down buttons you can select which animation to play.

SPI Out

Is a digital output for LED strips/LED pixels. Please, see SPI Out (SH04-5-GY) connector scheme on the picture below.

SPI OUT (SH04-5-GY) connector scheme

Power In

Power input for a power source, in the range from 5 to 24V DC. Please, see SH04-5-GY connector scheme on the picture below.

Power In (SH04-5-GY) scheme

2. Installation examples

 

We show you a few typical connections/installations of SPI LED controller with power supply and LEDs. For those of you, who like video, check video tutorial below.

For a better explanation, we’ll use schematic side picture of the board. Here you can see the board side with the connector description.

SPI LED Controller side view and its schematic representation

2.1 Standard connection of Data pin

 

On the following example, you can see a connection scheme of one TM1803/TM1809 based LED strip and one power source. TM1803 or TM1809 LED strip family requires only using one data line (no clock required).

Connecting one LED strip (TM1803/TM1809)

Recommendation

Sometimes it’s better to connect also the power directly to the LED strip (or LED pixel). It’s especially important in case you use many LEDs and the LED strip requires a lot of power. In this case, you don’t need to connect the +Vcc from the SPI LED Controller to the LED strip. But we strongly recommend connecting GND.

2.2 Connection of Clock Pin

 

In case you use e.g. LED pixels, some of them require also Clock pin for synchronous data transmission. Here you can also see how to boost the power in case you want to use many LED pixels.

Many types of LED pixels require clock to be connected

3. Configurations

 

You can configure SPI LED Controller by editing a text file. But it’s easier to use tools we provide in LED Strip Studio software.

3.1 Configuration file

 

The board configuration is stored in one simple text file on the SD Card. Name of the file is settings.txt and it must be stored in the root directory of the SD Card. Animation files are stored in LNT file format. Both file formats can be generated in LED Strip Studio software.

Example of SD Card for SPI LED Controller – animation files in LNT format

3.2 How to do configuration file

 

To create settings file, you can use LED Strip Studio software.

 

Here is an example of a configuration step by step:

 

  1. Go to menu Settings →LSS SPI Settings
Go to menu Settings →LSS SPI Settings

2. Following dialog appears

SPI LED Controller settings file generator in LED Strip Studio

Mode

SD Card mode – In this case, SPI LED Controller uses LNT files from the SD Card to be played.
7 DMX channels are used.

 

Pixel mode – This mode converts incoming DMX signal into RGB pixel format. You can later define how many pixels should be used (in DMX Pixel tab). Each pixel uses 3 DMX channels for red, green and blue color. You can also change the order of the RGB color channels.

IC (used chip)

Allows you to select used LED strip type control chip (IC).

RGB order

allows you to define RGB order for the LED strip. Some LED strips might use for example blue, green, red order instead of standard red, green blue. This setting allows you to change this color order.

DMX Address

starting DMX address for both, SD Card and Pixel mode.

Distributor Address

defines address of distributor, which should be used from SD Card files or MMX input.

Strip Address

LSS Distributor can control up to 4 strips. Here you can define, which of the strips should be used as an output for SPI LED Controller.

LSS SPI Settings - auto play tab

File

this is the initial file, which will be played after the SPI LED Controller is turned on. In case it’s 0, LSS SPI won’t start any file after start (you can start it only manually using the buttons).

Brightness

You can lower the brightness of the animation. All animations are affected (in case you switch between them using the buttons).

Speed

Speed of default animation. 128 is default animation (as played in LED Strip Studio software). 255 is 4x faster than default animation. If the value is lower than 128, the animation is slower (64 = 1/2 of speed).

Force LED Count

By default, LSS SPI plays animations on the number of LEDs defined in LNT file. But sometimes you can use more or fewer LEDs on your LED strip or LED pixel and you don’t want to export the LNT files once again. This setting will convert all the animations to the desired number of LEDs. In case it’s 0, the number of LEDs is defined by LNT file.

LSS SPI Settings - DMX Pixel Tab

Pixels

defines how many pixels are used on SPI output. Value range is from 1 to 170. By 1, SPI LED Controller uses three DMX channels (from DMX Address) and sends it to SPI output as 1 RGB pixel. In case you use 170, SPI converts 170*3 = 510 DMX channels (almost all the DMX universe).

LEDs per Pixel

three DMX channels are converted to one LED pixel by default. But this setting allows you to create a group of LED pixels controlled by DMX channels. E.g. in case LEDs per Pixel is 4, four LED pixels behave as one on SPI output (they’ll have the same color set by these 3 channels). This is quite practical in case your LED strip or LED pixel line uses more than 170 LEDs and you still want to control them over DMX.

Example: Let’s say, you set Pixels to 20 and LEDs per Pixel to 3. You’ll control the total of 60 LED pixels, every 3 following pixels will have the same color set by DMX channels.

Export to text file

export settings.txt to the selected directory. This file must be saved on the SD Card for SPI LED Controller.

3.3 Standalone (autoplay) mode

 

It’s perfect for standalone applications, where you don’t want to use computers. Typical usage is an advertisement

If there is NO DMX signal connected to SPI LED Controller, the device starts automatically playing file defined in the settings.txt file.

 

The SPI LED Controller device locates all LNT files (animations) saved on the SD Card and allows you to switch between them using up/down buttons.

3.4 DMX controlled mode

 

You can use SPI LED Controller in two different modes when controlling over DMX:

  • SD Card
  • Pixel mode

 

DMX mode will start run automatically after DMX signal is detected.

You can find the DMX to RJ45 connection scheme on the image below.

Scheme of DMX to RJ-45 adapter

SD Card

It’s SD player mode when you are able to choose any file from the SD-Card and play it on your digital LED strips. You can use DMX channel to select animation stored on SD Card and let it play on LED strips/LED pixels. You can see an example of right DMX values in this mode:

DMX Order Property Example
1 Brightness 255
2 Animation 1
3 Animation speed (default is 128) 128
4 Red 0
5 Green 0
6 Blue 0
7 White 0

A short video which helps you with a single installation and explains SD-Card mode.

Pixel mode

In this mode, you control every LED pixel of your LED strip directly using three DMX channels. You can use more LED pixels than one, thus more DMX channels will be used. The calculation is easy, you use N pixels, you’ll need 3*N DMX channels. Also, don’t forget, you can use LEDs per Pixel setting to create groups of pixels with the same color.

 

In pixel mode, every 3 DMX channels are used to control red, green and blue color of one (or more) LED pixels. You can define how many pixels are used (thus how many DMX channels). The only limitation is, SPI LED Controller can control up to 1024 LEDs. If you want to use more, you’ll have to use several SPI LED Controller devices.

LSS SPI Settings - DMX Pixel Tab
3 DMX channels are used to control red, green and blue color of 4 LED per each pixels

A short video which helps you with a single installation and explains Pixel mode.

4. Creating and exporting animations in LED Strip Studio software

 

To start using SPI LED Controller you have to use LED Strip Studio (LSS) software to create correct strip layout and to prepare your SD Card animations. To know more about the LSS software we recommend to watch the following tutorials.

To export your scene to your SD Card you have to do following steps:

  1. Start LSS software.
  2. Create a correct mapping (for any LSS Ethernet IP address) which represent your physical LED world. How to do LED mapping in LED Strip studio software you can find in this tutorial – LED Mapping.
  3. Create your scene (LED animation). Don’t know how to create LED animation, please, see this tutorial. – Create new animation.
  4. To export scene into LNT file go to the menu Scenes → Export scene to SD Card.
  5. Choose LSS Ethernet, where you’ve created the mapping. LSS Ethernet is defined by IP address 192.168.1.X, where X is arbitrary. For creating a mapping, you can create LSS Ethernet with any IP address.
  6. Select the folder, where you want to export the file. Typically it’s the folder of your SD Card.
  7. File index allows you to define on which animation position you’ll export the file – from 001 to 255.
  8. LSS software exports LNT file with name LSSXXX.LNT, where XXX is from 001 to 255.
  9. Save the exported LNT file to your SD Card.
Choose Ethernet with defined mapping to be used for export

To create settings.txt file, which tells the SPI LED Controller what kind of strip and what file it should play you have to create a configuration file. All the files must be saved to your micro SD Card and you have to insert this card to your SPI LED Controller device.