MCP4725 DAC circuit

Hi all,
I’ve attached my schematic as an eagle sch in addition to the image below. What I was hoping to accomplish with this design was 2.5V on one terminal of a panel ammeter (0-100uA); MCP4725 to control voltage on the other terminal. If I’ve done my maths correctly I should be getting full scale across 0-5V. What I’m getting is no response at all. The MCP4725 library is from adafruit and one I know to be working just fine (I played with the corresponding breakout) so I’m pretty certain the problem lies in my schematic but I’m a bit of a noob at this and don’t see the problem. Thanks very much for helping!

EIL121H.sch (60.8 KB)

What I2C address are you using? I can only guess, given the conspicuous lack of code.

Datasheet:

7.2 Device Addressing
The address byte is the first byte received following the START condition from the master device. The first part of the address byte consists of a 4-bit device code which is set to 1100 for the MCP4725. The device code is followed by three address bits (A2, A1, A0) which are programmed as follows:
• The choice of A2 and A1 bits are provided by the customer as part of the ordering process. These bits are then programmed hard-wired) during manufacturing
• The A2 and A1 are programmed to ‘00’ (default), if not requested by customer

Adafruit says this:

“This board/chip uses I2C 7-bit address between 0x62-0x63, selectable with jumpers”

This is interesting, because the Microchip datasheet suggests that the address should be 0x60-0x61, dependent on the jumper for A0. It looks like the chip Adafruit is using has the A1 bit set to 1. Since you have that A0 pulled low, a factory chip should have an address of 0x60, not 0x62. I would try all eight addresses from 0x60-0x67 just to be sure. Did you try that?

Edit: Also, I would test VOUT with a voltmeter or multimeter to eliminate the ammeter as a possible problem.

Building on what JoeN said, you could try this:

http://playground.arduino.cc/Main/I2cScanner

Building on what JoeN said, you could try this:

Arduino Playground - I2cScanner

Great tool to have. It will give you the address of all I2c devices that are connected.
You can then log these in a file so in the future you don't install a device with the same address.

JoeN:
What I2C address are you using? I can only guess, given the conspicuous lack of code.

...

Adafruit says this:

"This board/chip uses I2C 7-bit address between 0x62-0x63, selectable with jumpers"

This is interesting, because the Microchip datasheet suggests that the address should be 0x60-0x61, dependent on the jumper for A0. It looks like the chip Adafruit is using has the A1 bit set to 1. Since you have that A0 pulled low, a factory chip should have an address of 0x60, not 0x62. I would try all eight addresses from 0x60-0x67 just to be sure. Did you try that?

Edit: Also, I would test VOUT with a voltmeter or multimeter to eliminate the ammeter as a possible problem.

First thing I did was test VOUT and I'm seeing 0; I am getting 5V at VDD and ~2.5V at the other terminal. I'm less confident in my circuit electronics than my code but perhaps I should be less confident in my code! That is a very interesting find; I tested the adafruit breakout with I2C address 0x60 (mcp4725.begin(0x60)) and it worked without issue...that's very odd. I'll cycle through the I2C addresses when I can get back at it - silly real work getting in the way :slight_smile:

Hackscribble:
Building on what JoeN said, you could try this:

Arduino Playground - I2cScanner

Thanks very much for that! That's very cool and seems darned useful!