DAC Selection Help

Go To Last Post
22 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,

 

I am trying to select an external DAC, but when searching through the parametric search on RS I get a bit lost.  My requirements are below:

 

* 8bit

 

* Parallel because I want it to run off 8 I/O pins

 

* One output

 

* Standard Voltage output with no bells and whistles

 

I do not really understand the different multiplier and current outputs etc.

 

I have found this TI chip, TLC7524CD.  Is this a bog standard chip and what I require?

 

Also are 2bit and 4bit DAC's easily accessible or do most people just go for 8bit version and only use half the pins? 

 

Thanks,

 

Tuurbo46

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you are willing to dedicate 8 pins then why a DAC at all - why not just an R-2R ladder?

 

I was going to mention the ubiquitous MCP4811/4812 which has more resolution than you actually need but it is SPI not parallel so doesn't meet your curious requirements list.

 

Are you looking for parallel as it is VERY high frequency and you can't wait for an SPI/I2C serial transfer?

Last Edited: Mon. Nov 27, 2017 - 04:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
curious requirements list

Indeed.

 

I think another case where it would be better to describe the actual goal: http://www.catb.org/~esr/faqs/sm...

 

EDIT

 

https://www.avrfreaks.net/comment...

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Mon. Nov 27, 2017 - 05:22 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

An 8 bit DAC will often require more than 8 pins to interface. There is often a chip select or such so that the interface is really 9 or more pins.

 

Why do you require parallel? Many will consider it a waste of pins unless there are some special circumstances, such as:

 

1) Update rate exceeds what is possible via serial interface (either SPI or I2C)

 

2) Available serial interfaces have too much traffic with other peripherals.

 

3) You already use parallel interface for something else, so that you can share it with the DAC.

 

Perhaps you are uncomfortable using SPI or I2C? Well, surprise - this is an excellent opportunity to learn!

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Mon. Nov 27, 2017 - 06:13 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,

 

I like the R-2R ladder route.  I am just trying to work out the math a the minute.  It initially looks easy but its not.  I will come back if i am stuck.

 

Thanks,

 

Tuurbo46

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do not forget to take into account the on-resistance of the output. Depending on Vcc, it can vary from around 80 ohms to around 100 ohms. The resistors connected to I/O pins should be this much smaller unless the 2R value is more than 10K. If more than 10K, then on-resistance is less than 1% of the leg resistance. But, then, your output resistance gets pretty high.

 

There are R-2R ladder calculators on the net.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Mon. Nov 27, 2017 - 08:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi again,

 

Ok so on my 2bit 2-R2 example I have 5V on both bo and b1 inputs.

 

The formula is Vout = Vbo/4 + Vb1/2

 

My truth table is below and what I would like out of this 2bit DAC:

 

bo | b1 | Vout

----------------

0     0     0V

0     1     1.25V

1     0     2.5V

1     1     5V

 

 

Vbo/4   +   Vb1/2     = Vout

 

0         +        0        = 0V

0         +       2.5V    = 2.5V

1.25V  +        0        = 1.25V

1.25V  +       2.5V    = 3.75V 

 

Do I need to go up to a 3bit DAC to get 5V on the output, or have I miss understood the formula?

 

Thanks,

 

Tuurbo46

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sounds like you have the R/2R resistors swapped, and b0 = LSB not b1.

 

in above A0 = b0, A1 = b1....

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Depending upon what the analog voltage is driving you may well need to add an op-amp buffer so that the load does not alter the R-2R network.

 

The XmegaE5 series, essentially the "Tiny" version of the Xmegas, has a built in DAC, which might save you a chip or two, and some hassle.

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Morning,

 

Thanks for your great help.

 

Because I require 0V, 1.25V, 2.5V and 5V, and the 3bit DAC max voltage output is 4.375V, do I multiply the voltage output by 2 using a LM741.  Also why do most examples on the internet show the Vout with a negative number (-5V)?  Does the 741 offer better buffering or something configured like this.  My truth table is below:

 

 

