Hot answers tagged

40

It seems like you are running into Slew Rate Limitations, and your output is presenting what is called 'Slew-Induced Distortion' - the Op-Amp's Output Swing is limited by the Slew Rate, so as frequency increases the limit for maximum output swing without 'Slew-Induced Distortion' decreases - typically Op Amps Datasheet have an 'Output Swing vs Frequency' ...


32

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 ...


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 ...


28

It's possible, but it won't work well. Firstly, there is the problem of combining the two outputs, with one scaled precisely 1/256 of the other. (Whether you attenuate one by 1/256, amplify the other by 256, or some other arrangement, *16 and /16 for example, doesn't matter). The big problem however is that an 8-bit DAC is likely to be accurate to ...


25

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 ...


21

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 ...


21

What you're seeing is a mismatch of the turn-on/turn-off time of the msb compared to the other bits. Pretend for a moment that this is an 8-bit DAC, sitting at code 01111111. If the next code were 1000000, you'd get a well-behaved step. But what's happening is that internally the msb responds a bit quicker than the other bits. This means that the transition ...


19

An 8 bit DAC can output \$2^8= 256\$ different values. A 16 bit DAC can output \$2^{16} = 65536\$ different values. Note how that multiplies, it is not an addition (as would happen when you sum the outputs of two 8 bit DACs). If I would take two 8 bit DACs and sum their outputs, what are the possible values ? Answer: 0, 1, 2, ..., 256, 257, 258, ....511, ...


18

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 ...


18

What you have right there is what is known in the field as an R-2R DAC, one of the many different kinds of often employed digital-to-analog converter topologies. You have answered your own question: why do we need DACs when we have this DAC topology? Because it is a DAC! R-2R DACs purely by themselves are not great as a general purpose digital to analog ...


14

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 ...


14

All in- and outputs on most digital devices today have clamp diodes to the power rail. These diodes are there for protection of the device, to prevent a pin from having a higher or lower voltage than the supply rail. What you are experiencing here is that you actually power the DAC through its data pins and the respective protection diodes. Although the ...


14

The LM324 is an old and slow OPA. It has limited "slew rate", no more than 0.5 V/us, which doesn't allow to follow large amplitude signal changes faster than 1 MHz, as you found this in your own experiment. There is nothing you can do to improve the slew rate. You need to procure a faster operational amplifier.


14

The bits you control are either On or Disconnected, while in general a R2R DAC input would be connected to 3V3 or 0V. Disconnecting changes the impedance. Try with SPDT switches.


13

DACs are relatively expensive in silicon area. Far fewer applications need analogue output than input, and the DAC functionality needed for a large proportion of applications can be achieved more cheaply using PWM and a small amount of external filtering.


12

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 ...


11

How about a DC blocking cap with a resistor to bias the output at ground (simple RC high pass filter)? It's rather easy to shift signals around if you don't care about preserving the DC component. There are definitely lots of DACs available that support bipolar analog supplies, but they may be a bit expensive. If you plan on performing any analog signal ...


10

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 ...


10

Historic reasons. Part of the "red book" CD specification allowed CDs to be recorded with a specific preemphasis characteristic. When used with a 44.1kHz sample rate, to decode those specific CDs (a minority of all CDs) you need to apply the inverse (deemphasis) characteristic. This can be done externally with an R-C network but it's cheaper to do it on ...


10

Other pins on the same chip carry logic level signals, which will cause measurable currents into the input impedances of those pins, as well as further switching activity within the DAC. Those currents will cause voltage drops across the GND bond wires. If it's a high resolution DAC, (above 16 bits), those voltage drops can be comparable to the analog ...


9

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 ...


9

There is a lot of bad information and audio phoolery available on this topic, but if you're doing one channel of digital audio, 96kHz and 192kHz sample rates are silly. Human hearing extends to 20kHz. To satisfy Nyquist at 20kHz, we need a sampling rate greater than 40kHz. CDs are 44.1kHz, and 48kHz is another common sampling frequency. Now, let's recall ...


9

"FS" means full-scale, which may be determined by an external voltage. "LSB" means Least Significant Bit - in this case, the voltage represented by one least significant bit. In a 16 bit DAC like yours, that's 1/216 of the full range. Thus, "+FS-1LSB" means "full scale voltage less one least significant bit". For a full scale voltage of 10 volts, that's 10 ...


9

is your friend... (Well maybe that's debateable.. but 10S search found me this.) e-Bay


9

Try this datasheet instead. Refer to Table 6.8 - Operating Conditions on page 7. The 1st parameter in the table is the "Slew rate at unity gain". This tells you how fast the opamp's output can move, and for this LM324 it's 0.5V/μs - and that's with almost no load (1MΩ || 30pF). From your scope measurements it looks like you're seeing about 0.2 to 0.25V/...


8

Two further issues, not yet mentioned: There are many cases where a part will need to be able to measure the voltages on many pins, but not simultaneously. It is possible to use a single ADC along with one pass-gate per pin to accomplish this. By contrast, most parts which would need multiple DAC outputs would need them simultaneously. The circuitry that ...


8

As Steven said, it's a tradeoff between attenuating the PWM frequency versus response time. This is why any such decision has to start with a spec of what you want from the resulting analog signal. What signal to noise ratio does it need to be, or at least how much noise at the PWM frequency can you tolerate? How fast does it have to settle to the noise ...


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 ...


8

Yes, all microcontrollers have some way to produce voltage signals controlled by the firmware. The brute force method is for the micro to include a digital to analog converter (D/A). The firmware writes a number to the D/A and it produces a voltage proportional to that number. One important spec of D/As is how many bits the number has. This determines ...


Only top voted, non community-wiki answers of a minimum length are eligible