go away spammer

Author Topic: Anyone know of a good DAC board?  (Read 2842 times)

0 Members and 1 Guest are viewing this topic.

Offline DaaniiTopic starter

  • Robot Overlord
  • ****
  • Posts: 138
  • Helpful? 3
Anyone know of a good DAC board?
« on: March 08, 2011, 09:10:20 PM »
I'm looking for a DAC board to use with an Arduino. I need something with an 8-bit digital input through SPI that outputs a 0 Volt to 5 Volt analog signal. I'm hoping for something in the $10 to $15 range.

Anyone know of anything like that? For some reason all my Googling turned up nothing.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Anyone know of a good DAC board?
« Reply #1 on: March 08, 2011, 11:54:26 PM »
Hi,

I'm looking for a DAC board to use with an Arduino. I need something with an 8-bit digital input through SPI that outputs a 0 Volt to 5 Volt analog signal. I'm hoping for something in the $10 to $15 range.
Why not make one yourself?
Maxim (among others) makes a lot of D/A-C (and A/D-C) chips with both SPI and IIC (as well as parallel) and getting a few samples shouldn't be that hard.
Doesn't take much else to use if you select the right one.

Having some DDS in mind?
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Anyone know of a good DAC board?
« Reply #2 on: March 09, 2011, 07:50:06 AM »
A DAC is just a resistor and a capacitor, with a variable PWM signal from the mcu as the input. ::)

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Anyone know of a good DAC board?
« Reply #3 on: March 09, 2011, 08:53:25 AM »
Hi,

A DAC is just a resistor and a capacitor, with a variable PWM signal from the mcu as the input. ::)
Yeah well, if only the industry would realize how much time and money they wasted making still better D/A-C's... Oh perhaps they like precision rather than excess ripple  ;)

For simple things, the integrating cap may be fine, but if you want to make eg. a sine wave with low THD, it won't quite cut it.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Anyone know of a good DAC board?
« Reply #4 on: March 09, 2011, 09:21:45 AM »
Well, I'd actually connect the DAC output to an ADC and then run it through a PID loop based on my desired waveform, but didn't want to over-complicate things for the OP . . .

 ::)

Offline DaaniiTopic starter

  • Robot Overlord
  • ****
  • Posts: 138
  • Helpful? 3
Re: Anyone know of a good DAC board?
« Reply #5 on: March 09, 2011, 11:47:09 AM »

Having some DDS in mind?


No, nothing like that. I'm using an Arduino microcontroller to generate the throttle signal for a motor controller for a golf-cart type motor. You helped me on this project a few months ago, Soeren.

As Admin says, I could just use a filter on a PWM signal. But the PWM the microcontroller puts out is a 500 Hertz signal that may generate an audible buzz. I could filter the signal, and I could increase the PWM frequency, but if I'm going to do that, I might as well just put a dedicated DAC circuit in there. Having a DAC circuit in there helps in other ways too.

I've found a 12-bit board that would work fine. But I can't find an 8-bit board. As you say, Soeren, I could just buy a chip and wire it up myself. But I would rather pay a few dollars more and get something that I would not have to design, build and test.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Anyone know of a good DAC board?
« Reply #6 on: March 09, 2011, 02:43:01 PM »
Quote
But the PWM the microcontroller puts out is a 500 Hertz signal that may generate an audible buzz.
AVRs can do a much higher PWM frequency. Just keep upping it until it gets quiet.

Offline DaaniiTopic starter

  • Robot Overlord
  • ****
  • Posts: 138
  • Helpful? 3
Re: Anyone know of a good DAC board?
« Reply #7 on: March 09, 2011, 03:05:29 PM »
Quote
But the PWM the microcontroller puts out is a 500 Hertz signal that may generate an audible buzz.
AVRs can do a much higher PWM frequency. Just keep upping it until it gets quiet.

That's a good suggestion. It turns out that changing the PWM frequency would stretch my talents to the limit. And for other reasons, I think a dedicated DAC will be better in my application anyway. The Arduino will be busy enough doing other things.

But I did decide to take Soeren's suggestion and found and ordered an MCP4901. We'll see how that works.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Anyone know of a good DAC board?
« Reply #8 on: March 09, 2011, 06:42:12 PM »
Hi,

No, nothing like that. I'm using an Arduino microcontroller to generate the throttle signal for a motor controller for a golf-cart type motor. You helped me on this project a few months ago, Soeren.

