GBox

Lasershow

History

In 2006, grundutbildningen at the Physics department of Lund University (called UDIF back then) wanted a remote control system to facilitate the setup of their Lasershow for the public.
At that time I worked with electronics development at the department of Elementary particle physics (which later became High Energy Physics and today it’s called Division of Particle and Nuclear Physics).

UDIF contacted us and asked if we could develop this for them which we did.
The system consists of three parts: The switch keyboard, the master transmitter and the slave receiver.
Of course a firmware is required for the processors to actually do something!

The system allows for 128 units to be addressed and data is then transmitted to those units over the license free 869MHz band using a UART protocol.

The function of the master is to scan the keyboard and send the key switch sequence to the receiver which then activates or deactivates a relay and some voltages. The only extra feature available at the master is the ability to manually send address and data through its DB-9 serial port.
One rather nasty setup of the original master unit is that the keyboard switch functionality has to be programmed into the processor. It can be done through the serial port but it’s quite cumbersome.

 

2026 upgrade version

In June 2026 I was asked if I could service some of the receivers that had broken during 20 years of service. I also got the master unit so that I could test the receivers.

For obvious reasons the slave units can’t be upgraded (there’s around 50 of them and I only have a few), but there only exists 2 master units so that’s a different story. It’s also the unit in most need of an upgrade – which I gave it!

First of all the hardware got an update with a modern processor which costs a fraction of the original processor, yet delivers more features in this application. The master is now housed in a professional enclosure with custom made front and back panels.
A new user interface has been added with a rotary select knob, a play button, a stop button, a separate RGB status LED and a USB-mini port for programming and PC communication.

The original hardware required a DC-adapter for power but the new master can run on that same DC-adapter or just the power from a USB-port.
It should also be noted that the new hardware does not require a keyboard attached, it will still function with most of its features.

The new implemented firmware functions are as follows:

4 modes, normal mode (shows SEnd), macro mode (shows PGn), playback mode (Pb.x) and record mode (rEc.x)
Normal mode is the only mode available on the old hardware where the display shows what is being sent (address/data).

The new features available are the following:

  • Normal mode – use knob and buttons to send any address/data combination
  • Macro mode – any key can be reprogrammed to any address/data directly from the front panel (single macro, this replaces the ‘program keyboard’ functionality of the old keyboard)
  • Macro mode – any key can hold a sequence of max 16 keys (multiple macro). Worth noticing that reprogrammed keys are used as their new function but multi macro keys keep their original non-programmed function. A key can only be reprogrammed or macro-programmed, not both.
  • Playback mode – any of 10 program sequences can be played back, rotate the knob to select slot. White LED indicates empty slot, red LED is occupied
  • Record mode – selects between 10 slots in either key mode (records hardware key switches) or HF mode (records the actual traffic), LED indication the same as in playback mode. Allows a command sequence to be recorded into 1 of 10 program memory slots. Each slot can hold up to 3000 key flips during a maximum of 6553 s or about 1 hour 49 minutes.
  • Record HF mode – records actual traffic, not key switches. That means a key with a macro recorded functions as a macro sequence, not as a separate key. Any incoming RF traffic is also recorded so ‘eavesdropping’ on a show from the old master can be recorded into memory.

The RF-module used in the current devices is obsolete and on the verge of extinction so more of the original slaves can not be built.
However, along with support for all existing slave units, the new master will also support new slave units using a different RF module (same band, updated protocol, modern available and cheaper hardware).

The PC communication has also been updated to support bulk upload and download to allow offline editing of the device memory.
A python script is supplied to allow exporting and importing data from an excel file where the timeline can be edited.

Schematic, firmware, manuals and tools are available for this project.

User manual for master.

Firmware and software

All firmware and software development has been created with the help of Claude AI. If you want to change any of the software but isn’t too familiar with C++ or Python, load the markdown files (.md files) into an AI chat and let the AI help you to alter the source code.
Start the session with something like ‘Hi, can you read the markdown files and familiarize yourself with the project?’

Programming

The firmware should be compiled in Arduino IDE with DxCore installed and the AVR128DA64 MCU selected (DA family)
Also select ‘Wire->2 Wire’ mode (any of them) and ‘SerialUPDI – Normal: 230400’ programmer option.
Open the box and move the jumpers on J2 onto the alternate position to program the MCU and move them back to the current location for communicating with the MCU.

The USB port uses a CH340 USB-to-serial bridge and should be recognized as such in Windows.

 

 

 

 

 

 

 

However, with some bad luck it can be hijacked as a Braille reader under a LinUSB device.
If it’s identified like that, download the correct driver from https://www.wch-ic.com/downloads/CH341SER_ZIP.html , uninstall LinUSB and then install the correct driver.

Editing

A script is supplied which can bulk upload or download the device memory from the master.
The script is written in python and requires pyserial for the communication.
Python and pyserial are installed by default on most if not all Linux distributions but not in Windows.
If you don’t already have it, get the latest windows install at https://www.python.org/downloads/windows.
That should install the python interpreter as well as the pip script. Make sure to add Python to your PATH variable.
Open a command window and install pyserial with ‘pip install pyserial’.

When python, pyserial  and the com port works, open a command window to where you unpacked all lasershow tools and write ‘python lasershow.py --help’ to see how to use it.

If all program slots and macros of the master are used, the transfer can take a couple of minutes at the most but it is usually quicker than that.

Once a show has been downloaded, the excel-file can be directly edited with regards to timeline, address and data.
Note the use of an optional alias file which will help identify which device belongs to which address.
It’s only used as a visual aid in Excel and never exported or stored in the master.
The alias file has to be created manually, so only a template is supplied.

 

 

 

 

 

 

 

Use the same lasershow-py script to upload the edited excel-file back to the master and it becomes available as a playback program.
Worth noticing is that the upload will overwrite existing device memory.