LANcube - a multispectral and multiangular sensor for the light at night


User's Manual


Martin Aubé1, Ph.D. (PI)

1 Cégep de Sherbrooke, Sherbrooke, Québec, Canada

July 24, 2019

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Go to LAN prototype page

1.  Abstract

LANcube (LAN3) is a new device intended to sample the multispectral and multidirectional properties of the direct artificial light at night into the urban or natural environment (indoor or outdoor). We expect that it will become a powerful tool to foster new research in the fields of the impact of artificial light at night on human health and natural environments. LANcube is a cube having on each of its face four sensors of various spectral response in the visible range (red, green, blue and clear). Each band has been calibrated in a way to deliver the integrated fluxes. Thanks to its multispectral capabilities, the sensor can provide an estimate of the illuminance, of the correlated color temperature (CCT), the Melatonin Suppression Index (MSI), the Induced Photosynthesis Index (IPI) and the Star Light Index (SLI). The minimum light level detected is 0.005 lux. LAN3 is based on arduino open source hardware so that it can be replicated by anybody. It comprise a real time clock, a remote RF control, a micro-SD card to store the data, a GPS module and a temperature/humidity sensor. LAN3 can be operated in automatic sampling mode or in manual sampling mode.

2.  Hardware

In the actual LAN3 version, only the a usb connector can be found on the backward face of the cube. That mean that we use the radio frequency remote control to manage the operating modes. Also, the micro SD card, is inside the box, so it is necessary to open the box lid to access the data. This choice was made to render the LAN3 as waterproof as possible. But in its actual version, the system have not been rated for underwater applications.

2.1  Components list

The system consists of the following items:

Component Quantity
Cole parmer watch glass 25mm diameter 6
CR 2032 lithium battery 1
M3 Male Female brass pcb spacer hex stand-off pillar 20mm long 4
Sandisk Ultra 16Gb Micro SDHC UHS-1 1
USB B soldering male connector 1
Jumper wire ribbons cables box 1
6 pin Male jumper assembly 1
3 pin Male jumper assembly 2
2 pin Male jumper assembly 3
4 pin Male jumper assembly 1
7 pin Female jumper assembly 8
4 pin Female jumper assembly 3
10 pin Female jumper assembly 1
RGB LED 5mm 4 pins 1
22AWG multiwire electric wire -
USB 2.0 Type A Female panel mount waterproof connector 1
Rubber feets 4
TCS 34725 color sensor 6
USB A male to USB A male cable 1
2 Amp phone charger 1
RF 2272-M4 Remote Control Wireless Switch Portable Keychain Kit 4 Push Buttons Decoding Receiver Board 1
GPS shield RB-lte-125 for arduino 1
DS3231 AT24C32 IIC Module Precision Real Time Clock Memory Module 1
SMA Male Plug GPS Active Antenna 1
Elegoo MEGA 2560 R3 Board 1
AM2302/DHT22 Digital Temperature and Humidity Sensor 1
TCA9548A I2C Multiplexer from adafruit 1
MicroSD card breakout board+ from adafruit 1
2.54mm Standard Computer Jumpers 2
M2 self tap 8mm screws 11
M2 self tap 5mm screws 12
M3 self tap 8mm screws 2
Carlon's jonction box (6 X 6 X 6 JUNCTION BOX) part number E989RRR-UPC 1
PLA 3D FILAMENT BLACK 1.75MM -
Silicone glue transparent -
Super glue -

Enclosure

2.2  Main enclosure

We use the Carlon's jonction box (6 X 6 X 6 JUNCTION BOX) part number E989RRR-UPC. On the center of each face, we drill a 1.5 in diameter hole. On the rear face, we drill a 7/8 in diameter hole 1 inch above the bottom face to install the USB connector. On the same face about 1 in below the top, we drill a 3/16in diameter hole for the RGB LED. This face will act as a reference for the orientation of the LANcube. Assuming that in a road runner mode, this face is pointing backward.

The rear face will hold the sensor #2, the right face the sensor #3, the front face sensor #4 and the left face sensor #5. Sensor #6 is on the bottom face while sensor 1 on the top (lid).

2.3  3D printed components

Sensor pellets

