Wiki

This version is outdated by a newer approved version.DiffThis version (05 Jun 2017 16:01) was approved by Brandon Bushey.The Previously approved version (31 May 2017 23:12) is available.Diff

This is an old revision of the document!


ADT7420 Temperature Sensor Demo [with EVAL-ADT7420_PMDZ]

The ADICUP3029_ADT7420 is a temperature sensor demo project for the EVAL-ADICUP3029 base board with additional EVAL-ADT7420_PMDZ shield, created using the Analog Devices Cross Core Embedded Studio.

General Description/Overview

The ADICUP3029_ADT7420 project uses EVAL-ADT7420_PMDZ PMOD which is a 16-bit ambient temperature sensor. It requires no calibration.

Demo Requirements

The following is a list of items needed in order to replicate this demo.

  • Hardware
    • EVAL-ADICUP3029
    • EVAL-ADT7420-PMDZ
    • Mirco USB to USB cable
    • PC or Laptop with a USB port
  • Software
    • ADICUP3029_ADT7420 software
      • Inside Sensor_Sw Pack (1.0.0 or higher)
    • CrossCore Embedded Studio (2.6.0 or higher)
    • ADuCM302x DFP (2.0.0 or higher)
    • ADICUP3029 BSP (1.0.0 or higher)
    • Android IoTNode App (optional)
    • Serial Terminal Program (Required for running in release mode only)
      • Such as Putty or Tera Term

Setting up the Hardware

Plug the EVAL-ADT7420_PMDZ shield into the EVAL-ADICUP3029 board's I2C PMOD connector as shown in the below picture.The ADICUP3029_ADT7420 use UART connection via P0.10/P0.11 of ADuCM3029 to communicate with PC terminal. Make sure S2 switch is towards USB. I2C communication via I2C between ADICUP3029 and EVAL-ADT7420_PMDZ.

Configuring the Software

In the adt7420_app.h header files you can configure the following parameters:

  • ADI_APP_DISPATCH_TIMEOUT - DISPATCH TIMEOUT will define how often the data is sent over Bluetooth.
  • ADI_APP_USE_BLUETOOTH - ENABLE BLUETOOTH parameter - will either use Bluetooth or will have the option to print to console window in debug mode or terminal in release mode.

Outputting Data

Once the hardware and software is configured, user needs to follow on screen instructions to run ADT7420 temperature sensor demo.

Following is the UART configuration.

  Select COM Port
  Baud rate: 9600
  Data: 8 bit
  Parity: none
  Stop: 1 bit
  Flow Control: none


Debug Mode

In debug build based on ADI_APP_USE_BLUETOOTH macro value the application either sends sensor values to the console or to the android application. Below screenshots depict different scenarios.
Figure shows when ADI_APP_USE_BLUETOOTH is set to 1, sensor data is sent to android application.

Figure shows the output on android device


Release Mode

When in release mode, console output is redirected to UART. If Bluetooth is enabled sensor data is sent to android application. If disabled sensor data is redirected to UART. Below screenshots show different scenarios.

Figure shows when ADI_APP_USE_BLUETOOTH is set to 1

Obtaining the Source Code

We recommend not opening the project directly, but rather use CrossCore Embedded Studio (CCES) example browse to open the project. Below screen shot shows how to open project from CCES Example browser.

The source code and include files of the ADICUP3029_ADT7420 demo can be found here:

How to use the Tools

The official tool we promote for use with the EVAL-ADICUP3029 is CrossCore Embedded Studio. For more information on downloading the tools and a quick start guide on how to use the tool basics, please check out the Tools Overview page.

Importing

For more detailed instructions on importing this application/demo example into the CrossCore Embedded Studios tools, please view our How to import existing projects into your workspace section.

Debugging

For more detailed instructions on importing this application/demo example into the CrossCore Embedded Studios tools, please view our How to configure the debug session section.

Project Structure

The ADICUP3029_ADT7420 is a C project that uses ADuCM3029 C/C++ Project structure.

This project contains: system initialization part - disabling watchdog, setting system clock, enabling clock for peripherals; port configuration for I2C read/write; configuring and reading from ADT7420, UART read/write functions;


adt7420_app.cpp and adt7420_app.h are the main source and header files related to ADICUP3029_ADT7420 be found under RTE/ADuCM3029 folder.ADT7420 sensor software drivers are located in RTE/Sensor folder. All ADuCM3029 related drivers can BLE related files can be seen under RTE/Board_Support folder.
pinmux.c – contains GPIO pinmuxing for UART and SPI.



End of Document

resources/eval/user-guides/eval-adicup3029/reference_designs/demo_adt7420.1496671252.txt.gz · Last modified: 05 Jun 2017 16:00 by Brandon Bushey