Skip to content

A simple sketch to demonstrate an interface between an Arduino and MATLAB, specifically for data-logging in MATLAB. This particular example utilizes this for creating a thermometer.

License

Notifications You must be signed in to change notification settings

nakulbende/Thermocouple_MATLAB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thermocouple: MATLAB + Arduino

A simple sketch to demonstrate an interface between an Arduino and MATLAB, specifically for data-logging in MATLAB. This particular example utilizes this for creating a thermometer.

Framework:

Since we are using MATLAB to log (and maybe further manipulate) data, we need to use scripts on both sides. The Arduino script (Serial_matlab_thermocouple.ide) configures it to read temperature from the thermocouple (interfaced with an amplifier), and print it (in degree C) on the serial port. The MATLAB script (MATLAB_thermocouple.m) timestamps this incoming data, and stores it in an array. The codes are set to read, transmit and log data in an infinite loop, and Ctrl + C should be used in MATLAB to stop data logging. A simple circuit can be used to use a pushbutton to print something else on the serial port, which MATLAB recognizes as a break signal.

Bill of materials:

  1. Arduino (any model is fine, this uses Uno)

  2. Thermocouple amplifier MAX31855 To get cleaner, more accurate signal. Highly recommended

  3. K-junction thermocouple Investing in a glass-braided one is recommended if used for high temperature applications

  4. Momentary push button

Circuit:

Assemble the circuit according to the following schematics: TTL Trigger circuit

Calibration:

The MAX31855 is factory calibrated. See datasheet for calibration notes. Alternatively, a calibration curve is usually obtained by linearly fitting readings from boiling and ice water.

Further development:

Something like a wifi module with arduino can unleash this simple setup into a wireless thermocouple, say to be used in sealed experiments!

About

A simple sketch to demonstrate an interface between an Arduino and MATLAB, specifically for data-logging in MATLAB. This particular example utilizes this for creating a thermometer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages