There were a few questions in the forum about generating sine waves on the MCP4725 I2C DAC. To show one way you might accomplish this, an example sketch was added to the Adafruit MCP4725 library. You can set the resolution between 9-bit and 5-bit, depending on your requirements and how much flash space you can spare. 5 and 6-bit output would benefit from a basic filter to smooth the output out, but 7-bits and higher is reasonably smooth, as can be seen in the image above comparing the out from an Agilent function generator (in blue) and the MCP4725 sketch at 8-bit resolution (in yellow).
Sine Wave Example for MCP4725 DAC - [Link]
Since we’ve been busy adding quite a few I2C sensors and breakouts lately, I thought this technical overview of the 2-wire “Inter-Integrated Circuit” bus might be handy. I2C isn’t fast (typically limited to 400kHz in most real-world situations), but it’s convenient since it only requires two pins and more than 120 devices can be connected on the same bus, address space permitting. For low-pin count devices, it can be a real life-saver since you can hook an OLED display, a DAC, a 7-segment display and 16 servo motors up to your Arduino with a measley two pins and some careful coding! The full bus specification is available from NXP in UM10204 – the bus was created by Philips, whose semiconductor branch later became NXP — but the more concise information from Embedded Systems Academy might be easier to digest as a starting point. The FAQ has some very good information in it.
I2C Bus Technical Overview - [Link]
The aim of this project was to build an MP3/WAV player using just a FPGA, some RAM & a stereo DAC. The project consists of a custom 32-bit soft core processor running at just under 60MHz which decodes the MP3 algorithm in software with no hardware acceleration apart from a single cycle Xilinx multiplier unit.
FPGA based MP3/WAV Player - [Link]
In this article I will discuss my own experiences about designing a USB sound card, which is the USBDAC. DAC is an acronym for Digital-to-Analog Converter because in a sound card, digital data representing the sound is converted into analog voltage that moves the speaker cone.
My device is loosely based on the PCM2706 reference design. I will not go through the tecnical details but instead concentrate on my own experiences in the design of the device. This is to keep people not familiar with electronics, as well as newcomers to electronics design, interested. You will see that one working product is the result of many failed prototypes.
Designing a USB sound card - [Link]
If you’re interested in how delta-sigma modulators and ADCs work, you should check out this excellent introduction by Uwe Beis: [via]
When looking for an introduction to delta sigma conversion I found that most explanations were from a very theoretical point of view. It took me a while to understand how Delta Sigma converters really work. So I decided to write this introduction for people who prefer circuit diagrams to reading abstract equations.
To understand what I’m talking about you should at least be familiar with:
- Standard analogue techniques (op-amps, comparators etc.)
- Standard digital techniques (latches, binary codes etc.)
- Standard ADCs and DACs (resolution, speed)
- What a low pass filter is (at least an analogue one)
- The sampling theorem (sample frequency > 2 x input bandwidth, alias effects)
Delta sigma converters are different from other converters. Note that I do not make a difference between analogue-to-digital (ADC) and digital-to-analogue converters (DAC). Both are very similar and what is realized in one of them using analogue signal processing circuitry is implemented in the other one using digital signal processing and vice versa. I will explain the delta sigma technique with the analogue-to-analogue delta sigma converter as the first object.
An Introduction to Delta-Sigma Converters – [Link]
JC’s MSP430 LaunchPad Blog presents this short tutorial on using DAC with the LaunchPad. He writes: [via]
This post will show you how to generate a periodic analog signal using the LaunchPad and the MSP430G2231. For the sake of simplicity, I stuck to the default DCO value. This will allow us to generate a very clean sine wave at 128Hz. If the DCO is increased to 16MHz and a few other design parameters are changed the maximum frequency can be over 4kHz. Using the MSP430F5510 I was able to generate a crystal clear 32kHz sine wave.
Why would you want to do this? Well, this code can be modified so any arbitrary analog waveform can be generated (reasonably speaking). At the very least you will learn some interesting analog principles if you decide to build this mini-project.
Simple LaunchPad DAC - [Link]
This article goes through how to create a VGA controller that uses a resistor DAC to create 512 unique VGA colors. The tutorial uses an Altera CPLD and VHDL code to create all the video signals. The theory, hardware schematics and software are all explained and available for viewing/download.
FPGA VGA Resistor DAC - [Link]
It’s true – I love DACs. There’s something awesome about the role they play, translating information from one paradigm over to another form. Sure, you can pick up a precision DAC chip with serial interface for a little over a buck, but building a barebones version from a handful of resistors is a pretty dang sweet trick. If you’ve never built one, I do recommend it. Doing so has a way of demystifying all sorts of related circuits and processes.
Collin’s Lab: Digital to Analog Converter – [Link]
Embedded Newbie has compiled a list of Arduino DAC solutions. [via]
I was in a need of an analog output output for my Arduino, and I found quite many different digital-to-analog converter (DAC) solutions by googling around. So finally I decided to gather them on one page as a reminder for myself and a guide for others. So here it comes!
Review of Arduino DAC solutions – [Link]
The Xprotolab is the first mixed signal oscilloscope with an arbitrary waveform generator in a DIP module. It measures only 1.6″ sq. inches, and can be mounted directly on a breadboard. The Xprotolab can also be used as a development board for the AVR XMEGA microcontroller. The Xprotolab uses an ATXMEGA32A4 microcontroller, it uses the internal ADC with up to 2MS/s and the internal DAC for the arbitrary waveform generator of 1MS/s.
Xprotolab: Small fully featured atxmega32 scope – [Link]