Wednesday, 30 September 2015

Lab Power Supply Project - AD7705 Followup

After all the problems I had with the AD7705 described in my previous post the cause of the second channel problem turned out to not be what I expected. In desperation I tried out the Arduino software for the AD7705 provided by Kerry Wong on his blog. I reasoned that this should work if the configuration is identical (which didn't take much to achieve - I just moved the SS line to a different pin).

Interestingly it behaved in exactly the same way as it did with my software - i.e. channel 0 worked but channel 1 didn't.

Then I started to think the part may have been damaged - I did muck up the placement of the reset line at some point. Maybe I damaged it?

I ordered a replacement from Element14 - I found a through-hole version for a fair bit less than what I paid for the surface mount one and tried it out.

Sure enough - it worked!

That's all for now - I just wanted to provide this quick update.

2 comments:

  1. Hey I enjoyed reading these two pages about the ad7705 as I have had not very much fun with mine... i thought I might as well ask. I have three ad7705 boards i bought off ebay. I cant get any of them to read a potentiometer. I would hope its not that all the boards dont work or that i keep breaking them. They are red and are wired up in a pretty conventional way. I have tried the wong library, a few other custom codes and i get only ever 0 or occasionally strange numbers thrown in. At one point the pot was changing the rate at which numbers were printed to serial which was odd. I have no idea what to do next. Am i wiring up the pot incorrectly[5v,ain1+,Gnd]? Do i need to have the reset pin wired? Is it just not setting up right?

    ReplyDelete
  2. Thanks!

    Yes I had a lot of problems getting it to work at first too. Yes definitely you will need the reset pin pulled high. Are you polling for DRDY viia SPI or by polling the DRDY pin of the chip? I had issues with this too - this was the biggest blocker to getting sensible data. In the end I used the DRDY line as it seemed to respond more quickly.

    Also the initialization sequence is quite particular. You have to configure setup registers as per the data sheet before you read or it won't work.

    Another thing to check is the SPI settings. In particular the clock phase/polarity. Which software are you using? Kerry Wong's?

    With the input - the chip is sort-of bipolar. You can configure it to be unipolar where AIN- is connected to ground but then the input range is only 0..2.5V. To get a full 5V range you need to configure it as bipolar and wire the AIN- to the REF line. Note that while AIN+ can be below AIN- it can't actually be below the GND (VSS) of the chip - hence it is sort-of bipolar. If you have REF connected to AIN- and your pot between 5V and GND with the wiper connected to AIN+ you will then get the full 5V range and should be able to read the pot.

    Also do the boards have a voltage reference on them? This part doesn't have a built in reference unfortunately. You will need a 2.5V reference to get the 5V range also.

    The datasheet is a bit of a nightmare too. The Analog Devices forum is staffed by AD support people if you get really stuck.

    Happy to answer more questions.

    ReplyDelete