Use GPIO pins to trigger scenes

All the topics related to QLC+ on the Raspberry Pi
User avatar
karrika
Posts: 60
Joined: Tue May 12, 2015 6:50 am
Real Name: Karri Kaksonen

I was a bit unhappy with the mechanics and re-designed the board. The big chips are optocouplers. They don't make them small due to the need for isolating high voltage sparks.

Image

The schematics is on the discohat.com site.
Last edited by karrika on Fri Nov 13, 2015 8:27 pm, edited 3 times in total.
User avatar
mcallegari
Posts: 4461
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

Looks really nice ! Thanks Kicad :)

Looking forward to test the first samples ;)
User avatar
karrika
Posts: 60
Joined: Tue May 12, 2015 6:50 am
Real Name: Karri Kaksonen

Today I finally had a moment to try out the board.

1. I had to change the GPIO pins a bit around to get them all recognized. No problem.
2. After reboot the GPIO pins were not working. The data was saved properly. In order to get them to work again I had to go to inputs, change pin 14 from "not used" to "input". After this all the pins were working again.
3. The DMX output did not work. I got the message that setting custom speed on port ttyAMA0 is deprecated. I will get an oscilloscope tomorrow to see if the baud rates are correct.

Tonight I plan to build a few protos. You have to accept a few wires as I did some mistakes in the design. But I will fix them for the 1st production run.
User avatar
mcallegari
Posts: 4461
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

karrika wrote:2. After reboot the GPIO pins were not working. The data was saved properly. In order to get them to work again I had to go to inputs, change pin 14 from "not used" to "input". After this all the pins were working again.
I think you need to use a workspace so the GPIO configuration will be saved in it.
Please try and let me know if it works as it should. Otherwise there's an issue and I'll fix it.
karrika wrote:3. The DMX output did not work. I got the message that setting custom speed on port ttyAMA0 is deprecated. I will get an oscilloscope tomorrow to see if the baud rates are correct.
Uhm..this is weird. I fought quite a while against that error (which is kernel dependent) but in the end I resolved it with this block of code:
https://github.com/mcallegari/qlcplus/b ... t.cpp#L111

Are you using my image or did you build QLC+ yourself ?
User avatar
karrika
Posts: 60
Joined: Tue May 12, 2015 6:50 am
Real Name: Karri Kaksonen

The workspace contained low pins set for input "2,3,4,5,6,7,8,9,10". This may have been traces from some old experiment. Removing these definitions from autostart.qxw fixed the problem.

I am using your image. Perhaps I should start to build this myself also so that I could better help in finding bugs.

I also tried to enter the desired baud rate in /boot/config.txt but it did not help.

At startup I get two messages from QLC
uart-pl011 3f201000.uart: no DMA platform data
uart-pl011 3f201000.uart: UARTWidget sets custom speed on ttyAMA0. This is deprecated.
User avatar
karrika
Posts: 60
Joined: Tue May 12, 2015 6:50 am
Real Name: Karri Kaksonen

I just had my DMX polarity wrong. The baud rate was ok despite the error message. I am still doing small changes to DiscoHAT. But it will soon be ok.

Merry Xmas

Edit: I have now tried Massimos latest image with DiscoHAT. To me great delight both the push buttons and the DMX output works. I set the baud rate in /boot/config.txt. Actually the output works much better than the USB dongle DMX variants I have. The USB dongles sometimes have a very small glitch (black) between the scenes. The UART based DMX output has no anomalies so far.

The GPIO pins also work direct after boot.

I still need to test the LED strips.

For the final version I will add switching diodes to protect lock-ups to GPIO pins for the SPI pins also.
User avatar
mcallegari
Posts: 4461
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

karrika wrote:Merry Xmas
Merry Christmas to you ! :)
karrika wrote:Edit: I have now tried Massimos latest image with DiscoHAT. To me great delight both the push buttons and the DMX output works.

That's great news !
karrika wrote:I set the baud rate in /boot/config.txt.
Uhm...why ?
Is 'init_uart_clock=16000000' wrong ? That's what made the BitWizard hat to work out of the box, and we're still talking about a final baud rate of 250000bps.
What value did you have to set ?
MIght be interesting for me to understand exactly how that parameter works. I guess it's the clock speed in hertz, and I suppose the Linux kernel can scale it down to the requested bitrate in its internal scheduler.
User avatar
karrika
Posts: 60
Joined: Tue May 12, 2015 6:50 am
Real Name: Karri Kaksonen

I finally got all parts to my DiscoHATs.

