Sky Temperature Sensor

The first sensor to go on my instrument platform may be an infrared sky temperature sensor. The sky temperature can be used to determine if the sky is clear or cloudy and when the sky is clear the temperature is a measure of the total column water vapor above the sensor.

The sensor electronics consists of two modules from SparkFun Electronics,  an evaluation board for the MLX90614 (SEN-10740) and a Breakout Board for FT232RL USB to Serial chip (BOB-00718). Along with the MLX90614 the evaluation board has a ATMEGA328 microcontroller. This is the same chip that is used in the Arduino Uno. The microcontroller reads the serial data from the MLX chip and converts the data into a temperature reading sent out the microcontroller serial port. The FT232RL chip on the breakout board connects the serial data to a USB. I want all my sensors to connect with USB to the computer since the USB provides both a data connection and 5VDC power.   Both of the modules are mounted on a piece of anyboard with square pin strips. The anyboard is then mounted to a L shaped aluminum bracket to attach to the case. The case is a weather proof plastic electrical junction box. It looks like a lot of my sensors will be mounted in this type of box. The USB cable exits the bottom of the box to prevent rain water from entering the box.  The sensor chip itself was removed from the evaluation board and mounted in a hole in the box lid.

irsensor1

irsensor2

When I got the temperature sensor module last winter I  tested it outdoors and found that it would not report temperatures below 0F properly. I contacted SparkFun and they promptly fixed the software problem and sent me a new module with the corrected software. At the same time I noticed that the module would stop working when the ambient temperature dropped below -10F. At first I thought this was a problem with microcontrollers internal oscillator. I added an external crystal oscillator but that did not fix the problem. The module also output the temperature readings several times a second and did not output the device temperature. I wanted the device temperature and the data rate to be slower so I modified the software. After those changes I noticed that it was failing at a much higher temperature, about 60F. Inspecting the code I found a loop without a timeout. Putting a timeout in the loop prevented the lockup but the temperatures reported were corrupt. A bit of trouble shooting showed that the timing of the SM bus was causing the problems. With that fixed the module reports both the IR temperature and the ambient temperature without locking up. Currently the temperatures are reported every 1o seconds. I did not want to wait too long to see if it was working. For the final version 1 reading per minute should be enough.

skyplot

Above is a plot from the first evening the sensor was outside for a test run. This was the evening so you can see the ambient temperature drop off during the night and rise just after sunrise. The first bumpy part of the sky temperature was when the sky was cloudy. The smoother part is when the sky was clear.

There is still a lot of software work to do. The readings reading have to be plotted and put on a web page and the sensor needs to be calibrated so that total column water vapor can be inferred from the sky temperature reading when the sky is clear. I also want to look into determining clear or cloudy from the readings.

References:

Forrest Mims ” Measuring Total Column Water Vapor by Pointing an Infrared Thermometer at the Sky. http://journals.ametsoc.org/doi/pdf/10.1175/2011BAMS3215.1

Melexis MLX90614 Infrared Thermometer http://www.melexis.com/Infrared-Thermometer-Sensors/Infrared-Thermometer-Sensors/MLX90614-615.aspx

SparkFun Electronics https://www.sparkfun.com/

Advertisement
This entry was posted in Amateur Science, DIY, Electronics, environmental monotoring, Imbedded Software, Software. Bookmark the permalink.