Mechatronics Portfolio - Nick Greco
Lab 0x04: Temperature Sensor

Summary

Through this lab, we were introduced to sensors and how they interface with microcontrollers using digital connections. In this case, we used an I2C interface. In the assignment, we created and tested a driver for an I2C-connected sensor and used it to log data to be placed into an excel sheet. We wrote a main.py and mcp9808 module that ran for a period of 8 hours and stored data into a CSV file. Using the CSV file, we generated a plot.

Source Code: Main File: https://bitbucket.org/nicho755/me-305-labs/src/master/ME405_Lab0x04_HotorNot/ME405_Lab0x04_main.py Source Code: Temp. Sensor Class File: https://bitbucket.org/nicho755/me-305-labs/src/master/ME405_Lab0x04_HotorNot/mcp9808.py

Data and Plot

The program was run from 7:00am to 4:00pm on my desk.

Figure 1. Temperature Plot based on Data Gathered: Comparing Temperature of Board & Sensor vs Time