LightBox Controller
Light Box Controller
Documentation of the User Interface to control a light box
Getting started
The light box has an array of 8x8 LEDS connected into four banks of 2x8, controlled by a pulse width modulator. The frequency, phase and duty cycle of the LEDs can be set. This guide is designed to introduce the user interface controlling the light box and walk through the available controls.
Prerequisites
- A light box, 5V power supply and USB cable. (Note 5V, not 12V)
Figure 1 Light Box
- A current installation of DevWare.
- Optionally a Demo2X board.
Configurations
There are two configurations that can be controlled. Direct USB and using the Demo2x board. It is preferable to control the light box via the USB however, if this fails to work for some reason, the Demo2X might be a useful backup.
This is the USB configuration:
Figure 2 USB Configuration
By removing the back cover and attaching a Demo2X board this configuration can be achieved.
Figure 3 Demo2X Configuration
The connection to the light box
Connect the lightbox to the PC in either configuration. Connect the 5v power to the light box too. Open the DevWare folder. Double click on LightBoxController.exe. If it's not present, it's necessary to upgrade to the current version of DevWare.
Ideally all the lights on the light box should flash and the user interface will come up with no errors. Refer the Trouble shooting section if you are unable to see light flashing.
Main User interface
This section describes the user interface that controls the light box LEDs.
Single Monochrome color
The light box will come up in a basic mode where the duty cycle of the all the LEDs can be controlled together. By changing the duty cycle the white light will change in intensity of all the LEDs. There is no update or apply button. If the interface is connected to the light box changes will show immediately.
Frequency control
The frequency of all the LEDs can be controlled using the top slider. Set the duty cycle to 50% and slide to the left for the lowest available frequency and should see it flashing.
All frequencies that can generated by the light box are available. They are non-linear. There are many more low frequencies than high ones. To get the best frequency setting slide to the approximate frequency and then use the left and right arrow keys to search for the best setting.
Color control
Click on the color radio button.
Three duty cycle sliders appear, which can be used to set a color.
Phase control
The phase effects when the LEDs are pulsed. With 0% phase the pulse will start at the beginning of the cycle, a 50% phase will start half way through the cycle.
The above settings will look white at high frequencies but in fact the light box is red for the first 33% of the cycle, green for the next 33% and blue for the last 33%.
Setting phase and duty cycle of totaling more than 100% is honored. For example, a duty cycle of 20% and a phase of 90% will start at 90% into this cycle and end 10% through the next cycle.
LED selection
So far all setting have been applied to all LEDs, it is also possible to select four bank 2x8 LEDs individually. Change the selection from 'All LEDs' to LEDs by sector. Use the radio buttons to select a particular bank that needs to be changed. The controls for duty cycle and phase are same as controlling all the LEDs. Select the bank, then select color / monochrome and then set the sliders. Repeat to set up each bank.
Animation
A pattern can be created by varying the setting for each sector that can be scrolled across the lightbox. The pattern can be made to move one sector to the left or right at the given frequency. The last sector will be rotated to the first sector so that the pattern repeats. Most controls are disabled during animation. Only the frequency controls and pause are allowed. An animated pattern can be saved and will animate immediately on load (See saving setting). Note: animation is not supported in script mode. Script mode only loads one shot pattern and then exits.
Saving settings
The file menu allows save, save as and open. These will save all the current user interface setting to file <filename>.LightBox. The settings are held in xml so it is possible to edit them using a text editor. When a file is opened its settings will be immediately applied to the light box when connected.
Light Box Menu
This describes the Light Box menu
Connect
This option will have no effect if Light Box is not connected . If light box is not connected, it will search for a light box and on finding it will apply the current user interface settings to it. This can be used if the light box is physically connected to the PC after the user interface is already running. It can be used if some temporary problem causes the light box to disconnect.
Disconnect
This disconnects the light box. It's a good idea if there is no need to physically disconnect the light box but wish to keep modifying the light box setting to save as a file or apply later using connect.
Test pattern
This displays a test pattern on the light box. It can be used to verify the light box is still connected and that all the light box channels are functional.
Modes
This describes other ways which the Light Box Controller can be used.
Offline mode
With no light box connected and selecting ignore on the failure to connect error the user interface can be run and used to create setting files which can be applied later or used in a script.
Script mode
Using the command LightBoxController.exe –n <filename>.LightBox the executable will apply the settings in the given file to the light box and immediately exit without starting a user interface allowing it to be used in a script for moving through a series of test patterns.
Trouble shooting connecting to the light box
If an error message similar to this appears Trouble shooting section can be skipped if this is the case and move onto the user interface controls.
- You will find there are errors for both USB and Demo2X. It searches for both and if it finds neither will report all errors.
- Check the voltage on your power supply one more time. It should be 5V. If it's 12V power supply you have destroyed the light box. Find another light box and keep the 12V power away.
- Check the pc device manager. See if the Demo2X or mcp2221 (USB configuration) are visible devices. If they are not look to a hardware issue.
- If you are connecting via a USB and you have a Demo2X available, try it. If it works it verifies the hardware is working. You can use the 'retry' button rather than restarting the application to search for the attached devices.
- Try all the USB ports on your machine. USB 2 / 3 issues can cause issues. Again use the 'retry' button.
- If you are still having problems over USB you may need to upgrade the USB3 firmware.
- If none of that works, try swapping hardware to identify the problem ideally with a known working system.
Revision History
2018 March 21 | John Neave | First draft. |
2018 March 22 | John Medalen | Footer now indicates internal-only usage. |
2018 April 5 | John Neave | Added animation section and updated all pictures. |
2019 July 25 | skum ar | Implemented review feedbacks from Sesha and Stella. |