Martha MigliacioAlex Wong
Published © GPL3+

Using the Pmod AD5 with Arduino Uno

Application notes for Pmod AD5 and Arduino Uno. The result of the A/D conversion of the AIN1 channel is displayed on the serial monitor.

EasyShowcase (no instructions)1 hour752
Using the Pmod AD5 with Arduino Uno

Things used in this project

Hardware components

Pmod AD5
Digilent Pmod AD5
×1
Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Pmod AD5 and Arduino Uno Fritzing file

Fritzing file displaying the connection of the Pmod AD5 to the Arduino Uno.

Pmod AD5 and Arduino Uno Fritzing Image

Fritzing image displaying the connection between the Pmod AD5 and Arduino Uno.
Pmodad5arduinouno bb g7znrjsazw

Code

Pmod AD5 and Arduino Uno Code

Arduino
Using this code will display the result of the A/D conversion of the AIN1 channel on the serial monitor.
/************************************************************************
*
* Test of the Pmod
*
*************************************************************************
* Description: Pmod_AD5
* The result of the A / D conversion of the AIN1 channel is displayed on the serial monitor.
*
*
* Material
* 1. Arduino Uno
* 2. Pmod AD5 (do not touch the jumper and
* dowload library https://github.com/annem/AD7193)
*
************************************************************************/

#include <SPI.h> // Call of libraries
#include <AD7193.h>

AD7193 AD7193; // Creation of the object AD7193

unsigned long valeur;
float tension;

void setup()
{
 Serial.begin(9600); // initialization of serial communication
 Init_AD7193();
}

void loop()
{
 valeur = AD7193.ReadADCChannel(0); // conversion A/N on input 1
 valeur = valeur >> 8; // Extraction of value
 tension = AD7193.DataToVoltage(valeur); // Recovery of tension
 Serial.println("");
 Serial.print("Valeur=");
 Serial.print(valeur);
 Serial.print('\t'); // tabulation
 Serial.print("Tension=");
 Serial.print(tension);
 Serial.println("V");
}

// Initialisation du module Pmod AD5
void Init_AD7193(void)
{
 AD7193.begin(); // initialization of Pmod AD5 module
 AD7193.AppendStatusValuetoData(); // configuration of Pmod AD5 module
 AD7193.SetPGAGain(1);
 AD7193.SetAveraging(100);
 AD7193.Calibrate();
 AD7193.ReadRegisterMap();
}

Credits

Martha Migliacio

Martha Migliacio

5 projects • 5 followers
Alex Wong

Alex Wong

5 projects • 13 followers
I work in Digilent and like creating projects
Thanks to Lextronics.

Comments

Add projectSign up / Login