1
\$\begingroup\$

I am trying to create a sawtooth waveform using microcontroller/counter and DAC. Instead of getting a nice smooth ramp, I am getting a ramp but with impulses and other noise. I am using AD7533 DAC and AD8055 Op Amp. The 10 bit input comes from a microcontroller. I am interfacing the DAC using figure11 from dac's datasheet:

enter image description here

Considering the note under the drawing, I decided to omit R1 and R2 from the circuit and made it the following way:

enter image description here

When I measure the signal at the negative terminal of the OpAmp, I get this reading:

enter image description here

which is not that attractive. Changing Vref does not make much difference. At Vref=5V the signal on the negative OpAmp input looks like this:

enter image description here

When I measure the signal on the OpAmp output pin, it looks like saturated:

enter image description here

So, two questions:

  1. Am I missing some trivial components? Why the signal looks so bad?

  2. Why OpAmp gets saturated if I do not do any gain? Moreover, the signal is withing 0-3V range and the power on the OpAmp is 5V.

EDIT: So, I considered suggestions from the comments (shorted R2 and added negative rail to OpAmp power) and there I am getting this waveform:

enter image description here

It still looks very noisy and when I zoomed it in, the ramp also looks to float up and down:

enter image description here

Theoretically, since my range is about 3.3V peak to peak, and given 10 bit resolution, the output signal should have resolution of 3.3mV. Whereas, the noise is as bad as 100mV. Any practical approaches on how to fight this noise?

Also, my next stage is going to be AD8531. I will use it as a high current G=1 buffer - the output from the AD8055 will be connected to +in of the AD8531. Do I need to place the load resistor to ground between the two amps, or connect the output to the input directly?

\$\endgroup\$
  • \$\begingroup\$ Does gnd and Vref also float up and down? Where is your ground connected? \$\endgroup\$ – user38637 Apr 17 '14 at 15:31
4
\$\begingroup\$

Considering the note under the drawing, I decided to omit R1 and R2 from the circuit

R2 needs to be shorted to get this to work.

Op-amps don't work properly without feedback and that's what the line to pin 16 provides. There's probably a clue in the name of the pin if you look.

enter image description here

EDIT about power rails

I'm mentioning this because I think your AD8055 is powered from +5V and 0V - this will cause the problems listed below (if not using a negative rail) and I don't think the AD8055 is rated to run below a supply rail of +/-4V. Looking at your picture of the output, it appears to be bottoming out at somewhat above +500mV and rather similar to what the implied lowest output level would be on this device in the data sheet.

Just in case your supply regime is wrong, this is how it should look (different chip but same principle): -

enter image description here

Note the negative and positive rails on the op-amp because Iout is positive for a positive reference and for the Iout pin to be held at virtual earth, the op-amp's output must fall below 0V. Here's probably a more explicit example: -

enter image description here

Note that for a Vref voltage of (say) +2.5V, maximum output will be virtually -2.5V with lower values heading to 0V. At no time will the output be positive unless you use a voltage reference that is negative. This is a multiplying DAC configuration and inversion is inherent.

\$\endgroup\$
  • \$\begingroup\$ Thank you. I shorted the R2 and provided +/-5V for opAmp supply voltage and now it's all good. However, I really want to avoid having negative rail. Do you have any suggestions how to modify the circuit to be within 0-5V range? I can do 0-12V on the OpAmp power. \$\endgroup\$ – Nazar Apr 16 '14 at 14:38
  • \$\begingroup\$ @Naz, what about a negative voltage reference? If not then look for a DAC that is voltage output type not current output type. \$\endgroup\$ – Andy aka Apr 16 '14 at 14:40
1
\$\begingroup\$

Adding to Andy's answer, the reason your op-amp is slamming between 0 and Vdd is because there is no feedback. It's acting like a comparator. If V+ > V-, output=1. If V+ < V-, output = 0. With feedback, the op-amp will be able to steady in on some value that holds V- at V+.

\$\endgroup\$
1
\$\begingroup\$

In addition to Andy's correct reply, I recognize the spikes as digital noise getting into the analog, from excessive gain from missing feedback, R2.

This can either be from DAC ground current or crosstalk to the analog Vref. Notice how the biggest spike is mid scale where ...011111 switches to ...100000. Lack of isolated digital and analog ground and Vref coupling will produce thus. Although, I have never seen it this bad.

Look at beefing up grounds, shielding and isolating the DAC input current from the analog section. If it still looks bad, call supplier for tech support. I had one like this but only a few bits of spikes from Burr Brown in the old hybrid packages, from Vref noise.

Connecting R2 should reduce the impedance and gain, both correcting most of the problems. The residual noise can be inspected from above comments.

\$\endgroup\$
  • \$\begingroup\$ How do I isolate digital and analog grounds? Both lines use the same power supply. \$\endgroup\$ – Nazar Apr 16 '14 at 14:22
  • \$\begingroup\$ This takes some imagination but current loops have conductive and inductive voltage drops. Many methods. When impedance is low, the noise is low. So large ground planes is 1 way. another is 2 large planes joined by short inductive track at common point, another is differential logic, (not for here) another is differential analog (not here) Give thought to impulse currents from logic edge driving capacitance and make sure none of mV drop contributes to analog voltage. Same for Power glitches \$\endgroup\$ – user38637 Apr 16 '14 at 15:32
  • \$\begingroup\$ Is it OK to connect microcontroller output directly to the DAC Digital input? Do I need pulldown resistors? anything else? \$\endgroup\$ – Nazar Apr 16 '14 at 15:45
  • \$\begingroup\$ Yes but what is your ground impedance? This demands layout info , analysis, how small are spikes after R2 is added \$\endgroup\$ – user38637 Apr 16 '14 at 15:55
  • \$\begingroup\$ If wide tracks used in long ground paths , consider braid. Show layout in photo. Consider differential OA with high CMMR on output. \$\endgroup\$ – user38637 Apr 16 '14 at 16:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.