Go Down

Topic: Matrix Orbital GTT TFT + Arduino + 1-Wire Thermometer (Read 840 times) previous topic - next topic


Apr 19, 2018, 09:26 pm Last Edit: Apr 20, 2018, 12:57 am by MatrixOrbital
Hello everyone! This project is meant to demonstrate how easy it is to interface a Matrix Orbital 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.

- GTT Series Intelligent I2C, USB, Serial TFT HMI Display

- Arduino Uno

- Bread Board

- Male to Male Jumper cables

- 4.7k Ohm resistor

- DS18S20 Temperature Sensor

- 4pin Bread Board cable

- USB to Mini-USB cable

- Power Adapter (optional)

- GTT GUI Designer Software

- Arduino IDE

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.

You can download our free and fast GUI design software here.

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. Once downloaded, copy over the contents of GttClient into \Users\YourUserName\Documents\Arduino\libraries\gtt.

GTT Client Library

Step 5: Code
Download the GTT_Arduino_Thermometer_Demo.ino 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
twitter: @matrixorbital


Apr 25, 2018, 12:05 am Last Edit: Apr 25, 2018, 12:06 am by MatrixOrbital
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.

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.

The Updated Arduino code can be downloaded here.

Matrix Orbital Team
twitter: @matrixorbital

Go Up