The laboratory is located at Silesian Technical University, Poland, Gliwice Akademicka 16, room 319.
The lab consists of two light sources placed on top of the pyramid-shaped tower (figure 1). The tower is divided into two sections:
The user can experiment with controlling the brightness of LEDs and measuring the intensity and colour of the light.
The user needs to know:
Beginners:
Undergraduates additionally:
Masters additionally:
The main aim of the laboratory is to do different experiments with LED light. The user can start with simple PWM controlling of LED. Next, try to keep a constant level of brightness on a bright part of the model. The other aim is to keep the same level of lighting on a dark part of the model, as is on the bright side. The diagram of the main part is shown in figure 3, and diagram of LEDs connection is in figure 2
A camera gives a general view on the bright side of the tower, and the second camera at the bottom of the tower gives a view of how both parts of the ground are illuminated (bright and dark) ambient light and RGB sensors are used as sensors for measuring brightness and colour of light. The following devices are connected directly to the main I2C controller:
I/O Device | I2C address | Description |
---|---|---|
PCA9685A | 0x40h | PWM LED controller |
TCA9548A | 0x70h | I2C Extender |
In the system, there are three TCS34725 light sensors. Sensors have the same I2C addresses (0x29h) but are connected to different channels of I2C extender (TCA9548A). I2C extender address is 0x70h.
TCA9548A I2C channel | Sensors | I2C Address | Position | Input/output | Remarks |
---|
Channel 0 | Sensor TCS34725 RGB - Main | 0x29h | Bottom of brightside | Output | Main sensor of mixed light |
Channel 1 | Sensor TCS34725 RGB - DarkSide | 0x29h | Bottom of darkside | Output | Sensor of only LED light |
Channel 2 | Sensor TCS34725 RGB - Ambient | 0x29h | Top of Tower | Output | Ambient light sensor |
Channel 3 | - | - | Output | N/C | |
Channel 4 | - | - | Output | N/C | |
Channel 5 | - | - | Output | N/C | |
Channel 6 | - | - | Output | N/C | |
Channel 7 | - | - | Output | N/C |
In the system, there are two CREE dynamic LEDs. Each consists of four LED structures with two cold-white and two warm-white lightning. First LED is placed on top of the bright/openside of the tower and the second LED is placed on top of the dark/close side. The each LEDs light intensity must be appropriately controlled using PWM current controller which is separate for every white colour of each LED. ( Each PWM channel controls two LED structures with identical light colour.) As PWM controller has been used a 16-channel PWM chip - PCA9685 (Address - 0x40H). PCA9685 is connected directly to the microcontroller's I2C master interface.
Actuator | Position | Input/output | Remarks |
---|---|---|---|
Channel 0 | On the board | Input | LED0/bright side warm-white |
Channel 1 | On the board | Input | LED1/bright side cold-white |
Channel 2 | On the board | Input | LED2/dark side warm-white |
Channel 3 | On the board | Input | LED3/dark side cold-white |
Channel 4 | On the board | Input | N/C |
Channel 5 | On the board | Input | N/C |
Channel 6 | On the board | Input | N/C |
Channel 7 | On the board | Input | N/C |
Channel 8 | On the board | Input | N/C |
Channel 9 | On the board | Input | N/C |
Channel 10 | On the board | Input | N/C |
Channel 11 | On the board | Input | N/C |
Channel 12 | On the board | Input | N/C |
Channel 13 | On the board | Input | N/C |
Channel 14 | On the board | Input | N/C |
Channel 15 | On the board | Input | N/C |
; PlatformIO Project Configuration File ; ; Build options: build flags, source filter ; Upload options: custom upload port, speed and extra flags ; Library options: dependencies, extra library storages ; Advanced options: extra scripting ; ; Please visit documentation for the other options and examples ; http://docs.platformio.org/page/projectconf.html [env:d1_mini] platform = espressif8266 board = d1_mini framework = arduino lib_deps = Wire, EmonLib, Adafruit NeoPixel, Encoder,DHT sensor library, Adafruit Unified Sensor, LCD, PubSubClient, KS0108_PCF8574, CoAP simple library
You can connect your ESP8266 microcontroller via its integrated WiFi interface to the separated IoT network. Then you can communicate with other, already connected devices and even provide some information to the cloud. In details, there is a dedicated MQTT broker waiting for you. You can also set up your own soft Access Point and connect another node directly to yours.
The communication among the devices can be done using MQTT messages, exchanging data among other nodes (M2M) and you can even push them to the Internet.
Using your Node, you can access it and publish/subscribe to the messages once you connect your ESP to the existing wireless network (this network does not provide access to the global internet and is separated but please note there are other developers and IoT nodes connected to this access point:
At the same time, only one user can be programming the controller, although analysing the signal by others (unlimited number) the user has sense. Model is provided to work continuously, without service breaks.
In case of problems contact: jaroslaw.paduch@polsl.pl