Massimo, could you send me your snail-mail address for receiving a HAT :D
rafksy
Posts: 2
Joined: Mon Feb 01, 2016 10:45 pm
Real Name: Adam_

Hi Karrika. Great looking board!.

This may be a little late, I've noticed from the output XLR you have drawn is 3pole. If there are any further resisions to be made to the board it would be better to have a 5 pole XLR fitted as this would conform to the ESTA E1.11-2008

http://tsp.esta.org/tsp/documents/docs/ ... 8R2013.pdf

$0.02
User avatar
karrika
Posts: 60
Joined: Tue May 12, 2015 6:50 am
Real Name: Karri Kaksonen

Thank you for the compliment.

All equipment I have access to use 3-pin DMX connectors. Perhaps the standard does not reflect what is being produced?

Besides, a DMX 3 to DMX 5 adapter at Thomann cost €3.55.

Is there any advantage of a 5 pin connector? Or does it just have 2 extra empty pins?
Lpluums
Posts: 1
Joined: Fri Dec 25, 2015 1:35 pm
Real Name: Lars pluimers

Hi Karrika,

When will you ship the boards? for a new project i would love to buy one!

kind regards!
User avatar
karrika
Posts: 60
Joined: Tue May 12, 2015 6:50 am
Real Name: Karri Kaksonen

Lpluums wrote:Hi Karrika,

When will you ship the boards? for a new project i would love to buy one!

kind regards!
I have sent out a few boards. So they do exist now in small quantities. I am testing this myself as we are working on a play. My Raspberry Pi 3 should also arrive shortly. The DiscoHAT eeprom should support it. But that has not been tested yet. It does work with Raspberry Pi 2 and the DiscoCap (without en eeprom) works with PiZero. Other models have not been tested as I own only these two.

The documentation is still not written. I hope to put together some basic examples of how to set up the GPIO push buttons and how to activate these in the Input/Output tab.

Image

Image
PeterD
Posts: 10
Joined: Sun Jun 14, 2015 8:28 pm
Real Name: Peter

I have just received my DiscoHAT board. This is a beautiful piece of kit! I am eager to begin using it (although it may take a while to find the time...). I can test it with a B+ and Pi 2.

One project I'd like to try is interfacing 0-10v analog dimmers to QLC+ via GPIOs. If possible, I'd use 4 of the DiscoHAT's isolated inputs. I realize these are designed for contact closures. but if there's a way to read varying voltages via these inputs I'd be interested to try. Otherwise, I'll use 4 free GPIO pins directly.

I've read the schematic and the datasheets for the LTV-847 and BAV70. But I confess to being much more of a software than hardware guy, and not really able to see how the R/C network and BAV70 dual diodes play in detecting button closure (are they there to provide debounce dampening?). More importantly, I cannot see how they would affect how the LTV-847 if the RJ-45 pins were presented with varying voltages.

Whether I can connect through the DiscoHAT inputs, or go directly to the free GPIO pins, I'll have to figure out what value of resistor to add so that the 0-10v is dropped down to a 0-5v range...

Peter
User avatar
karrika
Posts: 60
Joined: Tue May 12, 2015 6:50 am
Real Name: Karri Kaksonen

Hi Peter,

The diodes are for protecting the opto-couplers. They break with a 6V reverse voltage without. The RC circuit is for damping the noise on the line.

Interfacing analog dimmers needs some electronics in between. It would be easier to implement digital rotary encoders.

I have been pretty busy too. Lately writing music for our next play and I also bought an O2H water light for the theater. It has DMX control also.
ElvisOwen
Posts: 1
Joined: Thu Apr 28, 2016 2:31 pm
Real Name: Elvis Owen

As per my knowledge it might also be nice to add support for digital rotary knobs. They take just 2 GPIO pins. We would need it for our theatre as a master volume control and master intensity controller.
The Raspberry Pi has two SPI interfaces that can easily be extended to handle hundreds of bi-directional GPIO pins with minimal code writing.
Another interesting thing would be to have native DMX bidirectional support using the UART pins on Raspberry Pi. Of course with properly isolated interfaces.
biffboff
Posts: 3
Joined: Wed Nov 08, 2017 3:02 pm
Real Name: Biffer Rowley

Hi - im trying to send an RGB value from an RGB sensor using your code. Do you know how to send the RGB (can you show an example) and also how do i set this up on the virtual console's button.
Im trying to set a Par Can to the RGB of what the colour sensor sees :)

thanks!
Post Reply