bo | b1 | b2 | Vout   |     Vout x2

----------------------------------

0      0     0     0V              0V

0      0     1     0.625V       1.25V

0      1     0     1.25V         2.5V

0      1     1     1.875V       3.75V

1      0     0     2.5V           5V

1      0     1     3.125V       6.25V   

1      1     0     3.75V         7.5V

1      1     1     4.375V       8.75V

 

Thanks,

 

Tuurbo46

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How about:
  b0 ----2R-----+
                |
  b1 ----2R-----+
                R
  b2 ----2R-----+------Vout

 

b0   b1   b2    Vout
 0    0    0    0V
 1    0    0    1.25V
 0    1    0    1.25V
 1    1    0    2.5V
 0    0    1    2.5V
 1    0    1    3.75V
 0    1    1    3.75V
 1    1    1    5V

David (aka frog_jr)

Last Edited: Tue. Nov 28, 2017 - 10:41 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The 741 op-amp was a great op-amp in its day.

 

That day has passed.

 

Look for a unipolar, (i.e. single voltage), power supply op-amp that is rail-to-rail, (its output voltage can swing almost from ground to V+).

 

Analog Devices has many such op-amps, as do many of the other chip manufacturers.

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

Is this Analog Devices OP184FSZ  a good upgrade for a 741?

 

And Brian, your solution looks nice and easy also.

 

Thanks,

 

Tuurbo46

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tuurbo46 wrote:

Is this Analog Devices OP184FSZ  a good upgrade for a 741?

 

Way over the top for what you want to do.

 

I'd be looking more at ones like the TL071.

 

However, for op-amps which are working around uCs, you often only have a single 5V rail available. Hence my go-to opamp is the MCP6002.

 

 

Tuurbo46 wrote:

And Brian, your solution looks nice and easy also.

 

Plus, as you are only using half of each chip, you get another whole 'DAC' for free.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

what do you really need ?

perhaps a fast PWM and a LP filter is all you need.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:
The XmegaE5 series, essentially the "Tiny" version of the Xmegas, has a built in DAC, which might save you a chip or two, and some hassle.
A 12b two channel 1Msps DAC

tinyAVR 1-series have 8b DAC

http://www.microchip.com/wwwproducts/en/attiny1617

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Linear Technology

Solutions Data Conversion Digital-to-Analog Converters (DAC) Voltage Output DACs

Accurate, Fast Settling Analog Voltages from Digital PWM Signals

Mark Thoren - Staff Scientist
Chad Steward - Design Manager

Mar 17th 2015

http://www.linear.com/solutions/5683

...

Figure 2. Improved PWM-to-Analog?

Figure 2. Improved PWM-to-Analog?

...

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi All,

 

Just an update.  I have opted to use Brians circuit on post #12.  Just to confirm his circuit offers 4 states, 0V, 1.25V, 2.5V and 5V, because Y0 is tied to 0V?

 

Thanks,

 

Tuurbo46

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tuurbo46 wrote:

Just to confirm his circuit offers 4 states, 0V, 1.25V, 2.5V and 5V, because Y0 is tied to 0V?

 

Correct. In fact, if you need a different set of voltages you simply need to alter the voltage divider chain. As you need 5v and 0v you simply tie those multiplexer inputs to the respective rails.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Brian,

 

Thanks for your guidance.  A couple more learning questions.  The above circuit #12 is to be used on analog input ports on the ECU so all good. 

 

However after talking to the manufacturer of the ECU they have quoted the digital input ports are quoted as: 

 

* Input impedance; 10K ohm pull up to Vcc

 

Can I go straight from a ATmega324pa I/O pin to the ECU digital port or would I need a unity gain voltage follower in series?  Also the same question for a 5V switch from the battery to a digital port pin?

 

Thanks,

 

Tuurbo46

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Brian,

 

EDIT: * Input impedance; 10K ohm pull DOWN TO GND.

 

NOT pullup to VCC.

 

My mistake sorry.

 

Thanks,

 

Tuurbo46