This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DAC7750: Current not comming at Iout pin of IC even though

Part Number: DAC7750

Image of connections on PCB: PCB_DAC7750

I have made minimum connections with DAC7750 namely AVDD(=11.5V), SDO, DIN, SCK, LATCH, GND as seen in the PCB (link to the image attached above).  I am just making the current ramp-up and ramp-down using ESP32 inbuilt SPI library. I am also facing the same issue, as current not being detected on the output (Measured with an ammeter). AVDD varied from 10V to 18V but still the same issue. DVDD is not connected as DVDD_EN is open, which means an internal supply is enabled for digital peripherals inside. I have verified through oscilloscope that MOSI, SCL, SS signals are being generated on ESP32's pins. I have used the HSPI ports of the controller. I have kept the delays a little high for easy debugging on an oscilloscope. 

 

#include <SPI.h>

//#define ALARM  
#define HSPI_MISO   12
#define HSPI_MOSI   13
#define HSPI_SCLK   14
#define HSPI_SS     15    //To be connected to LATCH pin of DAC7750

//see pg32 datasheet
#define Config   0x57
#define Ctrl     0x55
#define DAC_data 0x01
#define Reset    0x56

static const int spiClk = 1000; //freq in Hz

SPIClass SPI2(HSPI);

//Send values to DAC7750 in format 'address_of_register + data' 
//24-bit frame= 8bit addr + 16bit data
//See pg10, Datasheet for timing diagram
void Send(uint8_t addr, uint16_t value)
{ 
  SPI2.transfer(addr);
  SPI2.transfer16(value);    ///inbuilt function in SPI.h for 2bytes transfer
  digitalWrite(HSPI_SS, LOW);
  delay(1);
  digitalWrite(HSPI_SS, HIGH);
  delay(1);
}

void setup()
{ delay(1000);  //Let the power supply be stable. 

  pinMode(HSPI_SS, OUTPUT);
  digitalWrite(HSPI_SS, HIGH); 

//  pinMode(ALARM, INPUT);

  SPI2.begin(HSPI_SCLK, HSPI_MISO, HSPI_MOSI, HSPI_SS);

  SPI2.beginTransaction(SPISettings(spiClk, MSBFIRST, SPI_MODE0));
   
  //INITIALISE REGISTERS (pg34 onwards, Datasheet)
  //..Reset register
  Send(Reset, 0x0001); 
  delay(1);
  
  //..config register 
  Send(Config,0b0000000000001100);   //disable HART, watchdog, error-check, calliberation
  delay(1);
  
  //..Data register   -> initialise with all 0. (But is already at default reset)
  //Send(DAC_data, 0x0000);  //last 4 LSB digits invalid for DAC7750 (to act as 12-bit)
  //delay(1);
  
  //..Control register
  Send(Ctrl, 0b0011000000001110);  //o/p enable, o/p->0-20mA, current setting res enable
  delay(1);
}

void loop() 
{
  //send a ramp from 0 - 2mA, then const upto 30sec, then ramp to 0mA
  //ramp slope around 30sec
  uint16_t i=0;
  for(i=0; i<409; i++)  //Current upto 2mA i.e. 409.5 value of 12bit-DAC in 30sec
  {
    Send(DAC_data, (i<<4));
    delay(75);
  }

  delay(10000);

  for(i=409; i>=0; i--) //Current upto 2mA i.e. 409.5 value of 12bit-DAC in 30sec (16bit register, last 4bits useless)
  {
    Send(DAC_data, (i<<4));
    delay(75);
  }

  delay(10000);
  
}

  • Lakshay,


    I don't really see anything wrong in the code, but there are other things that can go wrong in the setup to prevent the output from coming out of the device.

    First, can you please take some of the scope shots for the SPI and post them here? I just want to makes sure you have the right mode of SPI and that the signals are clean and follow the proper timing. Another thing that you should do is to review the circuit and make sure there aren't any errors in the schematic. Can you also post the schematic that you are using?

    Finally, one useful test would be to readback from the device. Unfortunately, the default data for most of the registers are all 0s. However, you can write to the DAC data register and then read it back just to see if the device is receiving the data and sending it to the register.


    Joseph Wu

  • I have gathered pictures of signals coming out of my ESP32 pins, as declared in the program in the previous thread, from the oscilloscope. I have categorized the MOSI, SS, SCK in separate folders.  Here is the link: GDrive_link 

    For the DAC7750 part, I have only connected AVDD=11.5V, DVDD=open as DVDD_EN is left open. Then GND, SDI, and SDK. The current output is 0 Amperes at all times (tried by attaching a resistor of 100ohm and in next trial attached a Red led). 

    PS: Earlier in history, I happen to give deliberately 3.3V from ESP's regulator to DVDD, for around 5-10Minute not knowing the role of DVDD_EN. So even consider that if by chance functionality of IC is disturbed! 

  • Lakshay,

    Can you post a couple of the scope photos here also? Access to google drive is restricted by TI, so I can't reach it and look at it.

    As for the DVDD_EN, I'll look into that. I'm sure if that would damage to the board/device or not. If it's any help, it's possible that I've done the same thing on my board before as well.


    Joseph Wu

  • Joseph, Thank you for your prompt responses, I'm attaching the folder with the necessary photos/videos.
    Your last sentence about the DVDD_EN point does give me a little hope now. :)

    Thanks for all the help.
    SPI_data_outputs-20210503T213350Z-001.zip

  • Lakshay,

    Thanks, but do you have a multichannel scope to show the signals at the same time? Showing the individual signals doesn't really help to determine if the timing is correct.

    Joseph Wu