Arduino Type K Thermocouple Demo

by el_diablo19 in Circuits > Arduino

80 Views, 3 Favorites, 0 Comments

Arduino Type K Thermocouple Demo

IMG_4258.jpeg

An ESP 32 microcontroller circuit was setup to read a type K thermocouple with a digital thermometer reference input.

Supplies

1 Breadboard

1 Type K Thermocouple

1 HS711 Amplifier

1 ESP 32

1 DS18B20 Digital Thermometer

3 Resistors (any resistance)

Assorted Jumper Wires

1 USB to ESP 32 Connector

Initialize the Board

Screenshot 2024-09-24 at 11.08.07 AM.png
Screenshot 2024-09-24 at 11.08.58 AM.png

Lets first initialize the board


-Install the latest version of the Arduino IDE from arduino.cc/en/software (no donation is necessary).

- Once the IDE is installed, open the boards manager and install the esp32 board by Expressif

Systems.

-Install the CP2102 driver for the USB to UART bridge used in the development board.

-Connect the board to the serial port and, in the Arduino IDE, select the DOIT ESP32 DEVKIT V1 board

at the appropriate serial port.

-Upload the BlinkESP32.ino example given to test your setup. The blue LED at the board should blink.

-Open Libraries folder and download Adafruit_HX711 library as well as the DS18B20 Library by Rob Tillaart


Test Digital Thermometer

Screenshot 2024-09-24 at 11.14.24 AM.png

-Wire breadboard according to image shown above. IMPORTANT- make sure polarity is not reversed on DS18B20 or thermometer will overheat

-Open "One Wire" example from One Wire library (select temperature example)

-Change Pin on line 10 to match desired serial pin on ESP 32

-Click upload and confirm on serial monitor that a reasonable reading is being given

Thermocouple Integration

IMG_4261.jpeg
IMG_4260.jpeg
IMG_4259.jpeg
IMG_4258.jpeg
Screenshot_20240919-112859.png

-Wire breadboard according to images above

-Download attached code titled MAE_411_001_code

-Change baud rate to match your microcontroller (typically 9600)

-Change lines 5,6 to match your respective data and clock pin inputs

-Upload to board and monitor output using serial monitor

-Verify accuracy with a known temperature source such as an ice pack or controllable heat source

*Note lines 108-125 are performing thermocouple voltage to temperature calculations (in units of celsius). Do not change these unless you wish for different units or a more accurate alpha value (linearity value)*