Project start: July 2016
Indoor Data Logger
I started building the datalogger for my bedroom, where I didn't have to think about power consumption.
The ESP8266 doesn't have that much IO ports, but just enough for the sensors I'm going to use, which will be: DHT22 (temperature and relative humidity), BMP180 (temperature and barometric pressure), LDR (photoresistor for light) and a
PIR movement sensor.
I used the ESP8266-07 on a diy one sided PCB. The BMP180 pressure sensor is connected via I2C, the DHT22 via some sort of 1-Wire, the PIR sensor gives a high signal for a set amout of time if movement is detected and the LDR is attached to the internal ADC.
The PCB fits exactly into a small 71mm x 45mm
plastic box.
For the power supply I used a 5V USB port on my server. A small step-down converts the voltage down to 3.3V for the ESP. Connected to Wifi it draws 70mA.
I used the cover of the box to mount all the sensors so they wouldn't be affected by the heat of the esp.
The PIR movement sensor was already soldered onto a circuit which is used to switch on a light for a specified time if movement occurs. Because I wanted to calculate the precentage of movement per minute I needed to set the time as low as a few seconds. For that I had to short out the resistor connected to Pins 5 and 6 of the IC. The two potis are used to further set the time and sensitivity.
A luxmeter was used to fill a table to interpolate from ADC reading to light value in lux.
By shorting the "Prog" pins the ESP can be later flashed via serial connection.
Here I've put he finished box onto a speaker in the top corner of the room. The movment sensor covers the whole room and the ldr isn't affected by direct sunlight either. One has to notice, that the temperature at the ceiling can be higher by a few degrees than in the middle of the room.
Later I rebuild the hard- and software. The documentation can be found under
IoT - Sensoresp.