Skip to content

A student project for ENGR114 at Portland Community College. Uses MATLAB to read a temperature sensor connected to an Arudino over serial.

License

Notifications You must be signed in to change notification settings

ProfessorKazarinoff/MATLAB-temp-sensor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MATLAB-temp-sensor

A student project for ENGR114 at Portland Community College. Uses MATLAB to read a temperature sensor connected to an Arudino over serial.

Problem Statement

For our final lab, our group was tasked with setting up a temperature sensor for the hydroponic fish tank-garden shown to the right. This sensor will be used to monitor the water supply for the garden. Using an Arduino and MATLAB, the water temperature will be recorded over a set amount of time with the temperature displayed at regular intervals. A plot of the temperature as a function of time will also be generated for a visual representation of the temperature vs. time. The temperature measurement setup will be used to monitor the temperature of the water in the hydroponic fish tank-garden.

Hardware Setup

Bill of Materials

component vendor
Arduino SparkFun RedBoard - Programmed with Arduino
Temperature Sensor 10K Precision Epoxy Thermistor - 3950 NTC
10 kΩ resistor Resistor 10k Ohm 1/6th Watt PTH
Breadboard Breadboard - Self-Adhesive (White)
Jumper wires Jumper Wires Premium 6" M/M Pack of 10
Mini-B USB cable SparkFun USB Mini-B Cable - 6 Foot

Fritzing Diagram

Alt-text

Connected Hardware

Arduino is connected to the computer via a mini-USB (connector shown at right of photo). The temperature sensor is connected to the Arduino through a breadboard that incorporates a pull-up resistor to keep input voltage up. Connections as follows: red wire of sensor is input, green is signal, black is ground, these are connected to three different rows on the breadboard. The red, white and black jumpers connect the breadboard to the Arduino with the following ports, 3.3V, Digital-7 and GND (respectively). The resistor is placed between the signal wire and input for the Arduino. Alt-text

Arduino Code

The temp_sensor.ino sketch was uploaded on the Arduino using the Arduino IDE.

MATLAB Code

The temp_sensor.m script was run in MATLAB.

Results

Alt-text

The plot above is a sample output of our code using the temperature sensor and Arduino board. Time is on the x-axis while temperature in degrees Fahrenheit is on the y-axis.

Future Work

This is a great starting point for future work with the hydroponic fish-garden. The MATLAB program could be used to get baseline values for the temperature and use those values for further changes to the conditions. If the temperature is too low, a program could be written to turn on a heater until the water reaches a certain temperature. If the temperature is too high, the same program could be used to turn off the heater. Long term monitoring could be used to find trends that correlated to any number of factors, plant cycle, fish health, plant health, etc. Inconjunction with software from other groups. this garden could be almost fully automated and controlled remotely via a wi-fi connection.

License

GNU General Public License v3.0

About

A student project for ENGR114 at Portland Community College. Uses MATLAB to read a temperature sensor connected to an Arudino over serial.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published