GP82XX - Issue writing DAC values - random sine-waves intermitently appearing
I purchased and received two GP8211 DAC for a project I am working on. I needed the option of larger range (0-10V) and also the additional resolution (15-bit).
Set-up.
I followed the online Wiki. Downloaded and installed the library from github. Connected an Arduino Uno (official) and upload the demo code from the Examples. This worked.
Problem.
Next, I modified the example to cycle through various values.
I noted that at certain times, a clean output was being generated. However, at other times, a large amplitude, high-frequency sine-wave was being generated.
I tried both the the GP8211 I purchased and had the same issue. Thinking it might be my Arduino, I uploaded my script to an Elegoo Mega 2560; unfortunately I ran into the same problem.
Below is the sketch I am running and also a screencast of the issue happening as I cycle up and down through difference values.
Any help with this issue would be greatly appreciated.
“”"
#include <DFRobot_GP8XXX.h>
DFRobot_GP8211S GP8211S;
void setup() {
Serial.begin(9600);
while(GP8211S.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);
}
GP8211S.setDACOutRange(GP8211S.eOutputRange5V);
/**
* @brief. Configuring different channel outputs for DAC values
* @param data. Data values corresponding to voltage values
* @n (0 - 32767).This module is a 15-bit precision DAC module, hence the values ranging from 0 to 32767 correspond to voltages of 0-10V respectively.
*/
}
void loop() {
for (int value=0; value<33; value++){
Serial.print("Value to write:");
Serial.println(value*1000);
GP8211S.setDACOutVoltage(value*1000);
delay(200);
}
for (int value=32; value>0; value--){
Serial.print("Value to write:");
Serial.println(value*1000);
GP8211S.setDACOutVoltage(value*1000);
delay(200);
}
}
“”"
I have the same problem with two of them.
I posted some images from my oscilloscope last month on the product page.
No use posting here as they are the same but you might want to look at them in case you don't believe this person.
I also bypassed the on board boost converter and directly powered the chip from my bench PSU and I have the same problem.
As I am only generating DC for a TXCO PID loop, I don't mind the extra capacitance.
Otherwise, I think the whole chip is a failure. It's a shame because I don't think there is such a good 15 bit i2c DAC from other vendors. This one has surprisingly good linearity.
Rob.Fowler
Sorry…can't figure out how to edit previous comments…
Also tried with the Arduino/Mega powered by 9V battery and got the same issue.
Martin.Heroux
Apologies, the video was embedded in the message as I was typing; but on submission the video does not appear at the end of my message.
The link to the screencast of the issue happening can be found here: “https://youtu.be/ci2Luckt9oU”
Martin.Heroux