Author Topic: Some problems with AD5932  (Read 5007 times)

0 Members and 1 Guest are viewing this topic.

Offline Jacky_88Topic starter

  • Contributor
  • Posts: 27
  • Country: de
Some problems with AD5932
« on: December 03, 2016, 05:53:59 pm »
Hello,

at the moment I'm trying to get an AD5932 running. It's soldered onto an adapter-PCB for my breadboard. The clock signal (MLCK) comes from an oscillator with TTL output. I'm using 50Mhz and 25Mhz oscillators. I've read the manual and the application note. The AD5932 is controlled with a Atmega 1284p and SPI. This is the code which is send at startup:

Code: [Select]
CTRL_HIGH;

SS_LOW;
_delay_us(10);
SPI::Transmit(0b00001101); //CREG
SPI::Transmit(0b11111111);
SS_HIGH;
_delay_us(10);

SS_LOW;
SPI::Transmit(0b11001110); //FSTART LSB
SPI::Transmit(0b10111000);
SS_HIGH;
_delay_us(10);

SS_LOW;
SPI::Transmit(0b11010000); //FSTART MSB
SPI::Transmit(0b01010001);
SS_HIGH;
_delay_us(10);

SS_LOW;
SPI::Transmit(0b00100011); //DELTAF LSB
SPI::Transmit(0b00010010);
SS_HIGH;
_delay_us(10);

SS_LOW;
SPI::Transmit(0b00111000); //DELTAF MSB
SPI::Transmit(0b00001000);
SS_HIGH;
_delay_us(10);

SS_LOW;
SPI::Transmit(0b00010000); //NINCR
SPI::Transmit(0b01011010);
SS_HIGH;

At the moment I'm not able to control the chip. Can someone help me?
 

Offline Jacky_88Topic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Some problems with AD5932
« Reply #1 on: December 05, 2016, 08:57:29 am »
A "screenshot" of th SPI communication. It shows the writing of the first 16 bits to the CREG-Register.
 

Offline ace1903

  • Regular Contributor
  • *
  • Posts: 237
  • Country: mk
Re: Some problems with AD5932
« Reply #2 on: December 05, 2016, 09:12:36 am »
It is  difficult to see from the picture but I would guess that problem is in SPI mode that is set.
In datasheet says that data is clocked into the AD5932 on each falling SCLK edge.
On scope screen looks like that data is clocked in on rising edge.
Zoomed part with data to clock edge transition would help.
 
 

Offline Jacky_88Topic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Some problems with AD5932
« Reply #3 on: December 05, 2016, 09:41:14 am »
Okay, I've changed it:

