Introduction: A Simple Indoor Observatory

About: I do engineering design for machines and electronics but do love science, art and history.

This project will show you how to make a simple observatory with some existing and easy-acquired sensors. Indeed, I built this for one of my students. The student would like to find how does the sunlight affect the room temperature and humidity. The interested physical quantities in this project are (1) light intensity, (2) humidity, (3) temperature and (4) air pressure. With those information, you would be able to make other systems or devices to control an air conditioner, a humidifier or a heater for making a comfortable room environment.

Step 1: Preparing Sensors

You can build the circuit with the following sensors or simply buy the module boards of those sensors or module board.

1. Ambient Light Sensor TEMT6000 (Datasheet PDF)

2. Pressure and Temperature BMP085 or BMP180 (*they are old products, you may need to find other alternatives) (learning document from Adafruit)

3. Temperature and Humidity Sensor DHT11 (learning document from Adafruit)

4. UV light sensor GUVA-S12SD (Datasheet PDF)

For the uses of sensors, I have attached some reference links. You may find some useful tutorials and references on the internet.

Step 2: Preparing the Main Processor

I have chosen the Arduino Uno board to test the system and coding. However, I found that atmega328P has not enough memory to store and run the code if more sensors are added. Thus, I recommend that you can use atmega2560 Arduino board when you need more than 4 sensors.

Micro controller (MCU):

· Atmega328P board for Arduino

· Or Atmega2560 board for Arduino

Step 3: Preparing the System

I would like to measure some physical characteristics at outdoor and indoor. Finally, I connected the following sensors to an Atmega2560 board.

Indoor environment:

1. Pressure and Temperature BMP180 x 1 pcs

2. Temperature and Humidity Sensor DHT11 x 1 pcs

Outdoor environment:

1. Ambient Light Sensor TEMT6000 x 1 pcs

2. Pressure and Temperature BMP085 x 1 pcs

3. Temperature and Humidity Sensor DHT11 x 1 pcs

4. UV light sensor GUVA-S12SD x 1 pcs

You may find that I used different sensors for measuring the pressure. It is just because I don’t have BMP180 module board when I was building the circuit. I recommend that you should use the same sensors if you need to have a precise measurement and a fair comparison.

Step 4: Preparing the Data Logging

In addition, I would like the device to store the data without connecting to a computer. I added a data logging module with a real time clock. The followings are the items for data logging and wires connection.

· SD card

· CR1220 coin battery

· Data logging module for Arduino (learning document from Adafruit)

Step 5: Preparing the Tools

The followings are some tools or devices that would be needed to build the circuit.

  • 30AWG Wrapping tool
  • Soldering iron
  • Soldering wire (No lead)
  • Breadboard
  • 2.54 mm headers
  • Jumper wires
  • Wrapping wires (30AWG)
  • Hot glue
  • 3D printing (If you need a case for your device)
  • Arduino IDE (We need this to program the Micro controller board)

Step 6: Reset the DS1307 Real Time Clock (RTC) on Data Logging Module

I would like to use the data for scientific experiment. Thus, a correct measurement time is important for data analysis. Using the delay() function in programming would induce measurement error in time shifting. On the contrary, I don’t know how to make a precise real time measurement on the Arduino platform only. To avoid sampling time error or minimize the measurement error, I would like to take every measurement sample with a time record. Fortunately, the data logging module has a real time clock (RTC). We can use it to output the time for data sampling.

To use the RTC, I follow the instruction (link) to reset the RTC. I recommend to do this with the Arduino Uno board firstly. It is because you have to modify the circuit when the Atmega2560 board is used (I2C connection is different). After you have set the RTC, you should not remove the cr1220 battery. Meanwhile, please check the condition of the battery before the data logging.

Step 7: Connection

I have separated the indoor and outdoor measurement. Thus, I have made two headers for connecting two different groups of sensors. I used the empty space on the data logging module for mounting the headers. To complete the circuit connection, I use both soldering and wrapping. The process of wrapping is clean and handy, while soldering joint is strong and secured. You can choose a comfortable method to build the circuit. If you are using the Atmega2560 board, make sure that you have built a jump connection for SDA and SCL pins. The connection of the RTC on the data logging shield must be reconnected.

To connect the sensors, I soldered the headers on the sensor modules and then I used wire wrapping to link all sensors to the headers. When you are using exiting sensor modules, I recommended that you should check the operating voltage carefully. Some sensor modules accept both 5V and 3.3 V inputs but some are restricted to use either 5V or 3.3V only. The following table shows the used sensor modules and the operating voltage.

Table. Sensor module and operating voltage

Step 8: Programming the MCU

Fortunately, I can find the application examples for all the sensors. If you are new to use them, you may download them on the internet or you may install them by using the library manager in Arduino IDE.

I programmed the system output a string for each sample. The string will be output and stored in the mounted SD card. If you need to view the data, switch off the device and then unmount the SD card. Then, you can mount the SD card to a card reader. The file will be stored as a csv file. Once you have download the data file to the computer, you can view it by a text program or a worksheet program.

(You can download the source code in the attached file.)

Step 9: Test It and Use It!

It is important that you do understand the meaning of the data. Sampling frequency is one of the important parameter. The current measurement time interval is 1 min, you may need to change it.

In addition, you would find the temperature measure of DHT11 is not accurate. If you need a more precise value, you can just use the temperature reading of BMP pressure sensors.

Thanks for reading this!