Light Commander (#27109)

Light Commander (#27109)
Web Site:
Office: (916) 624-8333
Fax: (916) 624-8003
Sales: (888) 512-1024
Tech Support: (888) 997-8267
Light Commander (#27109)
The Light Commander is a multi-output user programmable power controller. Originally designed for use
as a light controller on the Parallax ELEV-8 Quadcopter, it is equally well suited for any application
requiring the switching of high current under programmable control. Based on the proven technology of
our BASIC Stamp 1 microcontroller, this product is both simple to use and incredibly versatile in its
 Simple to program with PBASIC
 Two programmable I/O ports
 Five high power outputs (MOSFET)
 Adjustable voltage sensor
 Regulated 5 V output for external devices
 Onboard switch with programmable functions
Key Specifications
 Power Requirements: 6–18 VDC @ 8 mA (idle)
 Power outputs: Port 3 = 4 A Port 4,5,6,7 = 2 A
 Communication: Standard BASIC Stamp 1 programming port
 Dimensions: 1.9 x 1.5 in (50 x 38.4 mm)
 Operating temperature: 0 to +130 °F (-18 to +54 °C)
Application Ideas
 Intelligent lighting, animation, and control
 Remote control and scale lighting systems
 Night flying of multirotors and other model aircraft
Copyright © Parallax Inc.
Light Commander (#27109)
v1.0 3/5/2013 Page 1 of 8
The Light Commander has five high-power MOSFET outputs available to switch heavy loads. One output
has twice the power of the others for applications that require unusually high surge currents like DC
motors, rocket squibs, or solenoids. In addition to the high-power outputs, the board provides two
undedicated I/O ports from the microcontroller. The applications for these ports are only limited by your
imagination, creativity, and ability to program new functions. On the ELEV-8 we connected one port to
the Auxiliary Channel of our R/C receiver to read PWM. This allows us to select different light patterns
that we’ve programmed into the board during flight by simply turning a knob on the transmitter. We’ve
used the second port to activate all kinds of other devices like our bomb drop servo and camera shutter.
The I/O ports are laid out in a standard servo pin format and there is a jumper available to feed modest
amounts of +5V power to external devices. We have also included an on-board adjustable battery sensor
that can trigger any event that you program. We have often used this to flash lights or activate a piezo
buzzer when the battery voltage gets low. Lastly, we have a push button switch available that can be
programmed for anything from simple On/Off functions to selecting different programs within the BS1
memory. The Light Commander was designed for maximum versatility so it adapts easily to a multitude
of applications.
Testing your Board
The Light Commander comes pre-installed with a demo program that allows you to test the operation of
the board and any external loads that you might like to attach. Refer to the Board Layout below to
connect a battery or other power source to the board. Once power is connected, pressing the push
button switch will start the program. You should see a series of ten lighting animations displayed on the
LEDs. Notice that there is a number next to each LED. These numbers correspond to the actual BS1
port numbers as well as the numbers printed next to each set of pins on the output connector. When an
LED is lit, the MOSFET for that port is turned on and power is available at the output pins. This Demo
Program will allow you to verify that the board is operational. A printout of this program is included on
the last page of this document for your reference. It is also available for download on our site.
Analyzing this program will help you to understand the basic programming techniques used with the
board and serve as a template for writing your own programs.
Board Layout
Copyright © Parallax Inc.
Light Commander (#27109)
v1.0 3/5/2013 Page 2 of 8
Writing and Loading Your Program
The Light Commander can be programmed for almost any application by writing and installing your own
program. The on-board BASIC Stamp 1 (BS1) microcontroller is programmed with PBASIC using the
BASIC Stamp Editor, a free download from If you are not familiar
with writing programs for the BS1, you should first study the documentation on our BS1 page and then
review the Light Commander sample programs. You will find that only a few simple commands are
required for most applications. Sometimes the easiest way to start your first program is to modify an
existing one to suit your needs.
To load a new program into the Light Commander, you will need the BASIC Stamp 1 Serial Adapter
(#27111). If you want to download your program via USB, you will also need a USB to Serial Adapter
Connect the programming adapter to the three-pin programming port in the upper left hand corner of the
board as shown below. Note that the “>>” symbols on the board and the adapter must be aligned for
correct polarity. Apply power to the Light Commander board and then follow the standard programming
procedures provided with the BASIC Stamp Editor to download your program.
CAUTION: Disconnect everything attached to the Output Connector before
programming to avoid inadvertent activation. Under no circumstances should
high-current or mechanical devices (motors, solenoids, etc.) remain connected
during programming.
Copyright © Parallax Inc.
Light Commander (#27109)
v1.0 3/5/2013 Page 3 of 8
BASIC Stamp Port Assignments
Below is a list of port assignments that you will need to program the BS1. Note that Port 0 is used by
both the battery level sensor and the push button switch. This is possible because the switch is generally
only used to make a program selection or activate the board at startup when the battery is at full power.
Once your program initializes and starts to run, it will normally not be looking at the switch so there is no
conflict in sharing the port. Note that you can use the switch to simulate a low battery condition when
you are developing your software.
Switch/Batt Level
I/O Port 1
I/O Port 2
Output 3 **
Output 4
Output 5
Output 6
Output 7
** Port 3 has two MOSFETs in parallel and can handle much higher current. This port is recommended if
one of your load requires high surge currents like motors or capacitive loads.
Using the I/O Ports
Two of the BS1 bidirectional I/O ports (1 & 2) are brought out to connectors for general use. Each
connector has three pins and is arranged in a servo-type configuration as shown below.
These ports offer a multitude of options for control of the Light Commander and for its monitoring of
external commands and events. For example, these pins can be monitored for feedback from external
devices or to receive PWM commands from a radio receiver or microcontroller to change what the Light
Commander is doing. Used in the opposite direction, these ports can send commands or coded
information to an external device. Almost anything the BS1 is capable of doing can be communicated to
and from other devices through these ports.
The center pin on both ports can optionally be connected to the regulated +5 V supply by inserting the
small 3 mm jumper provided (See Figure-1). Note that if the jumper is installed, BOTH ports receive the
+5 V power. By default this jumper is not installed (seated on only one pin), because of the risk of
overloading the power supply or allowing external power from being fed back into the board.
CAUTION: Improper use of this option can damage both the Light Commander
and anything it is connected to. Do not install this Jumper unless you are
absolutely certain that you understand the consequences.
Copyright © Parallax Inc.
Light Commander (#27109)
v1.0 3/5/2013 Page 4 of 8
Limitations On +5 Volt Power
The +5 volt regulator in the Light Commander can provide modest amounts of power to external devices.
How much power is largely dependent on the battery voltage and the type of load that you attach. The
board utilizes a linear LDO regulator which means that the regulator has to dissipate any voltage drop
across it as heat. As a result, the higher the applied voltage, the more heat is generated (power =
voltage dropped times current). The ability to dissipate this heat is what limits the power the regulator
can supply safely. At low input voltage, the regulator is rated for several hundred milliamps. However,
with high input voltage, the limit drops to about 100 mA. When considering your load, keep in mind that
some kinds of devices have high surge currents and should be avoided. We have experienced no trouble
with smaller motors such as servos when operating on low battery voltage.
Light Tool for the Light Commander
During the development of the Light Commander, we found that the most cumbersome task during
programming was constantly needing to compute what decimal value to enter into the “PINS” command
to get the light display we wanted. In an effort to simplify that process for you, we have written a simple
Windows program to compute the number based on your clicking on a simulated LED display. This
program is called Light tool; Light_Tool.exe is available for download on the 27109 product page. This
program does not require installation. It is a single executable file that displays in a window on top of
the BASIC Stamp Editor when it runs. To use it, simply click on the LEDs you wish to turn ON or OFF and
enter the number displayed into your “PINS” command.
The Light Tool program also has a second function that will save you considerable time if you are using
the Battery Voltage Sensor. If you click the “Mode” button on the Light Tool and select “Trip Voltage”,
you will go to a screen that helps you calculate the voltage needed at the board’s Test Point to calibrate
the voltage sensor. Calibration requires that you be able to accurately measure the battery voltage and
the Test Point voltage, so a digital voltmeter is recommended.
Once you have measured the exact battery
voltage, enter it into Light Tool. Then enter the
Trip Voltage that you desire. Finally, move your
voltmeter to the Test Point and adjust the
board’s Level Adjust potentiometer until the
meter reads the Set Level calculated by Light
If you do not have the equipment necessary to
make these voltage measurements, it is also
possible to make the level adjustment by writing
a short program that monitors the sensor circuit
(Port 0) and lights an LED when the Trip
Voltage is reached. Before you can use this
procedure, you will need to apply the exact trip
voltage you desire to the battery input. This is
actually the most accurate way to set the trip
point, but it does require a precise variable
voltage supply.
IMPORTANT: If you are not using the Voltage Sensor feature, turn the Level Adjust
fully counterclockwise to avoid accidental triggering.
Copyright © Parallax Inc.
Light Commander (#27109)
v1.0 3/5/2013 Page 5 of 8
Resources and Downloads
Check for the latest version of this document, free Light Tool software, and sample programs on the Light
Commander product page. Go to and search “27109”.
Board Dimensions
Copyright © Parallax Inc.
Light Commander (#27109)
v1.0 3/5/2013 Page 6 of 8
BASIC Stamp® Example Code
The Demo Program below is preloaded into the Light Commander. This is a BS1 program written with the
BASIC Stamp Editor. The editor is a free download from
' {$STAMP BS1}
' Demo Program sequences ten different led patterns
' Press the switch to start the display sequence
DIRS = 248
'Set ports 3-7 to Outputs
'Ports 0-2 default to Inputs
SYMBOL loops = B0
SYMBOL dly = B1
'Loop counter
'Delay time
BUTTON 0,0,0,0,B0,1,main
GOTO waithere
'Wait here for button press
PINS = 0
'Clear then blink LED3 5 times
FOR loops = 1 TO 5
FOR loops = 1 TO 5 'Flash all LEDs
PINS = 248
PINS = 0
FOR loops = 1 TO 5 'Rotate pairs
PINS = 192
PINS = 96
PINS = 48
PINS = 144
FOR loops = 1 TO 5 'Rotate around center
PINS = 88
PINS = 168
FOR loops = 1 TO 5 'Vertical pairs
PINS = 144
PINS = 96
Copyright © Parallax Inc.
Light Commander (#27109)
v1.0 3/5/2013 Page 7 of 8
FOR loops = 1 TO 5 'Horizontal pairs
PINS = 48
PINS = 192
FOR loops = 1 TO 5 'Rotate single right
PINS = 16
PINS = 32
PINS = 64
PINS = 128
FOR loops = 1 TO 5 'Rotate single left
PINS = 128
PINS = 64
PINS = 32
PINS = 16
FOR loops = 1 TO 5 'Rotate right with center
PINS = 24
PINS = 40
PINS = 72
PINS = 136
FOR loops = 1 TO 5 'Rotate left with center
PINS = 136
PINS = 72
PINS = 40
PINS = 24
GOTO main
Copyright © Parallax Inc.
Light Commander (#27109)
v1.0 3/5/2013 Page 8 of 8
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF