UART, GPIO and numbers

A place where updates of QLC+ activities and technical articles are posted as if it was a blog
Post Reply
User avatar
mcallegari
Posts: 4446
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

Since when QLC+ was ported to the Raspberry Pi, a lot of feedbacks came into the project and it is now clear that many people are interested in DIY solutions.
Many topics have been discussed in the forum, from touchscreen displays to colorful usages of the 40 IO PINs now offered by RPi model B+ and RPi 2.
A Raspberry Pi can indeed act like a mini PC, but much of its "DIY power" is in its SPI, I2C, GPIO and UART IO.

So I decided to stop the QLC+ 5 developments for a moment and dedicate some time to cover a couple of "hot" topics, introducing 2 new plugins: UART and GPIO.

For those who build from sources, they can already be found on GitHub.
All the other users will have to wait for QLC+ 4.9.2 to be released, which will happen later this month.
Keep in mind that these plugins will not be available on the desktop versions.

UART Plugin

Although still possible, it is nowaday rare to see a RS232 interface on modern PCs (remember those DIN9 connectors ?)
So unless you specifically buy something like this (and hack the DIN9 to a DMX connector...), the new UART plugin is focused on working on embedded devices like the Raspberry Pi or similar, by reproducing the DMX signal on the Tx/Rx PINs.

The reference device with which I tested the plugin is this: DMX interface for Raspberry Pi
dsc05853-600x600.jpg
The BitWizard team kindly donated a couple of samples of their boards to the QLC+ project. Thank you !

Please note that they have 2 models, with different pricing. One with and one without a FTDI chip.
The FT245 model, mounts a FTDI chip, so you might think that it works out of the box with QLC+. Well, no.
The usage they had in mind with the FTDI version, was to use a Raspberry Pi + the FT245 hat as a "Enttec Pro" compatible adapter.
Basically they wrote a software using the bare metal programming technique, which doesn't provide a full operating system, but just the stricly necessary binary to flash onto a SD card to implement a specific usage.
So basically, this usage has nothing to do with QLC+, which instead runs on a full Debian OS.
You can indeed use the RPi+FT245 solution via USB with QLC+ running on a PC or on another Raspberry Pi. Exactly like if you were using a USB-DMX adapter.

For now the UART plugin supports only data output and in any case the BitWizard board doesn't support simultaneous input/output.
The board works out of the box and the only thing to tweak in the QLC+ RPi image is the data direction which, by hardware default, is set to input.
Setting the output direction can be done in this way (just add these lines in the /etc/init.d/qlcplus file)

Code: Select all

echo 18 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio18/direction
echo 1 > /sys/class/gpio/gpio18/value
GPIO Plugin

This long awaited plugin is finally here !
With GPIO PINs you can do many things and this new plugin is a starting point for ideas and discussions.
For example, those who built foot pedals destroying a USB keyboard :), well, now they can use this plugin natively on the Raspberry Pi, just by wiring a few buttons.

The reference schematics used for tests are the following. (to electronic guys...please don't laugh :D)
Output
Output
Input
Input
As you can see, very easy stuff, even for a software guy like me, struggling to make it on electronics exams at school :)

For now the plugin supports very basic digital states (high/low) either in input or output.
Depending on the feedbacks I will receive, more developments can go into this plugin, for example to have PWM output, encoder readings, or even more complex usages I might not even think about right now.

Project numbers

Last but not least, I'd just like to share a few numbers of the QLC+ project.
This is a pure self-satisfactory section of this article (kidding ;)) simply to say that the project is incredibly active and constantly growing each month.
Even if he doesn't read this, I would like to thank again Heikki Junnila, original creator of the QLC project. Without him, all this would not have been possible.

130000+: visits on the website (6000+ each month)
64000+: views of the official YouTube videos
10000+: posts on the forum
3000+: downloads per month (counting qlcplus.org and SourceForge)
3000+: changes to the QLC+ sources (an average of 1000+ per year)
40: contributors to the project sources (but many more if we count fixtures)