We print 6 sensors pellets. This part will hold the sensors and will be glued from inside the box to act as plugs to the 1.5 in holes.

Internal support

The internal support is an openwork structure that will fit loosely into the box. This structure support the various components. All of them are screwed on the support except for the GPS antenna and the RF push buttons receiver board that are secured with tyraps.

3.  Wiring

  • Real time clock
    • SCL -> SC0 on multiplexer
    • SDA -> SD0 on multiplexer
    • VCC -> 5V
    • GND -> GND
  • Multiplexer
    • VIN -> 5V
    • GND -> GND
    • SDA -> SDA arduino (pin 20)
    • SCL -> SCL arduino (pin 21)
    • SD0 -> SDA real time clock
    • SC0 -> SCL real time clock
    • SD1 -> SDA sensor 1
    • SC1 -> SCL sensor 1
    • SD2 -> SDA sensor 2
    • SC2 -> SCL sensor 2
    • SD3 -> SDA sensor 3
    • SC3 -> SCL sensor 3
    • SD4 -> SDA sensor 4
    • SC4 -> SCL sensor 4
    • SD5 -> SDA sensor 5
    • SC5 -> SCL sensor 5
    • SD6 -> SDA sensor 6
    • SC6 -> SCL sensor 6
  • Relative humidity & temperature sensor (DHT22)
    • Pin 1 (left) -> 5V and 10k resistor
    • Pin 2 -> arduino pin 25 and other end of the resistor
    • Pin 4 -> GND
  • MicroSD card breakout
    • 5V -> 5V
    • GND -> GND
    • CLK -> arduino pin 52
    • DO -> arduino pin 50
    • DI -> arduino pin 51
    • CS -> arduino pin 53
  • GPS shield
    • Pin 6 -> arduino TX1 (arduino pin 18)
    • Pin 5 -> arduino RX1 (arduino pin 19)
    • Jumper RXD on pin 6
    • Jumper TXD on pin 5
  • Remote switch receiver
    • GND -> GND
    • 5V -> 5V
    • D0 -> arduino pin 27 (button D) but (button C with the adafruit black remote pad1)
    • D1 -> arduino pin 29 (button C) but (button A with the adafruit black remote pad1)
    • D2 -> arduino pin 24 (button B) but (button D with the adafruit black remote pad1)
    • D3 -> arduino pin 26 (button A) but (button B with the adafruit black remote pad1)
    • Ant -> solder a single core wire measuring 23.8cm (1/4 wavelength). (already installed on the adafruit receiver)

1 Note that the best would be to change the code of the arduino to keep the same assignement for each button with the adafruit pad (A=automatic mode, B=Manual mode, D=take a manual measurement)

  • RGB LED
    • Pin 1 (RED) next to the longest -> arduino pin 45
    • Pin 2 (GND) -> 1k resistor -> GND
    • Pin 2 (GREEN) -> arduino pin 47
    • Pin 3 (BLUE) -> arduino pin 49
  • TCS34725 light sensor
    • LED -> white wire -> GND
    • SDA -> yellow or orange wire -> multiplexer SD
    • SCL -> blue or green wire -> multiplexer SC
    • GND -> black wire -> GND
    • VIN -> red wire -> 5V

4.  Cable Assembly

5.  Mechanical Assembly

