- I have enabled the spi bus on the pi using raspi-config and verified it is there with lsmod
- The spi interface shows up as possible output in QLC+
- I connected the power to a dedicated 5v supply that I use for another string (ws2810, without the clock line) and the first led shines bright when I have only that on.
- The clock line on the string I have connected to the SPI clock pin
- The data line on the string I have connected to MOSI line.
- I defined SPI as universe 3 output and created a 7 x 7 RGB panel - gives me 49 pixels for the string.
- The first led in the string goes out when I power up the pi - I expected that
- Every thing looks good but moving the first channel of universe 3 produces nothing - moving any other channel is the same.
SPI and ws2801
-
- Posts: 58
- Joined: Mon Apr 27, 2015 11:27 am
- Real Name: Chris Laurie
I cannot seem to find the details on how to connect a string of ws2801 pixels to the SPI bus on the raspberry pi and control them through the pi. I am not having success so I will detail what I have done and would like to hear if anybody else have done it successfully and give me some pointers.
- mcallegari
- Posts: 4807
- Joined: Sun Apr 12, 2015 9:09 am
- Location: Italy
- Real Name: Massimo Callegari
- Contact:
Hi Chris
That's a RGB panel with ws2801 strips controlled by a Pi. The wiring details are in the QLC+RPi user guide PDF that you should have ?
In any case there's plenty of information if you search for Raspberry+ws2801 with google
For example:
https://www.youtube.com/watch?v=ch0sNUbO9loiamchrislaurie wrote:I cannot seem to find the details on how to connect a string of ws2801 pixels to the SPI bus on the raspberry pi and control them through the pi. I am not having success so I will detail what I have done and would like to hear if anybody else have done it successfully and give me some pointers.
That's a RGB panel with ws2801 strips controlled by a Pi. The wiring details are in the QLC+RPi user guide PDF that you should have ?
In any case there's plenty of information if you search for Raspberry+ws2801 with google
For example:
I take you're not using the official QLC+RPi image cause this step is not needed in my image.iamchrislaurie wrote:1. I have enabled the spi bus on the pi using raspi-config and verified it is there with lsmod
Have you tried to use universe 1 instead ? If it works, then I'll see what's wrong in starting from a higher universeiamchrislaurie wrote:6. I defined SPI as universe 3 output and created a 7 x 7 RGB panel - gives me 49 pixels for the string.
-
- Posts: 58
- Joined: Mon Apr 27, 2015 11:27 am
- Real Name: Chris Laurie
Hi Massimo
Thanks for the details. The pi user guide I received does not have those diagrams. But it is the same diagrams I found when I went looking
I use the Raspbian OS and then compile from sources. I am working on building a single console, controller device for our community theatre association.
It works now. I carefully checked all the wiring again and realised that I was connecting to the wrong clock and data pins on the pi. On the pi2 one must count from the top down and not from the bottom up like I was doing.
I was able to reliably crash the system - right out to reboot. If I create a RGB panel of 12x12 or larger (I was testing with 15x10) then calling either plasma, single colour or gradient crashes the pi to reboot. What happens is that the signal for all the pixels goes out on SPI line because all the pixels do change, but then the pi crashes and reboots.
One thing I did notice is that the fixture definition does not split universes, the number of addresses goes up to 450. I assume this is because of the spi bus. How many pixels can one drive via the spi bus?
Cheers
Chris
edited for clarity
Thanks for the details. The pi user guide I received does not have those diagrams. But it is the same diagrams I found when I went looking
I use the Raspbian OS and then compile from sources. I am working on building a single console, controller device for our community theatre association.
It works now. I carefully checked all the wiring again and realised that I was connecting to the wrong clock and data pins on the pi. On the pi2 one must count from the top down and not from the bottom up like I was doing.
I was able to reliably crash the system - right out to reboot. If I create a RGB panel of 12x12 or larger (I was testing with 15x10) then calling either plasma, single colour or gradient crashes the pi to reboot. What happens is that the signal for all the pixels goes out on SPI line because all the pixels do change, but then the pi crashes and reboots.
One thing I did notice is that the fixture definition does not split universes, the number of addresses goes up to 450. I assume this is because of the spi bus. How many pixels can one drive via the spi bus?
Cheers
Chris
edited for clarity
- mcallegari
- Posts: 4807
- Joined: Sun Apr 12, 2015 9:09 am
- Location: Italy
- Real Name: Massimo Callegari
- Contact:
You're right. I recently changed the picture of paragraph 3 and I realized there is no info about specific SPI signals. I'll add more details to the guide. Thanks. (by the way, I constanlty update the PDF without renaming it, so when I release a new version, you should download the PDF as well)iamchrislaurie wrote:The pi user guide I received does not have those diagrams. But it is the same diagrams I found when I went looking
I suspect this depends on your build, cause it doesn't happen with the official image. In any case I'll check it again. When did you clone from GIT the last time ? Recently I've made some major changes to the plugins so it might depend on that.iamchrislaurie wrote:I was able to reliably crash the system - right out to reboot. If I create a RGB panel of 12x12 or larger (I was testing with 15x10) then calling either plasma, single colour or gradient crashes the pi to reboot. What happens is that the signal for all the pixels goes out on SPI line because all the pixels do change, but then the pi crashes and reboots.
In the tech preview video, I used a 16x16 panel (total 768 channels) and fixtures were correctly split into 2 universes.iamchrislaurie wrote:One thing I did notice is that the fixture definition does not split universes, the number of addresses goes up to 450. I assume this is because of the spi bus. How many pixels can one drive via the spi bus?
The SPI plugin can handle any number or pixels, as long as the SPI speed allows it. The default is 1Mhz, but I suggest to increase it at least to 2 or 4MHz.
In your case 450 channels fit into a single universe, so there's no need to split the fixtures into multiple universe.
There's an interesting calculation of SPI timings in the OLA pages: https://wiki.openlighting.org/index.php/OLA_LED_Pixels
-
- Posts: 58
- Joined: Mon Apr 27, 2015 11:27 am
- Real Name: Chris Laurie
I realised later that it should not split because it fits into one universe. I'll pull from git, recompile and update here.
A question, if you do put in a bigger panel and it splits over multiple universes, how do you link the spi to multiple universes? Do you just turn it on in both? (pi is dismantled at the moment so can't check if it is eve possible).
BTW the frequency update of the SPI output plugin does not seem to stick. If I change it to anything else but 1Mhz it shows up as 1Mhz when I open the screen again. So I am not sure if the frequency was updated or not.
A question, if you do put in a bigger panel and it splits over multiple universes, how do you link the spi to multiple universes? Do you just turn it on in both? (pi is dismantled at the moment so can't check if it is eve possible).
BTW the frequency update of the SPI output plugin does not seem to stick. If I change it to anything else but 1Mhz it shows up as 1Mhz when I open the screen again. So I am not sure if the frequency was updated or not.
- mcallegari
- Posts: 4807
- Joined: Sun Apr 12, 2015 9:09 am
- Location: Italy
- Real Name: Massimo Callegari
- Contact:
SPI accepts only contiguous data, so QLC+ provides it by merging the universes (if more than one needs to be transmitted)
So for example if you have 2 universes, and universe 1 has 30 empty DMX channels at the end, they won't be transmitted at all.
I'll have a look why the frequency doesn't get saved. Thanks for spotting it.
So for example if you have 2 universes, and universe 1 has 30 empty DMX channels at the end, they won't be transmitted at all.
I'll have a look why the frequency doesn't get saved. Thanks for spotting it.
-
- Posts: 58
- Joined: Mon Apr 27, 2015 11:27 am
- Real Name: Chris Laurie
OK I'm pretty sure that the reboot crash is due to a large voltage swing. I have the voltage up to about 5.5v and then when I select one of the three full (all pixels) then the voltage suddenly drops below 4.6 and that I think causes the crash.
This is all running of a breadboard as a test so the wires are thin and maybe not connecting perfectly. I will build the matrix first with proper soldered, decent gauge power lines then check the voltages.
I may need a better power supply - or more than one.
This is all running of a breadboard as a test so the wires are thin and maybe not connecting perfectly. I will build the matrix first with proper soldered, decent gauge power lines then check the voltages.
I may need a better power supply - or more than one.