INTRODUCTION

DAC series modules are a range of products that can be controlled through I2C or PWM signals to generate voltage or current output signals. They possess the capability to produce a variety of analog voltage or current signals, including 0-5V, 0-10V, 0-2.5V, 0-VCC, and 0-25mA.

An analog quantity refers to the continuous variation of voltage magnitude (or current magnitude) within a specific range. Due to its stability, long transmission distance, and ease of use, it has found widespread application in the field of industrial automation control, including:

  • Motor speed control

  • Sound intensity control

  • Temperature regulation

  • Adjustment of light brightness

  • Valve angle modulation

    etc.

This series of DAC products not only offers a variety of output signal ranges, but also provides three selectable resolutions: 8-bit, 12-bit, and 15-bit. It allows for the choice of either single-channel or dual-channel configurations, and multiple modules can be cascaded to form a multi-channel output. When coupled with Arduino controllers, Raspberry Pi, STM32, and similar controllers, it finds application in various automation control scenarios, including:

  • Laboratory testing equipment

  • Automatic motor speed control

  • Indoor and outdoor lighting control

  • Automated volume adjustment

  • Backlight control for displays

    etc.

The following table presents the functional parameters of each DAC product for reference in the selection process.

DFR1034-GP8503 (2-Channel 12bit I2C to 0-2.5V/VCC DAC Module)

FUNCTIONS

This is a 2-channel analog voltage output DAC module with I2C communication, 12-bit resolution, and 0.1% output voltage linearity error. It is well-suited for control projects operating within the 3.3V range, such as ESP32, Raspberry Pi, STM32, and other microcontrollers that require analog signal output.

FEATURES

  • Support 3.3V-5V power supply.
  • Output voltage linearity error of 0.1%.
  • Two channels of voltage output, either 0-2.5V or 0-VCC, enabling connection and control of standard analog voltage devices.
  • Gravity interface, I2C communication, Arduino control, suitable for program automation control.

DIMENSION

FUNCTIONAL DIAGRAM

Name Description Remarks
12C Interface + Positive terminal of the power supply (3.3V-5V)
- Negative terminal of the power supply
C SCL
D SDA
0-2.5V/0-VCC SwitchingSwitch 0-VCC Switch output voltage to 0V-VCC(Supply voltage)
0-2.5V Switch output voltage to 0V-2.5V
Voltage Signal Output Port VOUT0 Positive terminal of output voltage signal 0
VOUT1 Positive terminal of output voltage signal 1
GND Negative terminal of the output voltage signal

SPECIFICATIONS

  • Chip Type: GP8503
  • Operating Voltage: 3.3V-5V
  • Output Voltage: 0-2.5V or 0-VCC
  • Number of Channels: 2 channels
  • Communication Method: I2C
  • Resolution: 12-bit
  • Value Range: 0 - 4095 corresponding to 0-2.5V or 0-VCC
  • Output voltage linearity error: 0.1%

TUTORIAL

In this example, we will demonstrate the output of different voltage values in two states.

Input signal value range:0-4095

In the state of 0-2.5V:

  • Channel 0 inputs 2654, resulting in an output of 1.62V.
  • Channel 1 inputs 1095, resulting in an output of 0.668V.

In the state of 0-VCC:

  • Channel 0 inputs 2654, resulting in an output of 3.23V.
  • Channel 1 inputs 1095, resulting in an output of 1.334V.

SOFTWARE REQUIREMENTS

HARDWARE CONNECTION

SAMPLE CODE

#include <DFRobot_GP8XXX.h>

DFRobot_GP8503 GP8503;

void setup() {

  Serial.begin(9600);

  while(GP8503.begin()!=0){
    Serial.println("Communication with the device has encountered a failure. Please verify the integrity of the connection or ensure that the device address is properly configured.");
    delay(1000);
  }

  /**
   * @brief. Configuring different channel outputs for DAC values
   * @param data. Data values corresponding to voltage values
   * @n (0 - 4095).This module is a 12-bit precision DAC module, hence the values ranging from 0 to 4095 correspond to voltages of 0-2.5V or 0-VCC respectively. The specific voltage range depends on the selection of the module's voltage fluctuation switch.
   * @param channel Output Channel
   * @n  0:Channel 0
   * @n  1:Channel 1
   * @n  2:AII channels
   */
  GP8503.setDACOutVoltage(2654,0);//At 0-2.5V voltage range, Channel 0 outputs 1.62V, whereas at 0-VCC voltage range, Channel 0 outputs 3.23V.
  GP8503.setDACOutVoltage(1095,1);//At 0-2.5V voltage range, Channel 1 outputs 0.668V, whereas at 0-VCC voltage range, Channel 1 outputs 1.334V.

  delay(1000);

  //The set voltage is saved internally in the chip for power-off retention.
  //GP8503.store();
}

void loop() {

}

RESULT

After downloading the program, the measured output voltage of channel 0 under the 0-2.5V state is 1.62V, and the output voltage of channel 1 is 0.668V. Under the 0-VCC state, the actual output voltage of channel 0 is 3.23V, and the output voltage of channel 1 is 1.334V.

More Documents

DFR1034 Documents:

DFR1034-Schematics.pdf

DFR1034_Dimensions.pdf

DFR1034_3D文件.rar

DFR1034_2D_CAD File.rar

DFR1034_GP8503 Datasheet.pdf

FAQ

For any questions, advice or cool ideas to share, please visit the DFRobot Forum.