Can't donate to charity?
Volunteer computer time
or Support SETI!
R&D Sponsorship Center
Fonts.com
June 2013

Home Page
Feature Archive
A&I Column Archive
Production Tools
State Marketing Data
US Marketing Data
World Marketing
Classifieds
Service Directory
Quality Assurance
3D Printing


Subscribe to Advertising & Marketing Review!
Contact Ken Custer at 303-277-9840.


Advertising in the Third Dimension


Building the A&M Review Automated Lighting Test System


by Glen Emerson Morris
Related Columns
How to Build a Robotic Test Harness for Mobile Devices
Robotic testing of mobile devices is much more affordable than testing with Selenium WebDriver. Here's how to do it.
How to Test Automated Lighting Displays
Automating the testing of automated lighting systems will take a new approach. Here's how to do it ii theory.
The Interactive Display Revolution
The Arduino microcontroller can drive everything from advanced light shows to android robots.

sensor

One of our projects over the last year has been to develop a hardware system capable of automating the testing of automated lighting systems like the Philips Hue product line. In a few years, most retail stores will feature some kind of automated lighting system, and testing these new systems will require a new approach to quality assurance.

The concept is simple. You can either pay someone to watch a lighting display run through what might be a 10 hour prerecorded light show, or, you can program a computer to monitor the light show and log the results. Unfortunately, this is easier said than done. Current software quality assurance automation tools like Selenium and QTP are limited to verifying events that happen inside a computer. Something as simple as verifying that a light can on is simply impossible without some additional hardware. Fortunately, thanks to the Arduino microcontroller, that hardware is available now. All it takes is putting the right hardware together, and doing some simple programming.

Listed below is our concept of the products requirement document. We went through a lot of components before we found a set that would do the job and were readily available.

Automated Lighting Testing System (ALTS) Product Requirements Document

Features
The purpose of the ALTS is to monitor and log lighting events. Specifically, the system must be able to simultaneously monitor the brightness and color of three different light sources and record that data, along with a time stamp, in Excel format.

Constraints
The system must be based on commonly available Arduino components, with little assembly required and a cost of under $200. One of the primary requirements for our test system configuration is that it not require any soldering to assemble. The only assembly required is plugging components into each other. Once the components are assembled, all you have to do is to plug it into a computer and download the code I've provided.

Approach
There are a number of different ways you can build a system to automate testing an automated lighting system. The usual approach is to decide on an Arduino model that's close to what you need, and then add plug-in cards called shields, to get the additional functionality you need.

We chose an Arduino because the Arduino has more sensors and add-ons available for it than any other computer. Its market is highly varied and diversified, which is both good and bad. There are 19 different Arduino models, and shields for some models won't work with other models. There's also a stacking issue. Some shields use offset connectors that make each board mount about .24" further to the side than the shield immediately under it. Three boards stacked like this and the assembly looks like the Leaning Tower of Pisa. More importantly, it won't fit any of the cases available for Arduinos with one or more shields attached. Always buy shields that stack vertically.

We chose the Arduino Mega as the microcontroller because it has the most number of inputs/outputs and the most expansion shields available of any Arduino. The Mega is superceded by the new Due model, but the Due is not as well supported at this time, and since it uses a different voltage and processor than other Arduinos, it's incompatible with many common Arduino accessories.

The issue then is what do you need to add to an Arduino to make it the perfect ALTS. It turns out you only need to add two shields; a shield to interface with the light sensors, and a shield to log the results.

The first shield type, the sensor shield is one of the most common Arduino cards. The sensor shields allows a lot of sensors to be plugged into the Mega at the same time. The Mega board only has a couple of ground and power connections to support 56 data connections. Since most sensors need one power and one ground connection each in addition to the control signal, it's the job of the sensor shield to provide one power, signal and ground I/O connection for each of the 56 data ports.

Our choice for a light sensor was the DFRobot Ambient Light Sensor. Of all of the light sensors we tested it was the most consistent in performance and it seemed to have the highest manufacturing quality. It also has a standard sensor cable socket for easy connection to the Arduino sensor shield. The sensors I bought came with their own cable. If yours don't, you can buy sensor cables from www.robotshop.com for under $2 each. (Note: these light sensors can't record color, only brightness. Color sensors will be available within months.)

The other shield needed is what's known as a data logging shield. Any test system will need the ability to record results and this shield does it for you. Data logging cards generally have three major features; they include a clock to log the time of an event, they provide a place to log the information (an SD memory card), and they stack perfectly vertically with sensor shields.

For a data logging card we chose the Arduino Mega Shield Data Logger v. 1.0 from Croatia via eBay. Nothing else came close to the features this card offers, and fortunately they have a model for the Arduino Mega. The Mega Shield Data Logger gets an A in every category, and even better the clock and logging memory features worked on the first try with code cut and pasted from The Arduino Cookbook. The card is well constructed and it with 20+ onboard LEDs it's really beautiful to watch in a dark room. To the best of our knowledge, the Mega Shield Data Logger is only available directly from Croatia. I'll update you if I find a domestic supplier. Let's hope the company's product line is picked up by Jameco or Velleman.

sensor
The complete component list is:

1 Arduino Mega $65 - above left (available from Jameco, Maker Shop, eBay)
1 Arduino Mega Shield Data Logger v. 1.0 $30 - above center (available on eBay)
1 Mega Sensor Shield v2.0 $20 - above right (most Arduino dealers)
3 DFRobot Ambient Light Sensors with cables 3 @ $8 (eBay)
1 Arduino case $20 (eBay)
Total cost $159

The only thing missing is the computer code needed to drive this test system. I'll be posting the needed code on our Website soon. To run the tests you just place the color sensors next to the lights, plug the Arduino into your desktop computer, download my code and hit Run. Test results will be written to the SD memory card in Excel format. You don't need to plug the Arduino into a desktop to reload the code each time you use the device. Once my code has been downloaded to the Arduino, just power on the device to start logging, and turn the power off to stop logging. Then transfer the SD Micro card to your desktop system. That's about all there is to it.

In the near future I'll be posting code that will allow the device to interface with one or more of the major programming languages, allowing real time testing, with the light sensor values delivered directly into automation tools like Selenium and QTP.

Our Robotic Mobile Device Test System
When we started looking at what it would take to automate testing the iPhone app with Selenium we realized that we could use the Arduino to the job in a lot less time. By using an Arduino to mechanically enter data and menu selections with a stylus, and a high definition camera with optical character recognition to extract text results it is possible to achieve about 80% of the test coverage of Selenium for less than 20% of the cost. For more information see my column How to Build a Robotic Test Harness for Mobile Devices.

Glen Emerson Morris was a senior QA Consultant for SAP working on a new product to help automate compliance with the Sarbanes-Oxley law, an attempt to make large corporations at least somewhat accountable to stockholders and the law.
He has worked as a technology consultant for Yahoo!, Ariba, WebMD, Inktomi, Adobe, Apple and Radius.




Copyright 1994 - 2011 by Glen Emerson Morris All Rights Reserved ' keywords: Internet advertising, Internet marketing, business, advertising, Internet, marketing. For more advertising and marketing help, news, resources and information visit our Home Page.


Back to top

Economic Indicators
Census 2010
Census Bureau
BEA   NTIA
Health   Labor
Commerce Dept.
More...



It's Time to Let
A Robot
Make Your Sales Pitch!
Support
Roy the Robot
Funded by Kickstarter