Project tutorial
Send Analog Pulse Using DAC — AD5669 with Arduino

Send Analog Pulse Using DAC — AD5669 with Arduino

Receiving and sending the digital and analog signal through AD5669 interface with Arduino to detect the A/D pulses.

  • 1,991 views
  • 1 comment
  • 10 respects

Components and supplies

Apps and online services

About this project

Understanding the DAC or ADC conversion is the basic and most important part to create the interface between different microprocessors, Microcontroller, Sensors, Actuators etc. For creating this communication we will be using AD5669 DAC converter which is connected with Arduino with the help of I2C Sheild sharing the data via serial port in Node-Red

Hardware

AD5669 I2C module

Arduino I2C Sheild

Arduino

Software

Arduino IDE

Node-Red

About AD5669

The Advance I2C 4mHz communication speed help the AD5669 to work maximum 16 Bits of Resolution Per Channel using a step voltage of 0.0000763V which shares the programmable voltage output ranges between 0–5V. The source has vast application usage in various tech automation to work with AD5669 I2C module. It sends the analog output signal converted from the digital output using microcontrollers with the help 2 wire signal interface process.

About AD5669 application

We were successfully able to use AD5669 modules to send the analog signal ranges between 0–5V which give the signal to motor drivers which control the movement of smart parking barriers which is using the Analog motor drivers to automate these parking barriers.

We are sending the signals to Parking barriers motor drivers using the DAC converters interface by Arduino

I2C Code

  • Initialize the Wire.h file called as I2C Library especially use in Arduino IDE
#include<Wire.h>
  • Initialize the I2C registers of sensor module which is specified to work with 2 wire protocol.
#define Addr 0x56
  • Begin the I2C transmission and Initialize the baud rate as per the requirements for serial communication.
Wire.begin();  // Initialise serial communication, set baud rate = 9600  Serial.begin(9600);delay(300);
  • Request for 2 bytes of Data which we want to read from the module through I2C connection
unsigned int data[2] = {0x80, 0x00};
  • If 2 bytes of data is available then use the mentioned below formula will help to convert the data bytes and display desired values
// Convert the data, Vref = 5 V  float voltage = (((data[0] * 256) + (data[1])) / 65536.0) * 5.0;
  • Manipulate the parameters as per the requirement of precision settings which is given in the datasheet
  • Using Serial.print you will be able to read the sensor data in the serial monitor screen.
// Output data to serial monitor  Serial.print("Voltage : ");  Serial.print(voltage);  Serial.println(" V");  delay(500);

Node-Red

With the help of node -red you will be able to display the I2C Modules data in dashboard format which is already been mentioned in previous blogtuts.

The newbies can check out the tutorial for Node-Red installation here.

Besides that, you can also check out the better way to display the dashboard in your smartphone only if your smartphone is connected to the network

Code

https://github.com/varul29/AD5669/blob/master/Arduino/AD5669.ino

https://github.com/varul29/Node-Red_Tutorial

Credits

  • Control everything
  • Node-Red

Code

AD5669_ArduinoC/C++
#include<Wire.h>

// AD5669 I2C address is 0x56(86)
#define Addr 0x56

void setup()
{
  // Initialise I2C communication as Master
  Wire.begin();
  // Initialise serial communication, set baud rate = 9600
  Serial.begin(9600);
  delay(300);
}

void loop()
{
  unsigned int data[2] = {0x80, 0x00};
  
  // Start I2C transmission
  Wire.beginTransmission(Addr);
  // Select DAC and input register
  Wire.write(0x2F);
  // Write data = 0x8000(32768)
  // data msb = 0x80
  Wire.write(data[0]);
  // data lsb = 0x00
  Wire.write(data[1]);
  // Stop I2C transmission
  Wire.endTransmission();

  // Convert the data, Vref = 5 V
  float voltage = (((data[0] * 256) + (data[1])) / 65536.0) * 5.0;

  // Output data to serial monitor
  Serial.print("Voltage : ");
  Serial.print(voltage);
  Serial.println(" V");
  delay(500);
}

Comments

Similar projects you might like

Send Tweets Using Arduino with Artik Cloud

Project tutorial by Jasper

  • 1,579 views
  • 0 comments
  • 9 respects

Analog Clock with LED Matrix and Arduino

Project in progress by LAGSILVA

  • 13,143 views
  • 10 comments
  • 45 respects

2€ OLED I2C Analog Pin Dynamic Plotting

Project showcase by javier muñoz sáez

  • 5,966 views
  • 0 comments
  • 13 respects

Arduino - Send Temperature to Web via Serial

Project tutorial by IoT_hobbyist

  • 4,019 views
  • 5 comments
  • 25 respects

One Pixel Thermometer

Project tutorial by Ian Cumming

  • 1,824 views
  • 2 comments
  • 7 respects

Arduino DIY Analog Thermometer

Project tutorial by Nick Koumaris

  • 1,766 views
  • 1 comment
  • 5 respects
Add projectSign up / Login