(BTW: channel 4 (blue) shows the CTRL-Pin level. It's held low while writing and taken high after the las transmission)
« Last Edit: December 05, 2016, 09:44:07 am by Jacky_88 »
 

Offline ace1903

  • Regular Contributor
  • *
  • Posts: 237
  • Country: mk
Re: Some problems with AD5932
« Reply #4 on: December 05, 2016, 10:05:39 am »
Make test with corrected SPI mode.
Use metod setDataMode() to change default mode.
https://www.arduino.cc/en/Reference/SPISetDataMode
 

Offline Jacky_88Topic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Some problems with AD5932
« Reply #5 on: December 05, 2016, 01:38:09 pm »
I think I have found the problem. The chip is made by Analog Devices. So the chip isn't capable of any digtal function  ;).

I've been trying to get this IC working for at least 4 weeks now and I haven't got any results yet. Today the second AD5932 I odered showed the same behaviour. I tryed to build everything according to the shematics of the evaluationboard given in the datasheed and nothing changed. I give up on this one - maybe TI, LT or Maxim offer a more robust solution.

But I want to thank you for your help :D
 

Offline ace1903

  • Regular Contributor
  • *
  • Posts: 237
  • Country: mk
Re: Some problems with AD5932
« Reply #6 on: December 05, 2016, 02:55:36 pm »
Think that you are very close to the solution(maybe 1h).
Did you try to change SPI mode in software? Is it now clock edge corectly positioned?
Post pictures of your setup.
It is good that you have needed equippment but you need a bit experience in SW development.
It will be dificult to find simpler device than AD5932.
 
 

Offline Jacky_88Topic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Some problems with AD5932
« Reply #7 on: December 05, 2016, 05:12:28 pm »
believe me, I switched SPI-modes many times. I think, that the use of the 50 Mhz oszillator on a breadboard is a major problem. On the evaluation board  the same device is used (big metal box), but of course the routing is more appropriate.

On an other breadboard I'm using the ADS1248 (24 bit ADC) with no problems at all. At the beginnig it was difficult, but now it works very well and I wouldn't consider this IC as easy to use. The difference is, that the ADS1248'S manual is more detailed.
« Last Edit: December 05, 2016, 05:19:51 pm by Jacky_88 »
 

Offline Jacky_88Topic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Some problems with AD5932
« Reply #8 on: December 05, 2016, 05:19:27 pm »
Okay, after 10 times switching power on and off it shows something like this. It seems to be in sweep mode and stops at a frequency of 6.25 Mhz. With my understanding of the data registers it shouldnt do that, because D5 in CREG is set to 1. Channel 1 shows VOUT and channel two MSBOUT.
« Last Edit: December 05, 2016, 05:22:11 pm by Jacky_88 »
 

Offline IanJ

  • Supporter
  • ****
  • Posts: 1608
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: Some problems with AD5932
« Reply #9 on: December 05, 2016, 06:12:14 pm »
Hi,

As a test, connect a 33pF cap to the 1284 SPI SCK to gnd.
I've had issues with 328P & 1284 SPI timing on some devices that the cap fixes.

Ian.
Ian Johnston - Original designer of the PDVS2mini || Author of the free WinGPIB app.
Website - www.ianjohnston.com
YT Channel (electronics repairs & projects): www.youtube.com/user/IanScottJohnston, Twitter (X): https://twitter.com/IanSJohnston
 

Offline ace1903

  • Regular Contributor
  • *
  • Posts: 237
  • Country: mk
Re: Some problems with AD5932
« Reply #10 on: December 05, 2016, 06:23:27 pm »
OK, main problem is breadboard. Last picture shows that chip responds to SW commands.
Scope ground probe probably is connected in improper place and that is why you are seeing too much noise.
I would guess that output filter is also missing. Maybe power decoupling with capacitors is also poor.
DDS high frequency generator shouldn't be on breadboard!
Any device (be it Maxim or anything else) will perform similar if put under similar conditions. It is better to spend some time to make PCB using toner transfer method with correct grounding and power decoupling. Use lower frequency if 50MHz is not a must.
 
You have similar problems with ADS1248 but you are not aware of them. If you have made that with same approach as in DDS case you are getting probably no more than 10bit usable. Slow speed ADC averages noise and masks real problem. Use that board to measure small signal from thermocoulple and you will see that you will get random temperature readings.

No one found magic workaround for good layout and proper power noise decoupling.   

Share pictures of the setup and forum members will help you to improve design. But from breadboard it is difficult to get something usable.
 

Offline Jacky_88Topic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Some problems with AD5932
« Reply #11 on: December 05, 2016, 07:57:50 pm »
Okay. I just mentioned the ADC as an example for a more comple IC. I know that I will never see 24 bit on breadboard.
The output shown is a random result, I just know, that it works. So I will make my own PCB  :)
 

Offline branadic

  • Super Contributor
  • ***
  • Posts: 2390
  • Country: de
  • Sounds like noise
Re: Some problems with AD5932
« Reply #12 on: December 05, 2016, 08:58:52 pm »
Please check out the code written by my colleague Klaus Skibowski:

www.mikrocontroller.net/attachment/71731/ad5932.h
Computers exist to solve problems that we wouldn't have without them. AI exists to answer questions, we wouldn't ask without it.
 

Offline Jacky_88Topic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Some problems with AD5932
« Reply #13 on: December 06, 2016, 09:00:23 pm »
@branadic

Thanks, I will see what I can do.

I hope my designed PCB works  :) (not finished yet)
 

Offline Jacky_88Topic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Some problems with AD5932
« Reply #14 on: January 13, 2017, 06:01:10 pm »
Hello,

the DDS-IC works  :) I got the previously shown pcb manufactuered and placed the remaining parts (capacitors) on it. The PCB is designed to be used with a breadboard. The AD5932 finally works and the signal shows much less interference, but I won't go higher than 1MHz. I have to say, that the AD5932's datasheet lacks some important information about the SPI communicatian sequence and the use of its additional inputs.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf