sdoconnell92
Posts: 1
Joined: Tue Mar 07, 2017 2:30 am

UART Dmx board with ola

Tue Mar 07, 2017 4:05 am

Hi everyone, new to the forums and I'm hoping to get a little help.

I just picked up a pi3 and a dmx512 board from Bitwizard, this is the board:
http://bitwizard.nl/shop/dmx/DMX-interf ... -(FT245RL)

I have been trying to get it to work correctly with ola for the past few days and am having trouble getting it to show up at all as a usable device in open lighting architecure "ola". I've been following the guide on the bitwizard wiki I think to a tee to no avail. I have gotten a entec usb dmx box to comunicate with ola just fine.

So I'm hoping you guys can at least give me some things to start looking into. Below is a summary of the steps I have taken to get the board working:

Code: Select all

To summarize my efforts
- Installed raspbian using noobs method
- Removed the console and getty from the serial port
	- used raspi-config > Interfacing > Serial
		- Set login shell to be accessible over serial
			- No
		- Would you like the serial port hardware to be enabled?
			- I assumed the correct answer to this one was Yes, but I have tried both
- Install OLA with: sudo apt-get install ola
- Disable other things on UART with:
	sudo systemctl disable serial-getty@ttyAMA0.service
- Add dtoverlay=pi3-disable-bt to /boot/config.txt
- Add init_uart_clock=16000000 to /boot/config.txt
- Add the following to /etc/ola/config.txt
	/dev/ttyAMA0-break = 100
	/dev/ttyAMA0-malf = 24000
	device = /dev/ttyAMA0
	enabled = true
