Recently I had worked on an interesting project that required the color temperature (light color in Kelvins) and lux (light intensity) of light to be recorded. The data was to be saved onto a microSD card in a comma separated value (CSV) format for analysis. Data in CSV format can easily be imported into Microsoft Excel or Google Sheets. In these applications, charts can easily be created from the data to easily visualize trends. The device periodically wrote lines of data from the two sensors with a corresponding time stamp. Therefore, the format of the data was: date and time, lux, color temperature. A green LED was also added to blink once every time a sample was taken.
This Arduino based project used open-source hardware from Adafruit Industries. Since the project also had to be battery powered, I used one of Adafruit’s Feather 3.3V microcontrollers for the base of the project because of its overall low current draw. The Feather microcontroller has neat features such as a port to connect a LiPo battery to make it portable. Also, it can be powered directly from the microUSB port. If both the battery AND microUSB port are connected, the microUSB will charge the battery which is a very useful feature. The Feather also has it’s line of add-on shields, so I integrated the Adalogger shield which uses a built-in real time clock chip to take the necessary date and time stamps. The add-on shield also had a microSD card port for writing data.
The finished prototype is a quick plug-and-play device that is both battery operated and can be powered via microUSB. It periodically writes lines of data to a microSD card in a CSV format.