Page 3 of 3

Re: Use GPIO pins to trigger scenes

Posted: Fri Nov 13, 2015 8:27 pm
by karrika
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.

Re: Use GPIO pins to trigger scenes

Posted: Sat Nov 14, 2015 10:51 am
by mcallegari
Looks really nice ! Thanks Kicad :)

Looking forward to test the first samples ;)

Re: Use GPIO pins to trigger scenes

Posted: Tue Dec 15, 2015 4:25 pm
by karrika
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.

Re: Use GPIO pins to trigger scenes

Posted: Tue Dec 15, 2015 4:25 pm
by mcallegari
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 ?

Re: Use GPIO pins to trigger scenes

Posted: Wed Dec 16, 2015 2:34 pm
by karrika
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.

Re: Use GPIO pins to trigger scenes

Posted: Sat Dec 26, 2015 8:03 pm
by karrika
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.

Re: Use GPIO pins to trigger scenes

Posted: Sat Dec 26, 2015 8:03 pm
by mcallegari
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.

Re: Use GPIO pins to trigger scenes

Posted: Mon Jan 11, 2016 8:00 pm
by karrika
I finally got all parts to my DiscoHATs.

Massimo, could you send me your snail-mail address for receiving a HAT :D

Re: Use GPIO pins to trigger scenes

Posted: Mon Feb 01, 2016 11:06 pm
by rafksy
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

Re: Use GPIO pins to trigger scenes

Posted: Mon Feb 22, 2016 1:46 pm
by karrika
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?

Re: Use GPIO pins to trigger scenes

Posted: Mon Feb 29, 2016 7:33 pm
by Lpluums
Hi Karrika,

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

kind regards!

Re: Use GPIO pins to trigger scenes

Posted: Mon Feb 29, 2016 7:33 pm
by karrika
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

Re: Use GPIO pins to trigger scenes

Posted: Tue Mar 22, 2016 7:48 pm
by PeterD
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

Re: Use GPIO pins to trigger scenes

Posted: Sat Mar 26, 2016 8:19 pm
by karrika
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.

Re: Use GPIO pins to trigger scenes

Posted: Thu Apr 28, 2016 2:37 pm
by ElvisOwen
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.

Re: Use GPIO pins to trigger scenes

Posted: Wed Nov 15, 2017 5:09 pm
by biffboff
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!