sku: BOB-08736
Description: You've always wanted to output analog voltages from a microcontroller, the MCP4725 is the DAC that will let you do it! The MCP4725 is an I2C controlled Digital-to-Analog converter (DAC). A DAC allows a digital device like a microcontroller to output analog values like a sine wave. Digital to analog converters are great for sound generation, musical instruments, and many other creative projects!
Features:
Documents:
COM-08635
Electret MicrophoneBOB-10403
PCA9306 Level Translator BreakoutTOL-08938
USB Logic AnalyzerCOM-09903
LinkM - USB to I2C
Comments 19 comments
This DAC works very nicely and gives me great resolution, i.e. 4095 steps from 0 – 5 volts.
But I can only use one DAC, since the breakout board’s design ties the “External A0 Address Pin” to Vss.
Personally I would like to use two MCP4725 – one with address 0 (A0 = Vss) and one with address 1 (A0 = Vdd).
Still a very nice board. Thanks for making it available.
Cheers,
Stephan Schulz.
I agree that the address should be configurable on this board. Just some pads that could be bridged with a dab of solder would be fine. Next rev?
—Adam
Maybe some jumpers or break-out the address pins?
Just a couple comments. The pin numbering on the schematic in the link above is incorrect. (e.g., A0 should be pin 6.)
I also agree the address pin should be brought out in the Breakout Board. Per the datasheet, the Device Address Selection pin can be tied to VSS or VDD, or can be actively driven by the digital logic levels. The logic state of this pin determines what the A0
bit of the I2C address bits should be.
Alternately, SparkFun could offer four different versions of the Breakout Board (by just changing which MCP4725 is soldered to it) or offer just the PCB with the two resistors and the cap pre-soldered and offering the DAC separately.
Part Number Address Option Code
MCP4725A0T-E/CH A0 (00) AJNN
MCP4725A1T-E/CH A1 (01) APNN
MCP4725A2T-E/CH A2 (10) AQNN
MCP4725A3T-E/CH A3 (11) ARNN
OR, it’s easy enough to simply swap the 6-pin SOT-23 DAC chip.
Anyway, thank you again SparkFun for an awesome Breakout Board.
Does this BOB come with the chip? Usually a breakout board is just a blank board, but the comments here make me think that the part is included on the board.
It would be beyond amazing if there was a version of this breakout board with 8 of these dacs…two of each dac, and all connecting the my ariuno with just 4 wires including power and ground! I honestly can’t think of any use for a single single-channel 12bit dac…at least not when I can use serial to control a 8-channel 12bit dac.
I see this can be used for sound-synthesis, so I wonder, what kind of samplerate we can get with this thing? Also, how good is the audio quality?
I bought it to be used for sound, too. But the problem is not the sample rate — it is the communication. I2C operates around 100kHz, so to send over 12 bits of data plus all the config data can take a while. I tried to put out A440hz and, due to the slow communication, I got something more like a high G. Not at all good. Check out the parallel DAC. It should be much faster.
I got fairly plausible sound out of this breakout board (demo), using an IXM as master, clocking the I2C bus at around 225KHz. I2C ‘fast mode’ at 400KHz worked fine too, and limited testing suggested this DAC will accept clocking quite a bit faster than that even without messing around with the official ‘high speed mode’ extra I2C protocol step.
That’s true. But the problem was that the I2C bus is too slow to get the actual notes, i.e. if I code for a 440Hz triangle, I will get no where near that. Use the parallel one for higher tone accuracy.
How exactly would I use the I2C interface? Just clock out a byte or two of data?
Anyone tested this with an Arduino yet? I pretend to use for a musical instrument, not sure if its applicable, but heck, for the price. ;–)
Although I used an IXM rather than an Arduino, I did use this I2C DAC and breakout board, and the video linked above demonstrates two octaves of sinusoidal pitch generation, on-the-fly two tone mixing, and playback of lo-fi but credible sample sounds ranging from special effects to famous voices to music. That said, I totally agree the I2C bus itself is less than ideally suited to this task..
Hi!
I have ordered this DAC and I am using it in my Project. I want to get cat sound through this DAC. My cat sound is in .wave format. How should I code it so that to be used by the DAC?
Should the cat data bein Hexadecimal or binary?? and what program do you recommend to convert my .wav file??
Any help is appreciated :).
P.S : I went through datasheet but I did not really know what type of format it should be?
Thanks in advance.
Regards,
Raghad
The SOT-23-6 schematic pinout in the eagle files is wrong and so is layout pinout, and 2 wrongs make a right. If you’re using the eagle model on your board, you will want to fix this or put your part on your board flipped. Its all screwy, just check sparkfun’s work prior to using this eagle file set.
from the datasheet
vout 1
vss 2
vdd 3
sda 4
scl 5
a0 6
from the eagle files (these are wrong)
vdd 1
vss 2
vout 3
sda 6
scl 5
a0 4
The address pin A0 should also be available as one of the breakout pins.
how do you set the settings?
This would be that much more awesome if atmegas supported I2C fast mode…