So a big thank you to everyone who contributed to these results !
User avatar
mumbles
Posts: 113
Joined: Thu Jul 16, 2015 4:39 am
Location: Central USA
Real Name: Justin

Cann't wait to try this out! Ill probably try out GPIO's this weekend. My plan is to trigger scenes with motion sensors and photo beams. To make light shows interactive.

Keep up the good work Massimo!
OSX 10.10.5 QLC+ 4.9.1
Surface Pro4 Windows 10
Raspberry Pi B OLA 0.95
Raspberry Pi 2B QLC+

Swisson XMt-350
Chauvet RDM2Go
Enttec Pro Mk2
ultraDMX Micro
FTDI USB-RS485-WE-1800-BT XLR

Korg nanoKONTROL2
Korg nanoPAD2
User avatar
mumbles
Posts: 113
Joined: Thu Jul 16, 2015 4:39 am
Location: Central USA
Real Name: Justin

If the PWM was active I wonder how well an ultrasonic or GEO sensors would work to track a person across a stage automating Spots or chaser scenes for back lighting?

Also PWM would be really nice just for encoder use!
OSX 10.10.5 QLC+ 4.9.1
Surface Pro4 Windows 10
Raspberry Pi B OLA 0.95
Raspberry Pi 2B QLC+

Swisson XMt-350
Chauvet RDM2Go
Enttec Pro Mk2
ultraDMX Micro
FTDI USB-RS485-WE-1800-BT XLR

Korg nanoKONTROL2
Korg nanoPAD2
SherwoodBC
Posts: 6
Joined: Sat Jan 14, 2017 5:09 am
Real Name: Duncan Smith

While you are at the Serial Port changes, is it possible to have an option where the break at the start is skipped? As long at QLC leaves mark time between packets (MTBP) which is at least several byte times long then this would be sufficient for an embedded project to detect the frames. Make life a lot easier on Arduino projects trying to receive it.
doughadfield
Posts: 30
Joined: Mon Nov 06, 2017 4:40 pm
Location: Herefordshire, UK
Real Name: Doug Hadfield

I've been using the RPi version of QLCPLUS for a while now, and it's so powerful it amazes me. The RPi can be used as a passthrough wifi to DMX controller, but with QLCPLUS intellegence, so the workflow is as follows:
boot the Pi - it automatically comes up into wifi passthrough mode (input set to E1.31 on the wifi address, output set to UART). Run QLCPLUS on laptop, with output set to E1.31. Laptop qlcplus is now driving the lights through the Pi, which is acting as DMX interface.

Once the workspace has been configured and is working right, simply get onto the Pi web page from the laptop and download the workspace directly to the Pi. The whole show can now run natively from the Pi, and the laptop can be shut down and put away. the Pi web interface can be accessed from a tablet or phone, to operate the virtual console.

The above flexibility and functionality is truly amazing!! Particularly for gigging bands like ours, where we don't have dedicated lighting guy, and laptops get in the way.

I'm an engineer by trade, so I made up a very cheap and easy uart to DMX adaptor, using a MC3487 chip (https://www.ti.com/lit/ds/symlink/mc3487.pdf) which cost less than £1 and can drive four separate DMX links from the Pi (single universe, but four cable daisy-chains). There are no components to worry about other than simply the chip itself (and perhaps a decoupling capacitor across the power pins) so it is incredibly simple and cheap to get going.

So, all we need now is for the XY pad to be supported on the web interface, and we're golden!! :-))

Thanks again to Massimo and all involved in this brilliant project

Doug
zuboches
Posts: 11
Joined: Sat Feb 23, 2019 12:38 pm
Real Name: Sergey

Good afternoon, comrades.
Tell me please, does anyone have experience connecting the button.

Please tell me how to use the plugin from Massimo.
How do I make it so that I can switch the light scenes with the button.
Please give a hint?
Post Reply