Flexible Low Cost Lighting Control System

  • Warning: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in microsites_omniture_nodeapi() (line 248 of /var/www/drupal/platformd6/sites/all/modules/custom/microsites_omniture/microsites_omniture.module).
  • Warning: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in microsites_omniture_nodeapi() (line 248 of /var/www/drupal/platformd6/sites/all/modules/custom/microsites_omniture/microsites_omniture.module).
  • Warning: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in microsites_omniture_user() (line 258 of /var/www/drupal/platformd6/sites/all/modules/custom/microsites_omniture/microsites_omniture.module).
  • Warning: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in microsites_omniture_user() (line 263 of /var/www/drupal/platformd6/sites/all/modules/custom/microsites_omniture/microsites_omniture.module).
Average: 3.5 (49 votes)
3.510205
Design Entry Diagram Upload: 

Flexible Low Cost Lighting Control System

Scott A. Henry
scott_henry@ymail.com

Abstract:
This document details the design and implementation of a flexible low cost lighting control system with multiple communication ports for Bluetooth, Xbee Modules, and standard AC control methods.

Introduction:
The need for a flexible low cost lighting control system can benefit the average consumer. Having a system with security aid features like random on and off times, or texts to your mobile phone that certain motion sensors have gone off. Also energy friendly features that would turn on every other path lights instead of all of them when no movement was detected by near by sensors. Another great feature would be to take advantage of Android devices, easy Ethernet setup, and other wireless modules. Making it a more robust system that would not be limited by wires. Also a device that uses mobile devices and current PC interfaces would not need hardware for graphics. This to then can reduce the hardware cost because intricate GUI's for the user interface can be moved to the owner's device saving on the overall price of the hardware. Lastly a novelty feature can be a holiday light control add-on, interfacing music and controlling lights based on key frequency.

Design:
Using the Mach X02 Pico Development kit as a basis for the design a fairly complex system can be controlled by this device for a large number of both local and remote controllable nodes. Also Adding a daughter card with an I2C bus will be make the design flexible to accommodate both small setups and also larger lighting layouts during the initial development. The design is unique in the fact that it uses a flexible node based network that can accommodate multiple lighting type devices as well as sensors for feedback from a single node, or just a one to one per node setup. The address/data format will be a 16-bit long value with a 8-bit device address and a 8-bit data field. This give the ability to send and receive more then just a simple On/Off message, affording remote temperature and other sensor based data to be retrieved. Having wired and wireless communication as built in options in the control interface gives a flexible design as well as flexible price.

The daughter card will have the other components of the system on it all communicating back to the main development board via the I2C bus which will be implemented through the Mach XO2 EFB(Embedded Feature Block). This block will have the I2C, SPI and a Counter/Timer available to the Wishbone bus that will be controlled by the LatticeMicro 8 microcontroller. Here it will communicate to the remote and local nodes and device, via a user defined relationship table for a more complex logic structure to the system. In short a, look-up table for all the programed devices on the network. Another resource the system will need is a RTC IC, the DS1307 was chosen because it uses UART like the rest of the communication devices and can share one of the NXP SC16IS762 Dual UART to I2C IC that also add 8 GPIO's as well.

The remote nodes will be interfaced with Xbee modules to added both lighting control and sensor data feedback for the main controller to interpret. The Xbee modules also add a great deal of range possibilities, because of there ability to act as repeaters. The wired nodes will have a RS485 based communication making it possible to run a string of device on the same wire run. A generic driver board will be designed to handle the AC control, and both Xbee and RS485 communication, also two inputs will be designed into each board to handle sensor. This single board will reduce overall manufacturing costs, even though the upfront design will take more work implementing.

Next the user interface, there are two parts to this portion of the system. First is the simple 4 character LCD and 4 capacitive touch pads that will display a address of the control I/O and its state. This will have a menu driven layout using the capacitive touch pads as its inputs. Both interfaces will be controlled via VHDL Wishbone Compatible Controllers. Currently the LCD is about 25 LUT's The primary interface will be through a PC or Android OS based device. Here layout control will be visual and controllable as well. For the Android based communication Bluetooth will be used as one form of connection. The second will be through USB or possible if room permits as well as price, Ethernet based control via a web based application via a Lantronix Port unit. If the web based app can be achieved it would also allow other web enabled devices to use the control interface. This is one of the benefits to using the Mach X02 CPLD, because it can have a MCU plus the logic fabric to handle a complex control system. One other main external source is needed and that is a RTCC circuit for time keeping. This is needed not only for being able to set your lights on a timer, but also for an away mode that can be randomized to turn on and off lights at random once a light sensor is triggered or a certain time is set. This feature will help protect the house from unwanted visitor when your away.

The embedded system will be a combination of both uC and basic logic. The uC will handle the incoming and outgoing data, but pass that onto to a user created relation table. Also it will handle the RTC timer and have an address that will have the a relationship spot in the user created table to turn on and off lights depending on what day and time it is. The 8-bits of data will hold information for different types of devices such as devices that have 2 states like lights or 4 states devices like fans. The below is a preliminary sample of the 8-bit structure.

| bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 |
On/Off devices | Day to turn On | Time of Day On | On/Off |
Analog Based | All 8-bits will hold the data |
4-state devices | Undefined currently | Current State |
Motion Sensor | UDC | Last Time Sensor Tripped (24Hr) | Last State | Current State |

Lastly, other options that could be added are, more local nodes directly attached to the main board, a larger LCD read out for a more user friendly interface, and finally a full 4x4 keypad giving easier user setting features. After some basic development with this setup a full PCB could be created to include the features of the daughter card and a larger CLD such as the Mach XO2-2000 or even the Mach XO2-7000, which would still keep the overall design a low cost System.