Hot answers tagged dac
30
That looks like a sine wave with the y-axis wrapped around. Here's my attempt at recreating it:
This is a plot of the function \$1.25 \cdot \sin(t) - \operatorname{round}(1.25 \cdot \sin(t))\$, where \$\operatorname{round}(x)\$ rounds \$x\$ to the nearest integer.
Perhaps the highest bit of your signal is getting cut off? That would seem likely to ...
15
What is your required precision/accuracy?
I will cover the foundations of a simple method, and update if necessary.
Parts:
You may already have what is necessary ;)
Lets look at your PWM outputs. Depending on the duty cycle, or how long the pulse is "high" compared to "low", an average level can be achieved.
You can keep this chart in mind as you are ...
15
First, some microcontrollers DO have D/A converters. However, these are far less common than A/D converters.
Aside from the technical issues, the main reason is market demand. Think about it. What kind of application would require a real D/A? It is quite rare to want a micro to produce a reasonably high speed analog signal unless the point is signal ...
11
Consider the Microchip TC1321 it's an I2C digital to analog converter (DAC) with 10 bits of resolution (4.88mV/step), available in SOIC8 (you'll need an easy to solder adapter board [eg sparkfun's or futurlec's) and operates from 5 volts. If you're OK with only 8 bits (19.5mV/step) consider the TC1320.
Both chips are available from Mouser or Microchip ...
11
The best RC is infinite, then you have a perfectly ripple-less DC output. Problem is that it also takes forever to respond to changes in the duty cycle. So it's always a tradeoff.
A first-order RC filter has a cutoff frequency of
\$ f_c = \dfrac{1}{2 \pi RC} \$
and a roll-off of 6 dB/octave = 20 dB/decade. The graph shows the frequency characteristic ...
10
To give a basic example of how a 1-bit ADC can be used to obtain useful information from a waveform, take a look at this circuit. It uses a triangle wave to turn the information into a pulse width modulated output. This is a similar but simplified version of how other 1-bit ADC techniques work, by using a (usually fedback) reference signal to compare the ...
9
A one-bit analog to digital converter (A/D) is just a comparator with the threshold in the middle of the range. Usually you don't call it a 1-bit A/D though, although it is legitimate to think of it that way.
There are ways to make use of a comparator to ultimately get a higher resolution digital value. A delta-sigma A/D is one example. This keeps ...
8
These are decoupling capacitors. They are there primarily for two reasons:
Power supplies take time to respond to a demand for more current from the device. The capacitors act as a local reserve until the power supply responds.
Digital logic devices demand current very abruptly (due to the steep logic edges). The inductance of the power supply traces makes ...
8
I have in fact seen that before. I was working on an ADSP-21xx processor. The audio CODEC put the incoming data in signed 2's complement format. That particular day I was sending the data to a multi channel Maxim DAC that was expecting unsigned binary. Everybody around had a laugh at the Batman ears, then I added a few lines of code to get back to unsigned ...
8
Assumption: Based on the wording of the question, presumably certain input pins must not be floating to a "high" condition when the AD7541A is powered on.
The conventional method of preventing a pin from floating, i.e. ensuring that it is held low until some logic state is imposed upon it by an external device, is to use a pull-down resistor on the pin in ...
7
Depending on what you are driving, if you have an Arduino you already have three to six Analog outputs, as you can use the AnalogWrite function to set the duty cycle of the PWM pins. The frequency is approximately 490 Hz, more than sufficient for LEDs (again, it depends on your application). You can set the value from 0 to 255, giving you a resolution of ...
7
This is very interesting. I decided to take a look at the concept of losing the most significant bit of a sine wave sequence. I did it for a half cycle of a sine wave and it does indeed lead to the wave shape in the original poster's question.
The spreadsheet I created steps the argument for the sin() function from 0.00 to 3.14. It then scales the range ...
6
There are many many many many excellent existing on web tutorials on this.The following are excellent examples BUT you should have a look around as much has been written that will improve your general understanding far more than having people spell out again something which is so well covered elsewhere.
This one gives a better than some concise explanation ...
6
A brown-out is a short dip in the power supply. Many microcontrollers have brown-out detection on-chip, often, like in the Atmel AVR, with programmable threshold levels. When a brown-out occurs the microcontroller will be reset.
This may seem a bit drastic, but it's a question of reliability, and safety. If just one of those thousand of gates would lock due ...
5
If it were me I would use an IC to do the DAC for me. The manufactures of the ICs take a lot of time and consideration for getting matched components and put them in the best configuration.
The TC1320EOA is probably a good solution for what you want. It has I2C and in an 8pin SOIC configuration. I bet you will be hard pressed to get a design this small if ...
5
Most people drive the rungs of an R2R ladder with standard CMOS output pins.
The "topology" directly connected to that output pin is generally a static CMOS inverter:
where 'Q', Vdd, and Vss are physical pins you have access to, and 'A' is internal node of the chip.
Some of them use a few CMOS output pins on a microcontroller to directly drive the R2R ...
5
I haven't looked at that datasheet, but what's wrong with the usual method of putting weak pulldown resistors on every pin that you don't want to float? If these are CMOS inputs, then 100 kΩ should do it. If you think there might be a lot of noise, you can use lower values. Assuming these pins are driven by normal digital outputs once everything is ...
4
This sounds like there is some DC Bias removal taking place. In general with audio you want your average voltage should be 0v. This is because of how speakers work. 0v would mean that the speaker is at rest. In order for the speaker to sound normal you want it to be able to go back to its resting position.
In order to achieve this, sound cards will remove ...
4
This is the case where reading the datasheet is truly the best thing for you to do -- they will tell you exactly how to initialize, start [and stop], and use both an ADC and DAC. Since you haven't named a specific MSP430, ADC chip, or analog signal characteristics, I'm guessing that the design is very much in the initial planning stages. I suggest nailing ...
4
The feedback pin is expecting a DC error voltage, with some usual stuff (ripple, noise, etc.) riding on it. The analog voltage loop is bandwidth-limited so that only useful information is used to determine the duty cycle of the converter.
The easiest way is to use a DAC output and a series resistor to either sink or source amount of current out of / into ...
4
DACs have different requirements depending on the application. You'll find high precision solutions using expensive components to get good absolute precision, but in audio you don't need that. Linearity is the most important parameter.
Since you'll be using an ATmega2560 which comes in a 100-pin package you can probably spare 16 I/Os, and then I would ...
4
That's easy to answer with a general answer and immensely hard to answer in full detail that people have been writing books and papers about it for decades.
I've had some personal experience of this about 10 years ago when I implemented what was meant to be a simple and cheap SD converter (other side of same coin) with a mix of hardware and software and ...
4
In my other answer I focused on the high voltage, which is a problem for many components (and which David doesn't cover in his answer).
You may also do most of it at lower, logic levels, and only go to 20V at the end. The HCMOS outputs of your microcontroller, or external logic IC, have a complementary MOSFET output, capable of both sourcing and sinking ...
4
Look for DDS (Digital Direct Synthesis) which uses a low pass filter as mentioned in the other answers:
It then uses a varying PWM signal to create a sine wave:
All you need in order to implement it with an Arduino, including the source code for the PAM generator, can be found in this article.
4
One difference not yet mentioned between the terms "1-bit ADC" and "comparator" is that in many places where comparators are used, it is desirable to have hysteresis in an amount which is greater than the system's baseline noise level, but in applications that use a 1-bit ADC, such hysteresis is not wanted.
When constructing a multi-bit DAC or ADC, it is ...
4
The Due is the only Arduino board with a built in DAC. (Two of them.) If you need more than two outputs or want to use a board such as the Uno, then you need to consider building a DAC.
Option 1: PWM
Using a RC-filter you can create a low-pass filter that allows you to create true analog voltages from a PWM pin. This method could be difficult to ...
3
The MCP4922 is a single chip 12bit DAC with an SPI interface. It's cheap and available in hobbyist quantities. It's very simple to drive.
There's also a mono version, the MCP4921.
It's used in the Critter And Guitari Arduino synthesizer and there's source code available.
It can make sounds like this and this.
3
If you're looking for simple, you can use an R-2R resistor ladder. It takes a fair bit of DIO, but you give it a digital number, it gives you the proper analog level.
From Resistor Ladder, Wikipedia
3
Your limiting factor is probably voltage swing.
If your driving higher end headphones your probably looking at a 250->300 ohm load, 300ohm for higher end sennheiser cans for instance. But some phones (mostly professional models) can go as high as 600 ohms.
At 300ohms:
For 100mW you need 5.47 Vrms = 15.48 V peak-to-peak ( 18mA RMS)
For 200mW you need ...
3
The DAC08 also won't work properly without a negative supply voltage, in addition to the above mentioned problem. The '08 output sinks current, so ideally it should drive a transimpedance amplifier, which you can make by connecting IOUT to the inverting input, noninverting to ground, and a gain resistor between the output and the inverting input. The output ...
Only top voted, non community-wiki answers of a minimum length are eligible