Kyle Chuang | ME405 Mechatronics Portfolio
Lab0x04: Hot or Not? Documentation

Summary

For this lab I worked in a group with Encoch Nicholson to develop code that uses a mcp9808 sensor to record ambient temperature data as well as the internal tempereature of the microcontroller. This is composed of two files:

  1. mcp9808.py: This is the mcp9808 driver that was written to initialize the sensor. It has a variety of functional methods within it but for the scope of this lab it takes an initialized I2C object as an input and uses it to interface with the sensor to obtain temperature readings in a variety of unit systems.
  2. Lab4_main.py: This is the back end code that uses the driver to collect ambient temperature and controller core temperature. It collects data every 60 seconds until the user presses Ctrl-C, terminating data collection and saving all data to a CSV file called "TempData.csv". This file will be saved on the Nucleo. To restart data collection, please perform a soft reset.

Source code can be found here: https://bitbucket.org/ewnichol/me405_shared_work/src/master/me405%20Lab%200x04/

Results from 8 hours of data collection

I used this code to record data overnight for approximately 8 hours. I recorded from 12am to 8am in my old, not-so-insulated house which accounts for the colder temperatures towards the end of data collection. Additionally, this plot shows that I went to bed around 5000 seconds after data collection began (equates to about 1:30am) where all my electronic devices were shut off and no longer producing heat.

Author
Kyle Chuang
Enoch Nicholson
Date
February 8,2021