Skip to content
/ Lux Public

Light Control System for Photography Studios for the Gumstix Platform

Notifications You must be signed in to change notification settings

katshup/Lux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

***************************************** Setup Instruction *************************************************
=============================================================================================================
This document serves as a setup instruction for users to build up their own Light Dimmer System. There are
two major parts for this document: Hardware setup and software setup.
-------------------------------------------------------------------------------------------------------------

  ====================
||                    ||
||   Hardware Setup   ||
||                    ||
  ====================

list of hardware:
         ---------------------------------
        |                                 |
        | TSL2561 light sensor       x 1  |
        | 5v Stepper motor           x 1  |
        | AA Batteries               x 8  |
        | H-Bridge Transistors       x 1  |
        | Light Dimmer               x 1  |
        | Gumstix(with power cord)   x 2  |
        | Bluetooth modules          x 2  |
        | LCD touch screen           x 1  |
        | serial cable               x 2  |
        | wires                           |
         ---------------------------------

for single Gumstix board mode:

1.  attach LCD screen to the consoleLCD-vx board and then attach the CPU board to the consoleLCD-vxboard.

2.  connect light sensor to the board via i2c as follows:
                            i2c
        ------------------------------
        | (   )  (   )  (Vin)  (GND) |
        |                            |
        | (   )  (   )  (SCL)  (SDA) |
        ------------------------------
    and also ground the addr pin of light sensor.

3.  connect motor to Gumstix board via AC97 and H-Bridge Transistors for motor driver.

        GPIO  28 - pink wire
        GPIO  29 - blue wire
        GPIO  30 - orange wire
        GPIO  31 - yellow wire

            AC97
        ------------------------------
        | (VCC)  (30 )  (29 )  (GND) |
        |                            |
        | (31 )  (   )  (   )  (28 ) |
        ------------------------------

      The H-Bridge must be connected to the battery and must share a common ground with the Gumstix.
      The red wire on the motor must be connected to the battery as well.

4.  attach motor the the light dimmer.

5.  connect serial cable with the middle serial port socket.

6.  plug in DC power for Gumstix board.
-----------------------------------------------------------------------------------------------------------

for two gumstix boards mode:

1. connect the light sensor to the Slave Gumstix instead of the Master Gumsitx.

2. attach Bluetooth antenas to both Master and Slave Gumstixs.

The rest hardware setting is the same as the single Gumstix board mode.



  ====================
||                    ||
||   Software Setup   ||
||                    ||
  ====================

for single Gumstix board mode:

1.  open terminal, enter /km folder and run the Makefile to
    compile luxVal.ko kernel module.

2.  enter /lightSensor folder and run the Makefile to compile
    light3 program for reading lux values.

3.  enter /motor folder and run the Makefile to compile motor.ko
    kernel module.

4.  enter /untitled folder and run the qmake command to create a Qt
    project, open Makefile and replace paths under INCPATH with:
    -I/ad/eng/courses/ec/ec535/gumstix/oe/cross/arm-angstrom-linux-gnueabi/include/c++ \
    -I/ad/eng/courses/ec/ec535/gumstix/oe/cross/arm-angstrom-linux-gnueabi/include/c++/arm-angstrom-linux-gnueabi \
    -I/ad/eng/courses/ec/ec535/gumstix/oe/cross/arm-angstrom-linux-gnueabi/include/c++/backward \
    -I/ad/eng/courses/ec/ec535/gumstix/oe/cross/arm-angstrom-linux-gnueabi/include/c++/bits \
    -I/ad/eng/courses/ec/ec535/gumstix/oe/cross/arm-angstrom-linux-gnueabi/include/c++/debug \
    -I/ad/eng/courses/ec/ec535/gumstix/oe/cross/arm-angstrom-linux-gnueabi/include/c++/ext \
    -I/ad/eng/courses/ec/ec535/gumstix/oe/qt/include/QtCore \
    -I/ad/eng/courses/ec/ec535/gumstix/oe/qt/include/QtGui \
    -I/ad/eng/courses/ec/ec535/gumstix/oe/qt/include/QtNetwork \
    -I/ad/eng/courses/ec/ec535/gumstix/oe/qt/include \
    -I/ad/eng/courses/ec/ec535/gumstix/oe/qt/mkspecs/qws/linux-arm-g++ -I. -I. -I. -I.

5.  run the Makefile to compile GUI program.

6.  open minicom, use rz -bZ command to transfer /luxVal.ko, light3,
    motor.ko, and untitled to the Gumstix board.

7.  run the setupNoBlue.sh script and wait for GUI to show.

---------------------------------------------------------------------------------------------------------
for two Gumstix boards mode:
1.  setup bluetooth on both Gumstixs:
    +On the Master Gumstix
        i. Open /etc/default/bluetooth, set PAND_ENABLE = true and PAND_OPTIONS= “--listen -M --role=NAP”

        ii. Open /etc/network/interfaces configure the bluetooth network interface as following:
            auto bnep0
            iface bnep0 inet static
            address 172.16.0.1
            netmask 255.255.255.0
            network 172.16.0.0
            broadcast 172.16.0.255

        iii. Type “/etc/default/bluetooth restart” to restart the bluetooth module

    +On the Slave Gumstix
        i. Open /etc/default/bluetooth, set PAND_ENABLE = true and \
            PAND_OPTIONS= “--connect XX:XX:XX:XX:XX:XX --persist”

        ii. Open /etc/network/interfaces configure the bluetooth network interface as following:
            auto bnep0
            iface bnep0 inet static
            address 172.16.0.2
            netmask 255.255.255.0
            network 172.16.0.0
            broadcast 172.16.0.255

        iii. Type “/etc/default/bluetooth restart” to restart the bluetooth module

2.  enter /bluetooth/client/folder and edit the macro BDADDR_SERVER to have the MAC address of the server, values must be typed in right to left order
    run the Makefile to compile client program and load it to the Slave Gumstix.
    type client& to start the service after server program had started. (We do not need the client program under
    /lightSensor/ folder.)

3.  enter /bluetooth/ folder and edit the macro BDADDR_CLIENT to have the MAC address of the client, values must be typed in right to left order
    Run the Makefile to compile server program and load it to the Master
    Gumstix and it should be started by the setup.sh script.

4.  Compile the rest of the files and load them to the Master Gumstix as in single board mode.

5.  run the setupBluetooth.sh script and wait slave Gumstix to show "connection successful" and the Master
    Gumstix should show the GUI shortly.

About

Light Control System for Photography Studios for the Gumstix Platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published