Menu |
Prof /
Cosqm-users-manualCoSQM v1 - a color hack to the SQM-LE for Light At Night SensingUser's Manual
Martin Aubé1, Ph.D. (PI) Mia Caron1 1 Cégep de Sherbrooke, Sherbrooke, Québec, Canada January 31, 2020 <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>. AbstractWe developped the CoSQM, a portable device which aims to sample the multispectral properties of the artificial light scattered by the atmospheres. We expect that it will become an useful tool to estimate the light pollution and its impact on the environment. CoSQM is a cylinder shaped instrument composed of a filter wheel with five different spectral transmittance in the visible range (clear, red, blue, green and yellow) that is standing on a step motor in front of a Sky Quality Meter. The device comprise a Raspberry pi open source linux computer so that it can be reproduced by anyone. CoSQM also comprise a GPS module and a camera module. The instrument can be operated remotely via the ssh protocol and the data may be accessed via an integrated web server. This device should better show how humankind can affect their own nocturnal environments. Color detection capability is an important improvement over existing non-imaging detectors in the context of the drastic change in the color of light pollution provided by the transition to the LED technology. Operation modesFixed installationThe CoSQM was designed to be used in a permanent installation mode. When the night twilight appear, the instrument perform multiple scand of the filterwheel in order to find the center position of the filters. This procedure is repeated every day to be sure that the optical alignment is optimal in case of an abnormal shutdown of the system (e.g. a power failure). Note that unclean shutdown of the system may endup in file system corruption. In such a case the system will fail to restard properly and then will need to be serviced. As a routine step, the CoSQM is restarted around noon local time. This is done automatically by the crond service (see Crontab section below). That time should be set correctly according to the region of installation of the instrument to be sure that it falls during day time around noon. Note that the time zone of any CoSQM must be set to GMT. This is why that reboot time should be changed according to your installation site. Ponctual experimentAs said, the CoSQM was not designed to be used that way. But by knowing its behaviour, it is possible to "hack" a bit the system to let it believe that it is an fixed installation. All we have to do is to simulate a fake twilight. This can be done by using a diffuse light with the proper light intensity in front of the CoSQM window. Optimally, this light should be white. A phone in flashlight mode may be an appropriate system. But you need to put a diffuser over the CoSQM window before lighting it.
HardwareComponentsThe system consists of the following items, but it would certainly be adapted to a different list of items with minor corrections.
3D printed componentsThe printed parts needs a total filament mass of 290 grams and take about 2 days to print on a Prusa I3 mk2 printer. We recommend the use of PLA material in black color. Black is better to attenuate the light inside the instrument. You can find the 3D print link of each piece below the image of each one. Overall view Filter wheel and filters disposition
Lids
Camera stand
Light shade
Top support
Bottom support
Optical propertiesSpectral sensitivities of the different channels
Angular response of SQM in a linear scaleThe angular response is determined using figure 4 of the report on Sky Quality Meter of Pierantonio Cinzano (2007) Power consumptionThe CoSQM typically drive 5 W to operate. Size and weight
WiringPinout informations and GPIO pinout map
Stepper motor pin outThe pin numbers below refers to figure "RPI GPIO pinout map".
The 5V power is provided from the power supply of the CoSQM. Real time clock wiringWe are using the DS3231 RTC module to keep the date and time after powering off the system. The RTC pins should follow the following configuration The pin numbers below refers to figure "RPI GPIO pinout map".
LEDA red LED is installed under the CoSQM, next to the reboot/shutdown button. This LED will blink at some point to indicate the state of the system. Of course it will not blink during measurement and at least no less than 20sec to the next measurement to get rid of any contamination of the LED to the measurements. Below are the various signals given by the LED.
LED wiringThe wiring of the LED is very simple. First it is required to solder a 330 Ohm resistor to the ground led of the LED (the shortest leg). Then the other end of the resistor must be connected to the ground of the raspberry pi (pin 9). The other lef of the LED have to be connected to the GPIO 18 (pin 12). Shutdown buttonThe shutdown button should follow the following configuration The pin numbers below refers to figure "RPI GPIO pinout map".
The RPI will reboot if the button is held for more than two seconds but fewer than five seconds and it will shut down if the button is held for more than five seconds. AssemblyOrder of parts on the threaded rod - from bottom upPlease follow this order instead of one showed in the animation below because that the order of some washers/nuts has been changed since the making of this animation.
Schematic of the CoSQM parts Animation showing the placement of the different components of the CoSQM Download the assembly video Additional details - All components
Additional details - Top lid
Additional details - Bottom lidPre-drill two holes on each side of the bottom lid with a 3/32 in drill bit. Do the same with the 4 in PVC tubing with a 9/64 in drill bit. Once all the assembly on the threaded rods is done, insert the PVC tubing over and screw two 1/2 in stainless steel metal screw in the holes. Additional details - WeldsPerform the welds in the following order :
Additional details - Ethernet wire connectionsMake the connections in the following order :
Setting up the CoSQM for measurementsInstall the instrument to point the relevant part of the sky. Normally the zenith is the direction that must be prefered. Be sure that the sky is clear from blocking structure to allow the GPS to connect correctly. One must also put some near horizon obstacles to block the direct light from impotant sources near horizon. If such source hit the optical window, there is a possibility for that light to interfere with the light coming from the sky after multiple reflection into the window. Even if the CoSQM comprise a GPS, it is not designed to be used in a roadrunner mode. The problem may arise when the system is looking if the filterwheel is correctly positionned. If the light level vary during that process, an offset in the position of the filter wheel may arise and the quality of the measurements may be affected accordingly. Starting the CoSQMCoSQM is trivial to startup. All you have to do is to plug the power connector to the grid. The RPI will then boot and will automatically startup the observation script. The data will be stored into the relevant /data directory accessible to the web server. If the ethernet cable is connected to a local network with 192.168.0.* root, you will be able to access the instrument remotely for any station in that network. You can both connect via ssh or http. Downloading the dataThe data are stored into the micro SD card of the Raspberry pi (RPI). In order to access the data, an apache 2 web server is configured on the RPI. You can browse the data simply from a webpage. You first need to plug the network cable a router in the subnet 192.168.0,* or simply to your pc network interface and then configure your pc IPV4 connexion properties. You need to set it to manual configuration mode then set the IP address, netmask and route/gateway according to the following table.
Once configured, restart your interface, open a web browser and enter the following address in the address bar. 192.168.0.100/data You should then see a directory tree and will be able to visualize the text data along with the camera images. The data is organized by year and month. You can also download all the data by using the following command on a linux command line: wget -r 192.168.0.100/data The data will be download and stored in a local directory named 192.168.0.100 Data format and sizeThe data is structured in the following way for each equivalent column number:
The radiances are calculated using equation 5 of Sánchez de Miguel et al. (2017)1 . 1Sánchez de Miguel, A., Aubé, M., Zamorano, J., Kocifaj, M., Roby, J., & Tapia, C. (2017). Sky Quality Meter measurements in a colour-changing world. Monthly Notices of the Royal Astronomical Society, 467(3), 2966-2979. The average size of a complete day of measurements is about 38 kB and the images for the same day period is 4.3 MB. Considering the available memory on the 32 GB micro SD card, it is possible to run the system without emptying the card during about 13 years. Shutdown of the CoSQMA power button is provided at the bottom of the instrument. Please never power off the instrument by unplugging directly the power cable. Sometimes, doing so may result in data corruption problems on the RPI micro-SD card. When you push the power button, a signal is sent to the RPI for a safe shutdown. You have to press the button for at least 5 seconds for a shutdown to be initiated. Please wait about a minute after pushing the power button before unplugging the power cable. Zoom in picturesPhysical installation |