- Created a script in /bin named set_dmx_mode with this in it
	#!/bin/sh
	# set_dmx_mode
	if [ $# -lt 1 ] ; then 
	  echo 'on or off?'
	  exit 1
	fi

	if [ ! -d /sys/class/gpio/gpio18 ] ; then 
	   echo 18 > /sys/class/gpio/export
	fi
	echo out > /sys/class/gpio/gpio18/direction
	echo $1 > /sys/class/gpio/gpio18/value
- then called it

- Set the gpio modes with 
	gpio -g mode 18 out
	gpio -g write 18 1
	gpio -g mode 14 alt0
	gpio -g mode 15 alt0

dgordon42
Posts: 796
Joined: Tue Aug 13, 2013 6:55 pm
Location: Dublin, Ireland

Re: UART Dmx board with ola

Fri Mar 10, 2017 2:02 pm

sdoconnell9 wrote:I just picked up a pi3 and a dmx512 board from Bitwizard, this is the board:
http://bitwizard.nl/shop/dmx/DMX-interf ... b-(FT245RL)
That page is giving me a "Page not found..." error, but i did find a tutorial by BitWizard about using their DMX Board with a Raspberry Pi here.

Their methods for enabling the Serial Port on the RaspberryPi 3B seem to me to be overly complicated and out of date. I would suggest the following, both to undo what BitWizard did, and to get the Pi 3B's Serial Port working correctly.

Open the file '/boot/cmdline.txt' in a text editor with root privileges. Remove the phrase "console=serial0,11520" and/or "console=ttyAMA0,115200" if they appear in the line. The phrase "console=tty1" should be left in the line.
The file '/boot/cmdline.txt' must only contain 1 line, do not split the line when editing, and do not try to add comments.

Open the file '/boot/config.txt' in a text editor with root privileges. Undo the changes you made following the BitWizard tutorial by removing the lines "dtoverlay=pi3-disable-bt" and "init_uart_clock=16000000" from the file. These lines are not necessary, and can lead to further complications.
Check the file for any commands concerning the Pi's uart. You will need the line "enable_uart=1" in the file. If it's not there, add it. Any other uart commands should be removed. Save the file.
Verify that there are no extra uart commands in '/boot/config.txt' by running:

Code: Select all

grep uart /boot/config,txt
This command must return a single line: "enable_uart=1". If the line appears twice, or if any other un-commented lines containing "uart" are returned, remove them from the file before proceeding.

To make code and configuration settings regarding the Pi's Serial Port both future proof and common to all models of the Pi, the Serial Port should be referred to as '/dev/serial0', that's serialZero, not serialOh.
You now need to change ALL occurrences of "/dev/ttyAMA0" in your '/etc/ola/config.txt' to "/dev/serial0".

Reboot your Pi.

You Pi will now be able to communicate over it's Serial Port, which it calls "serial0".
sdoconnell9 wrote: - Set the gpio modes with
gpio -g mode 18 out
gpio -g write 18 1
gpio -g mode 14 alt0
gpio -g mode 15 alt0
I don't know where this is coming from. The Serial Port pins are GPIO 14 & 15, and are set to the correct mode for Serial Port operations by the line "enable_uart=1" in '/boot/config.txt' I suggest deleteing all references to GPIO 14 and GPIO 15 in this script.

You MUST ensure that the BitWizard dmx512 boards Serial Port connection works at 3.3V before connecting it to your Pi. I did not see any specifications about this on the BitWizard web site, but I did not go through the whole site. Most Serial Ports work at 5V, or +/- 12-15V. Connecting anything above 3.3V to your Pi's GPIO pins will most likely permanently damage your Pi. Serial Port level shifters are available if required.

Hope this helps,
Dave.

User avatar
DougieLawson
Posts: 41436
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: UART Dmx board with ola

Sat Mar 11, 2017 12:47 pm

The URL got mushed by the forum software try http://bitwizard.nl/shop/dmx/DMX-interf ... -(FT245RL)
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

User avatar
Arjan
Posts: 265
Joined: Sat Sep 08, 2012 1:59 pm

Re: UART Dmx board with ola

Wed Apr 05, 2017 6:58 pm

sdoconnell92 wrote:Hi everyone, new to the forums and I'm hoping to get a little help.

I just picked up a pi3 and a dmx512 board from Bitwizard, this is the board:
http://bitwizard.nl/shop/dmx/DMX-interf ... -(FT245RL)
This board is compatible with software that supports Enttec USB. You do not run Linux on it. Instead you use baremetal software -> https://github.com/vanvught/rpidmx512
http://www.raspberrypi-dmx.org/
Open Source DMX/RDM/MIDI/OSC/Art-Net/sACN solutions

User avatar
Arjan
Posts: 265
Joined: Sat Sep 08, 2012 1:59 pm

Re: UART Dmx board with ola

Wed Apr 05, 2017 7:03 pm

dgordon42 wrote:
sdoconnell9 wrote: - Set the gpio modes with
gpio -g mode 18 out
gpio -g write 18 1
gpio -g mode 14 alt0
gpio -g mode 15 alt0
I don't know where this is coming from.
The DMX boards from BitWizard are bi-directional. As with proper DMX, it defaults to DMX input. When you would like to use the board with the Raspberry Pi native UART (PL011) in Linux (output DMX only), then you need to set the GPIO line for output data direction (https://github.com/vanvught/rpidmx512/b ... gpio.h#L34).
Last edited by Arjan on Wed Apr 05, 2017 7:15 pm, edited 1 time in total.
http://www.raspberrypi-dmx.org/
Open Source DMX/RDM/MIDI/OSC/Art-Net/sACN solutions

User avatar
Arjan
Posts: 265
Joined: Sat Sep 08, 2012 1:59 pm

Re: UART Dmx board with ola

Wed Apr 05, 2017 7:08 pm

dgordon42 wrote: You MUST ensure that the BitWizard dmx512 boards Serial Port connection works at 3.3V before connecting it to your Pi..
The board is directly connected to the Raspberry Pi with the GPIO header.

There is no need to worry at all about any voltages.
http://www.raspberrypi-dmx.org/
Open Source DMX/RDM/MIDI/OSC/Art-Net/sACN solutions

Return to “Troubleshooting”