Post Go back to editing

No ac output on AD5934


I'm working the the AD5934 in the CN0349 evaluation board, and able to communicate properly with the AD5934 over I2C, but I can't get it to actually start its sweep - I can't detect any AC voltage on TP2 (or anywhere else on the board other than the clock).


NB: The CN0349 has a 1 M Hz clock

I want a sweep from 1 kHz, 500 Hz step, 5 steps.

Start freq: 2^27 * 1 000 * 16 / 1 000 000 = 2 147 483 = 0x20C49B

Step: 2^27 * 500 * 16 / 1 000 000 = 1 073 741 = 0x10624D

Steps: 5 = 0x0005

All of this data is loaded into 0x82 to 0x89, and I can read it back and it all seems OK

Enter Standby with 2v range, x5 pga gain: Load 0xB0 into 0x80.

I never see any change at the test point, the status register 0x8F always contains 0x30 or 0x70.

What am I doing wrong?

  • Sometimes, when the AD5933 code is reused, the internal oscillator gets selected as the source of MCLK. The AD5934 does not have the internal oscillator, and that causes the described symptom.

    What is the DC voltage level at the VOUT pin while there is no AC? If it is zero, the chip might be stuck in Standby mode. Is the Enter Standby Mode command followed by Initialize with Start Frequency command (bit D12 is set to 1 in the control register 0x80)? After that the chip should be outputting AC voltage at the start frequency.

  • I'm not re-using any code - I'm using a Pi Pico and there doesn't seem to be a lot of Micropython code around for this - maybe because the standard i2c library in register access mode doesn't play nicely with the AD5934, so I've implemented the register access functions myself. I'll share it once I'm happy it's actually working!

    On the real issues: - the hint to check the clock source is useful - the AD5934 data sheets says set to 0x81 D3 to 1 but doesn't say what it's for (thought I've now found it in the AD5933 datasheet), and I suspect that register is powering up in the wrong state - I have a vague memory of seeing it as 0x00 despite the data sheet saying it should be 0x08.

    I have set the unit into "Initialize with start frequency" state after "Standby" ie. (load 0x10 into 0x80) and it hasn't made any difference. I think Vout stays at 0v.

    I'll confirm both of those bits of info when I'm back in the lab on Monday.

    Thanks for your help.

  • I should have said ''...especially when the AD5933 code is reused." 

    Not really much of a help: with this remote guessing there is always a possibility of embarking on a wild-goose chase. Best of luck with your project!

  • Thanks, the clock source was the issue. The chip was coming up with 0x00 instead of 0x08 in register 0x81 (low byte of the command register), which is easy to fix (though a little weird that it's not doing what the data sheet says). I now get an waveform on VOUT & TP2, and the chip claims the data is valid after the the sweep is actually initialised.

  • Great to hear. Indeed, the datasheet leaves much to be desired - nowhere it says explicitly that it is user's responsibility to set the clock source to external, which, with no internal clock source, is rather counter-intuitive. The AD5934 seems to be a lower-cost and somewhat neutered version of the AD5933 and this appears to be some post-amputation circuitry and associated logic while the internal oscillator is no longer present - should have been better documented.
    You mentioned setting PGA gain at 5x. With that setting care must be taken to ensure that the internal ADC does not receive the voltage sinewave clipped at the power rails, otherwise the "DFT" mindlessly crunches the distorted sinewave and outputs incorrect data in the Re and Im registers. The user has no direct means for detecting this situation - another potential pitfall the datasheets are silent about. In early stages of the project it is safer to start with PGA gain = 1x: in this case the voltage sinewave that ADC receives is the same as the voltage on the RFB pin, which at least can be checked with an oscilloscope if the output numbers are suspicious.    

  • Yeah, I'm aware of that. AN-1252 includes an expression for the max value for the feedback resistor, which gets modified a bit depending on how you set up frontend (which in necessary my case, because I'm using the  CN-0349 board, which has a a rebiasing circuit on the output, and moves the TIA outside the chip on the input).

  • Great. In the AN-1252 only the formula for Rfb as a function of Zmin makes sense: Zmax is theoretically infinity (when nothing is connected in place of Z). Gives a good check whether the circuit functions properly: when nothing is connected, TIA output should be constant, so Re and Im readings should be bouncing ± a few counts, usually within ±10-15 or so. Best of luck with the rest of your project!