Hello everyone! This project is meant to demonstrate how easy it is to interface a Matrix Orbital (https://www.matrixorbital.com/) GTT Intelligent TFT HMI display with an Arduino Uno through I2C. A DS18S20 temperature sensor is used to obtain temperature information, which is then processed by the Uno. Once the Arduino processes the temperature information, it updates the GTT's bar graph, and label.
You can watch the demo in action on our YouTube page here (https://www.youtube.com/watch?v=A4d3_fNZMFM).
- GTT Series Intelligent I2C, USB, Serial TFT HMI Display (https://www.matrixorbital.com/matrix-orbital/graphic-tft-touchhttp://)
- Arduino Uno (https://store.arduino.cc/usa/arduino-uno-rev3)
- Bread Board
- Male to Male Jumper cables
- 4.7k Ohm resistor
- DS18S20 Temperature Sensor (https://www.matrixorbital.com/accessories/fan-cooling/temperature-probe)
- 4pin Bread Board cable (https://www.matrixorbital.com/bbc-breadboard-cable)
- USB to Mini-USB cable (https://www.matrixorbital.com/accessories/communication/extmusb3ft-external-a-to-mini-b-3ft)
- Power Adapter (optional) (https://www.matrixorbital.com/accessories/power/pwr-acdc-5v2a)
- GTT GUI Designer Software (https://www.matrixorbital.com/gtt-designer)
- Arduino IDE (https://www.arduino.cc/en/Main/Software)
Step 1: Designing the User Interface
The GTT Designer Suite allows users to easily drag and drop widgets on screen. Images and font files can also be imported for use when creating GUI's. For this project, we've dragged in a Bar graph, 3 Image Toggles, a label, and a Thermometer image. The Bar graph is used to visually represent the current temperature. The label displays the current temperature value numerically. Two of the image toggles are used to indicate whether or not the Arduino and DS18S20 temperature sensor are connected and operating properly. Finally, the third image toggle allows users to turn the display's backlight on and off.
You can download our GUI design here. (https://github.com/MatrixOrbital/GTT-Arduino-Thermometer-Demo/tree/master/GTTProject21)
You can download our free and fast GUI design software here. (https://matrixorbital.ca/gtt-software)
Once the design is completed, the project can be deployed to the GTT. You'll need to connect your PC to the GTT's Mass Storage header, and hit "Deploy" in the GTT Designer. All the necessary files will be generated and deployed directly to the display.
Step 2: Connecting the GTT
For this demo, we'll be using I2C to communicate between the Arduino Uno and the GTT. Using the Bread Board Cable, connect the 4 pin header to the GTT's I2C header. Then connect the Red Bread Board Cable lead to 5V power, and connect the Black lead to ground. The Yellow (SDA) and Green (SCL) leads need to be connected to the Arduino Uno's SDA pin (A4) and SCL pin (A5) respectively. No I2C pull-up resistors are required for communication with the GTT. Additional power can be applied through the displays barrel jack.
Step 3: Connecting the DS18S20
A 4.7k Ohm pull-up resistor must be placed in parallel with the D18S20's power and data pins, otherwise the sensor will be unable to communicate properly. The data pin can be connected to any digital pin on the Arduino; in this case we selected pin 2.
Step 4: Installing Libraries
Before continuing, download and unzip the the following GTT Client Libraries. These libraries can also be found within the most recent GTT Firmware release (https://matrixorbital.ca/f/gtt-rev2-0). Once downloaded, copy over the contents of GttClient into \Users\YourUserName\Documents\Arduino\libraries\gtt.
GTT Client Library (https://github.com/MatrixOrbital/GTT-Arduino-Thermometer-Demo/tree/master/GTT%20Client%20Library)
Step 5: Code
Download the GTT_Arduino_Thermometer_Demo.ino (https://github.com/MatrixOrbital/GTT-Arduino-Thermometer-Demo/tree/master/GTT_Arduino_Thermometer_Demo) file. Navigate to the GTTProject21>Output folder, and grab the .c and .h files generated by the GTT Designer Suite. Place both files in the GTT_Arduino_Thermometer_Demo.ino source directory, then open the .ino file.
From there, you can upload the program to the Uno. The GTT will reset immediately after the program is uploaded. After a few seconds, the Thermometer demo screen will be displayed on the GTT. The image toggles will be set, indicating the connection status of the Arduino and the DS18S20 probe. If the probe becomes disconnected at any point, the indicators will provide visual notification that no temperature probe can be found.
Let us know if you like this demo, or if you have any questions!
Matrix Orbital Team
Hi Everyone! I just wanted to let you know we've updated the demo and implemented user controlled temperature limits. The user will be able to set low temperature and high temperature limits and an audible alert will be triggered if the temperature exceeds either of those limits.
Our stage 2 demonstration video can be found on our Youtube page here. (https://www.youtube.com/watch?v=AR8z-UDoHkI&feature=youtu.be)
Matrix Orbital's GTT Arduino Thermometer Stage 2 uses all of the same hardware and software as stage 1, but a couple of modifications have been made to the GUI.Two labels are implemented to display the high and low temperature limits. Four buttons add control, allowing users to manually set the high and low temperature limits. Each button label has been changed to a '+' or '-' to indicate their function appropriately.
You can download the updated GUI design here (https://github.com/MatrixOrbital/GTT-Arduino-Thermometer-Demo_Stage_2/tree/master/GTT%20Files).
The Updated Arduino code can be downloaded here (https://github.com/MatrixOrbital/GTT-Arduino-Thermometer-Demo_Stage_2/tree/master/Arduino%20Files/GTT_Arduino_Thermometer_Demo_Stage_2).
Matrix Orbital Team