As Admin says, I could just use a filter on a PWM signal. But the PWM the microcontroller puts out is a 500 Hertz signal that may generate an audible buzz. I could filter the signal, and I could increase the PWM frequency, [...]
Oh, in that case, I'd think the simple R-C integrator would be fine, as the motor will not be able to respond to the ripple and with the controller in-between, I doubt that it would reach the motor at all (I'd think the input is somewhat filtered). The controller probably uses a higher frequency PWM out (I don't recall the details on it).

Besides, the ripple will be too small to cause a motor to whine (or growl in your case), as the sound comes from the windings dispelling each other at each pulse of an audible frequency PWM, which is 0..100%, while your ripple should be (much) less than 10%, so won't be able to to do much magnetic dispelling. The inductance of the motor itself have some filtering effect too.

Should be worth a try, before you go to further trouble with the D/A-C.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline DaaniiTopic starter

  • Robot Overlord
  • ****
  • Posts: 138
  • Helpful? 3
Re: Anyone know of a good DAC board?
« Reply #9 on: March 10, 2011, 05:54:45 PM »
Thanks, Soeren. I have not yet tried the Arduino PWM with my motors and controllers, so I will. It sounds like the warning I got about an audible buzz may just have been a lot of noise.

But I will also be ready with a filter to try, and with a DAC. For other reasons, using a DAC makes sense, so I'll probably end up there anyway. But I am curious about the PWM noise issue.

Offline DaaniiTopic starter

  • Robot Overlord
  • ****
  • Posts: 138
  • Helpful? 3
Re: Anyone know of a good DAC board?
« Reply #10 on: March 16, 2011, 10:44:54 PM »
I found a cheap one-chip digital-analog converter (DAC) from Microchip that seems to work well: the MCP 4901. It seems to work fine for my application.

Interestingly, the DAC chip seems to be very similar to a digital potentiometer. Hard to tell from Microchip's data sheet, but it looks like the chip just uses a string of resistors like a digital potentiometer, and then puts the output through an op amp.

That's different from a pulse-width modulation approach (with a low-pass filter) that, as I understood it, Admin said most DACs use.

So the digital potentiometers I looked at a couple of months ago should work as well as this DAC. I'll have both to choose from. Unfortunately, the rest of this project has been delayed, so I'll have to wait a while to find out what exactly works.


Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Anyone know of a good DAC board?
« Reply #11 on: March 16, 2011, 11:15:03 PM »
Hi,

That's different from a pulse-width modulation approach (with a low-pass filter) that, as I understood it, Admin said most DACs use.
I guess he just meant "when you make a simple one yourself", as there are several approaches to a D/A-C, but most are based on R-2R ladders.
PWM are very "noisy" (Harmonic Distortion really) and a digital audio amplifier needs at PWM frequency of at least 300kHz to sound reasonably bearable.

Remember that a D/A-C needs a buffer (and that would probably be the case for your Digital Resistor as well).
The buffer needs to have a low output impedance of max. 1/10th of the controllers input pin impedance and it needs to have a high impedance input to not load the D/A-C (or "Digistor").
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline DaaniiTopic starter

  • Robot Overlord
  • ****
  • Posts: 138
  • Helpful? 3
Re: Anyone know of a good DAC board?
« Reply #12 on: March 17, 2011, 12:00:41 AM »

I guess he just meant "when you make a simple one yourself", as there are several approaches to a D/A-C, but most are based on R-2R ladders.


Yes, I'm sure you're right. I misread his comment.

Quote
Remember that a D/A-C needs a buffer (and that would probably be the case for your Digital Resistor as well).
The buffer needs to have a low output impedance of max. 1/10th of the controllers input pin impedance and it needs to have a high impedance input to not load the D/A-C (or "Digistor").

Apparently, the MCP4901 chip has a resistor string architecture that includes an output buffer. The datasheet says:

Quote
The MCP4901/4911/4921 devices are rail-to-rail voltage output DAC devices designed to operate with a
VDD range of 2.7V to 5.5V. Its output amplifier is robust enough to drive small signal loads directly. Therefore, it
does not require an external output buffer for most applications.

Do you think I'm safe without a buffer? The problem is that I know very little about the controller input. It's a black box that the controller maker will not provide any details on.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Anyone know of a good DAC board?
« Reply #13 on: March 17, 2011, 02:54:34 PM »
Hi,

Apparently, the MCP4901 chip has a resistor string architecture that includes an output buffer. The datasheet says:

Quote
The MCP4901/4911/4921 devices are rail-to-rail voltage output DAC devices designed to operate with a
VDD range of 2.7V to 5.5V. Its output amplifier is robust enough to drive small signal loads directly. Therefore, it
does not require an external output buffer for most applications.

Do you think I'm safe without a buffer? The problem is that I know very little about the controller input. It's a black box that the controller maker will not provide any details on.
Yes, I didn't read it in full yesterday, but now I see that all their specs are made with the output loaded with 5kOhm to ground, so as long as the controller input is at least 5k, it should be fine.


BTW. what in the datasheet makes you think that it's made like a digital potentiometer?
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline DaaniiTopic starter

  • Robot Overlord
  • ****
  • Posts: 138
  • Helpful? 3
Re: Anyone know of a good DAC board?
« Reply #14 on: March 17, 2011, 04:12:49 PM »

BTW. what in the datasheet makes you think that it's made like a digital potentiometer?


The description of the architecture as a "resistor string." That sounded just like the digital potentiometer I had tried. And both devices -- the digital-analog converter and the digital potentiometer -- do exactly the same in my application. That surprised me.

But also I was confused by my misreading Admin's comments. I was expecting the digital-analog converter to be quite a different architecture, with some kind of pulse-width modulation and a filter. I see now that was a big mistake.

 


Get Your Ad Here