5.1  Assembling steps

  1. Put small numbered labels next to each sensor position inside the box and put the corresponding labels on the back of each sensor.
  2. Screw four hexagonal 20 mm brass posts under the internal structure.
  3. Screw the sensors on each pellet with M2 5mm self tap screws
  4. Glue the pellets on the relevant side of the cube using silicone glue. Pay attention to the differences in each face of the cube. There are actually 3 different sides. For each type of side, there is a particular pellet. Some pellets have small bumps on a side to shim the pellet in order to have sensor on a perpendicular plane. This is because that the enclosure lateral faces are variable in thickness or slope.
  5. Screw the Arduino mega on the internal structure with M3 8mm self tap screws.
  6. Insert the GPS shield on the arduino mega.
  7. Screw in the gps antenna
  8. Screw the multiplexer on the internal structure with M2 8mm self tap screws.
  9. Screw the RTC chip on the internal structure with M2 8mm self tap screws.
  10. Screw the sd card breakout on the internal structure with M2 8mm self tap screws.
  11. Screw the humidity/temperature sensor on the internal structure with a M2 8mm self tap screw.
  12. Secure the RF remote switch module to the internal structure with a tyrap.
  13. Secure the GPS antenna to the internal structure with a tyrap.
  14. Insert the usb connector into the 7/8 hole of the enclosure.
  15. Insert the RGB LED in the small hole in the enclosure and glue it with superglue.
  16. Glue the 4 rubber feet under the enclosure
  17. Clean the watch glasses and glue them in each pellet with silicone glue.
  18. Connect all cables to the sensors and arduino according to the wiring section.
  19. Connect the lower sensor
  20. Connect the USB B connector to the arduino
  21. Insert the internal structure
  22. Connect all remaining sensors
  23. Insert the microSD card in the sd card breakout
  24. Screw in the enclosure lid.

5.2  Components positions on internal structure

6.  Setting up the LANcube for measurements

7.  Operating modes

7.1  Manual mode (Mode 0)

This mode is activated by pressing button B about 2 seconds. When activated the LED will turn blue until you take a measurement. During the measurement, the LED is off. At the end of the measurement the LED will come back blue until next measurement. In the manual mode the data acquisition is started using button D of the remote control (press about 2 seconds on button D). When the request is detected, a sequence of measurements will be taken. Thanks to the auto gain and integration time algorithm, it is suggested to take a couple of measurements after powering up the LANcube. This will allow the auto gain and auto integration time algorithm to optimize the accuracy of the measurements. Note that auto gain and auto integration is looking to 5 sensors (excluding sensor 6 of the bottom face). As long as the system is not powered off, this startup procedure do not have to be done again. Change in gain or integration will be signaled by a purple LED blink.

7.2  Automatic mode

Automatic mode is intended to sample the temporal variation of the light at night. To activate the automatic mode, press about 2 seconds on button A. The LANcube use variable integration time and variable gain to optimize accuracy while keeping the integration time as low as possible. In that mode, the LANcube will not wait between each measurements. We suggest this mode when it is time to use the LANcube on top of a car (road runner mode) in order to map the light field over large territories or to record temporal variation of the LAN in a room. To leave the automatic mode simply press on the B button for at least 3 seconds. You will know that you leaved the automatic mode when the LED will turn blue. The system will first finish the ongoing measurements and then wait for either a manual measurement or a return to automatic mode. During the automatic mode, a short red blink will be done at the end of each sensors acquisition.

7.3  Green LED blink

A green LED blink indicate a problem with the SD card. You absolutely need to service the instrument because no data will be stored in such case.

7.4  Double red LED blink

Such behavior indicate that the GPS do not have a good connexion with satellites. Note that in such a case you can notice double red blinks. This is because that there is a red blink at the end of the acquisition of the six sensors while the GPS connexion problem red blink happen after each sensor reading.

8.  Downloading the data

Data format

The data is structured in the following way for each equivalent column number:

9.  Shutdown of the LANcube

Before powering off the LANcube, you should leave the automatic mode if activated. Simply press about 2 seconds on button B. Be sure that the LED do not blink anymore before powering off. You may have to wait about 5 seconds before powering off the cube after switching off automatic mode. This will let enough time for the current measurement sequence to be completed. Otherwise there is a risk of data file corruption on the micro SD card and it is possible that you will lose access to the data stored on the card.

10.  Failure of the clock battery

In case of failure of the real time clock battery, the LANcube will lost its date and time after power off. Then the only way to restore the correct time is to:

  1. unplug the LANcube's usb cable
  2. remove the real time clock battery
  3. put back a new battery
  4. plug the usb cable
  5. start the arduino IDE application
  6. open the latest version of the LANcube software
  7. upload the code to the LANcube
  8. open the IDE terminal (the magnifier icon on top right)

Note that there will always have a little shift between the real GMT time and the time stored on the arduino. This correspond to the time between the compilation of the code and its upload on the arduino. The time stamp is actually created at the compilation step.

GlossyBlue theme adapté par David Gilbert et Martin Aubé
Powered by PmWiki