Mini Lighting Control System

MIDI Lights

Drawing on material from my power electronics class as well as from a lighting control textbook, I designed and built a system to control a set of LEDs through a MIDI keyboard. The LEDs are wired in series and driven by a buck converter operating in discontinuous conduction mode to allow for constant current flow.

Hardware

This project consists of three main hardware stages. The first stage is a standard boost converter to take my lab kit's 5V supply to an 18V output that is used to power the LEDs and control circuitry in further stages. The second stage is the control panel for the project. A MIDI keyboard communicates with a PSoC (programmable system on a chip) through a laptop computer. The PSoC displays pertinent information and creates the control outputs for the final stage. The third stage is the power and control of the 7 LEDs.

This stage is a buck converter operating in discontinuous conduction mode (DCM), powering a load of 7 LEDs in series. MOSFETs connected to each LED can create a short across each one individually, creating 0 current (and thus 0 brightness) in that light. The current across the non-shorted LEDs is kept constant by adjusting the duty cycle of the buck converter as the LEDs go in and out of series. This duty cycle is calculated by the PSoC in tandem with the on/off signals for each MOSFET. The MOSFETs are operated at 100Hz and different duty cycles to acheive different LED brightnesses.

Software

To the left is the top-level software schematic for the PSoC. Shown on the top row, the SleepTimer and USBFS components handle accepting MIDI input from the laptop computer. Additional C code determines what keys are pressed to control the PSoC's outputs. Typical lighting control panels store sets of brightnesses (or "scenes"), which can be selected to display on the lights. Buttons on the MIDI keyboard can be used to control the stored and displayed scenes.

When the panel is in program mode, holding down a key on the MIDI keyboard ramps the brightness of a status LED (located on the PSoC). When the key is released, the current brightness is stored for the current scene. This is achieved by comparing a custom slow rising and falling waveform to a fast triangle wave (the WaveDACs) to create a PWM brightness waveform.

The output DO1 is a PWM waveform that controls the buck converter's duty cycle; DO2-DO8 control the 7 MOSFETs, and SLED_1-SLED_8 are status LEDs located on the PSoC.

Technical Documentation

My final project report below contains additional details and calculations for the circuit and software. The following github repository also contains the full PSoC code that controls the circuit.

Your browser does not have a PDF plugin

Download