Author Topic: What DAC would you've used for uSupply rev B?  (Read 9342 times)

0 Members and 1 Guest are viewing this topic.

Offline george gravesTopic starter

  • Super Contributor
  • ***
  • Posts: 1257
  • Country: us
What DAC would you've used for uSupply rev B?
« on: April 03, 2012, 10:30:59 pm »
I'm messing around with design of Dave's "rev B" version of the board.  Right now, I'm using the arduino PWM (with a filter) to drive a LM317 - just as a breadboarding start.  Of course the resolution of 8 bit PWM, and the noise(even after some filtering) is unacceptable for anything but just getting started with a design.  So - I'd like to run a SPI DAC like Dave's revision B.

I noticed bad results Dave got the the MPC4922 DAC - but I understand why he picked it (price).

QUESTIONS:

1.) With price not being a major factor(but with out going crazy) - what would you recommend as a replacement DAC?

2.) Or would you use the MPC4922 and software tweak/calibrate the output?

3.) Other thoughts?

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: nz
Re: What DAC would you've used for uSupply rev B?
« Reply #1 on: April 03, 2012, 10:53:49 pm »
What kind of noise are you getting? And what frequency is your pwm?

There will always be a tiny amount of the PWM frequency on top of the signal, but when generating a 2kHz PWM and filtering below say 50hz it should be very small. Something like +/- 0.001 V

Even though the hardware might be updating the pwm at 2kHz you don't need to update the pwm data at that rate.
And you get the benefit of a sharp filter response. So you want the pwm as fast as you can get.

You can also up the bitrate by using a 16bit timer instead of an 8bit one.  Though you are limited to whatever clockrate the micro is running at.   If its 8mhz and you want around 2000 steps (12bit dac) then your max freq is around 2khz.

You can always add a 2nd or 3rd order filter to get it even cleaner, if it's still a problem.
« Last Edit: April 03, 2012, 11:17:33 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline caroper

  • Regular Contributor
  • *
  • Posts: 193
  • Country: za
    • Take your PIC
Re: What DAC would you've used for uSupply rev B?
« Reply #2 on: April 03, 2012, 11:03:17 pm »
If you have not been following the General Purpose Power Supply Design thread here on the forum I suggest you do, it is a great read. There is a fascinating discussion about using Sigma-Delta extended PWM to get higher resolution, which is fascinating as a software solution, in addition to some great discussion of switching pre-regulators etc.


Well worth subscribing too, whenever I get an email notification that the topic is updated I drop whatever I am doing to see what Richard and George have come up with now :)


Cheers
Chris

Offline george gravesTopic starter

  • Super Contributor
  • ***
  • Posts: 1257
  • Country: us
Re: What DAC would you've used for uSupply rev B?
« Reply #3 on: April 03, 2012, 11:08:42 pm »
I'm afraid that thread is a bit over my head.  And although I could filter the PWM better, or increase the frequency, it still won't give me the resolution I would like.  Thansk for the reply.

So, I'm am looking for a dac.

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: What DAC would you've used for uSupply rev B?
« Reply #4 on: April 03, 2012, 11:18:19 pm »
I'm afraid that thread is a bit over my head.  And although I could filter the PWM better, or increase the frequency, it still won't give me the resolution I would like.  Thansk for the reply.

So, I'm am looking for a dac.
We are targeting 22 bits of monotonic resolution from the PWM in a ATtiny microprocessor in the General Purpose Supply thread. i will probably build a prototype within the week.

How are you going to beat that with an affordable DAC IC?

Note: I said resolution not accuracy, just so that argument doesn't start again.  The idea is if you want an accurate output, you can attach a DVM and the resolution allows you to adjust to within 10uV.

Richard.

 

Offline george gravesTopic starter

  • Super Contributor
  • ***
  • Posts: 1257
  • Country: us
Re: What DAC would you've used for uSupply rev B?
« Reply #5 on: April 03, 2012, 11:19:52 pm »
I don't think I can do that inside the arduino enviroment.(?) - regardless, I'm looking for a DAC solution.

(Oh, and price isn't an issue really ~$2-10 would be acceptable.  Thanks anyways. Plus I might use it on other projects - but thanks again)
« Last Edit: April 03, 2012, 11:22:57 pm by george graves »
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: What DAC would you've used for uSupply rev B?
« Reply #6 on: April 03, 2012, 11:54:39 pm »
I don't think I can do that inside the arduino enviroment.(?) - regardless, I'm looking for a DAC solution.

(Oh, and price isn't an issue really ~$2-10 would be acceptable.  Thanks anyways. Plus I might use it on other projects - but thanks again)
With  the Arduino processor, the resolution will be more like 20 bits - again fully monotonic. With DAC's, you can start paying big $$$'s for more then about 12 bits monotonicity, but you get speed and accuracy.

Richard.
« Last Edit: April 03, 2012, 11:56:40 pm by amspire »
 

Offline caffeinatedbard

  • Regular Contributor
  • *
  • Posts: 66
  • Country: us
Re: What DAC would you've used for uSupply rev B?
« Reply #7 on: April 03, 2012, 11:59:14 pm »
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en532229

May I offer the above DAC as an option?  I am using it at the moment on a work project and it was very easy to get it going with the I2C protocol instead of the SPI.

Given I don't know many details about your project, I have used this one to control a proportional air regulator to 0.01 psi and some other applications. Also keep in mind this has external Vdd reference if you like to use something else with 12 bits of resolution.

Good luck!

-bard
« Last Edit: April 04, 2012, 12:01:08 am by caffeinatedbard »
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: What DAC would you've used for uSupply rev B?
« Reply #8 on: April 04, 2012, 12:31:18 am »
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en532229

Love the price of these Microchip devices and the fact that they are monotonic to 12 bits due to the design - a 4096 resistor tapped divider.

The catch is though they say the accuracy is typically 11 bits, they only actually guarantee 8 bit accuracy. For a power supply, this means that you can get the output incrementing in mV steps, but this doesn't mean you can get 5.001V, 5.002V, etc out.

It will be more like 5.0023V, 5.0035V, 5.0041V, 5.0049V, .... steps.  That could be fine for you.

Richard.
 

Offline A Hellene

  • Frequent Contributor
  • **
  • Posts: 602
  • Country: gr
Re: What DAC would you've used for uSupply rev B?
« Reply #9 on: April 04, 2012, 02:52:13 am »
The MCP4725 DAC is not really an accurate device. Microchip, in general, could be called a hobbyist-grade products company*. If you need accuracy you should be looking at what the serious players (Analog Devices, Linear Technology, Burr-Brown, etc.) have to offer.

Since I called MCP4725 an inaccurate device, I should also say why I did that: The INL (Integral Non-Linearity) error is a critical parameter for a DAC. The MCP4725 INL Error is stated to be no worse than ±14.5 LSB, for the code range 100..4000 (page 3); might I ask what this already sky-high INL error becomes for the codes 0..99 and 4001..4095? I am sure I won't like the answer. Another important parameter is the offset error, which is stated to be no worse than 0.75% of FSR (full scale resolution), which is 30.7 LSB or 37.5 mV at Vref=5.0V: Again, no, thank you. Not to mention any other parameters I have not bothered to check, after reading the above...

I am sure I could use this DAC in a talking Barbie application; but not in a multi-Watt power supply control stage, where 2-3 LSB error could be thought of as already high enough...

Once again, if accuracy is a requirement, look at what solutions the serious manufacturers have to offer.


-George



[ * ] Since my words about Microchip were not inspiring at all, let me quote the words of one of the most perceptive and respectable acquaintances of mine, who witnessed the whole story as an Electrical Engineer:
Quote
How could they [Microchip, to include W register in with the rest of the 'files']? That would require knowledge of design, and they never designed a microprocessor in their entire existence. They bought a cheap third rate 1970s architecture that nobody else used or wanted, and kept it alive by bolting on extensions accessed through inconvenient SFRs. It still has a hardware stack, FFS - they couldn't even fix that. It's a miracle anyone could even write a C compiler that can cope with the limitations. One thing is clear - without a C compiler, it would have sunk without trace two decades ago if users were forced to understand and deal with its architecture and could compare it to everything else in the industry. It only survived because of ignorance.

Then they compounded their previous mistakes by licensing the second-rate MIPS core for advanced products, at the moment its market share was plummeting and ARM was becoming the industry standard. Granted that Atmel also went a bit sideways with the AVR32, but at least they designed it themselves, and they have an ARM line to fall back on.
[...]
Microchip didn't conjure anything up. They rooted in General Instrument's dumpster and pulled out an evolutionary dead-end from the mid-70s (PIC1650) that had been rejected as useless by the entire engineering community, and promoted it in the hobby magazines with free development software. They couldn't sell it otherwise, as no commercial designer would consider using it. If it didn't have C compilers nobody would use it today either, as it has the most painful assembler syntax ever devised. As a single chip so you don't need to understand the electronics, and with a compiler to cover up the horror underneath... well, what can I say? Any fool can use it.
[...]
Though I should add, I was working when the GI PIC1650 came out in the 1970s, and my company looked at it and rejected it in disgust. As for Steve Ciarcia, Steve tried everything once, but I observe he settled pretty firmly on the 8051 family for most of his Byte projects. It's Jeff Bachiochi who keeps the candle burning for PIC in Circuit Cellar these days.
Hi! This is George; and I am three and a half years old!
(This was one of my latest realisations, now in my early fifties!...)
 

Offline nukie

  • Frequent Contributor
  • **
  • Posts: 799
  • Country: au
Re: What DAC would you've used for uSupply rev B?
« Reply #10 on: April 04, 2012, 03:19:34 am »

Hello A Hellene,
Thanks for pointing that out. There are many DAC choices out there, what do you recommend?



The MCP4725 DAC is not really an accurate device. Microchip, in general, could be called a hobbyist-grade products company*. If you need accuracy you should be looking at what the serious players (Analog Devices, Linear Technology, Burr-Brown, etc.) have to offer.

Since I called MCP4725 an inaccurate device, I should also say why I did that: The INL (Integral Non-Linearity) error is a critical parameter for a DAC. The MCP4725 INL Error is stated to be no worse than ±14.5 LSB, for the code range 100..4000 (page 3); might I ask what this already sky-high INL error becomes for the codes 0..99 and 4001..4095? I am sure I won't like the answer. Another important parameter is the offset error, which is stated to be no worse than 0.75% of FSR (full scale resolution), which is 30.7 LSB or 37.5 mV at Vref=5.0V: Again, no, thank you. Not to mention any other parameters I have not bothered to check, after reading the above...

I am sure I could use this DAC in a talking Barbie application; but not in a multi-Watt power supply control stage, where 2-3 LSB error could be thought of as already high enough...

Once again, if accuracy is a requirement, look at what solutions the serious manufacturers have to offer.


-George



[ * ] Since my words about Microchip were not inspiring at all, let me quote the words of one of the most perceptive and respectable acquaintances of mine, who witnessed the whole story as an Electrical Engineer:
Quote
How could they [Microchip, to include W register in with the rest of the 'files']? That would require knowledge of design, and they never designed a microprocessor in their entire existence. They bought a cheap third rate 1970s architecture that nobody else used or wanted, and kept it alive by bolting on extensions accessed through inconvenient SFRs. It still has a hardware stack, FFS - they couldn't even fix that. It's a miracle anyone could even write a C compiler that can cope with the limitations. One thing is clear - without a C compiler, it would have sunk without trace two decades ago if users were forced to understand and deal with its architecture and could compare it to everything else in the industry. It only survived because of ignorance.

Then they compounded their previous mistakes by licensing the second-rate MIPS core for advanced products, at the moment its market share was plummeting and ARM was becoming the industry standard. Granted that Atmel also went a bit sideways with the AVR32, but at least they designed it themselves, and they have an ARM line to fall back on.
[...]
Microchip didn't conjure anything up. They rooted in General Instrument's dumpster and pulled out an evolutionary dead-end from the mid-70s (PIC1650) that had been rejected as useless by the entire engineering community, and promoted it in the hobby magazines with free development software. They couldn't sell it otherwise, as no commercial designer would consider using it. If it didn't have C compilers nobody would use it today either, as it has the most painful assembler syntax ever devised. As a single chip so you don't need to understand the electronics, and with a compiler to cover up the horror underneath... well, what can I say? Any fool can use it.
[...]
Though I should add, I was working when the GI PIC1650 came out in the 1970s, and my company looked at it and rejected it in disgust. As for Steve Ciarcia, Steve tried everything once, but I observe he settled pretty firmly on the 8051 family for most of his Byte projects. It's Jeff Bachiochi who keeps the candle burning for PIC in Circuit Cellar these days.
 

Offline A Hellene

  • Frequent Contributor
  • **
  • Posts: 602
  • Country: gr
Re: What DAC would you've used for uSupply rev B?
« Reply #11 on: April 04, 2012, 03:38:24 am »
You are welcome!

Now, you asked me to recommend you a DAC. Well, what your needs are, exactly? Accuracy, resolution, speed, wide supply/output range, internal voltage reference, temperature range, package, single/dual/quad/etc., are some of the options you have. Just visit for example the Linear Technology, Analog Devices, Texas Instruments, etc., DAC selection guide pages and choose what fits your needs best. Then, download the device data sheets for further inspection.


-George
« Last Edit: April 04, 2012, 03:41:43 am by A Hellene »
Hi! This is George; and I am three and a half years old!
(This was one of my latest realisations, now in my early fifties!...)
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: What DAC would you've used for uSupply rev B?
« Reply #12 on: April 04, 2012, 07:53:06 am »
I'm afraid that thread is a bit over my head.

Don't bother. They claim impressive figures but they won't get it stable, at least not without throwing much more money and elbow grease at it. Playing in the the 1ppm and better league isn't something you mange to do by just sketching a few parts. I did a few example calculations, but the chose to ignore it.

Quote
So, I'm am looking for a dac.

You need three things, a good reference source, the DAC and a gain stage.

- Good reference, because otherwise any change in the voltage reference will be seen on the LM317 output. But not an ultra pricise reference, because the LM317 adds its own error.

- DAC, not more than 12 or at maximum 16 bit, since this is still manageable for beginners, e.g. to get stable, low drifting. And because there is no point in going higher because of the specs of the LM317.

- The gain stage because of the way the LM317 needs to be driven. You need to generate Vout - 1.25 V with the DAC. And these days there aren't many DAC that can produce, let's say 15V output directly. When you find one you should expect to have to add a reference voltage as high as the maximum output voltage. If you go for an external gain stage instead you can use a DAC with a relatively low build-in reference (resulting in a relative low maximum DAC output voltage) and compensate for this with more gain.

So, I would recommend a quality DAC with build-in reference, to minimize the hassle.  I.e. pay a little bit more for less hassle. Followed by an OpAmp as gain stage, probably configured as an adder, so you can get below 0V, which in turn means you can take the LM317 below 1.25V to 0 V output.

Have a look a Linear's LTC1257, LTC1451, LTC1655 or similar. In case you want to control other things or more LM317th, have a look of some of their dual or quad DACs.

[Linear also has DACs with higher output voltage ranges, and their soft span DACS are fun, but I don't think they fit your problem well]
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: What DAC would you've used for uSupply rev B?
« Reply #13 on: April 04, 2012, 11:44:44 am »
I'm afraid that thread is a bit over my head.

Don't bother. They claim impressive figures but they won't get it stable, at least not without throwing much more money and elbow grease at it. Playing in the the 1ppm and better league isn't something you mange to do by just sketching a few parts. I did a few example calculations, but the chose to ignore it.


I have never made a single claim to the accuracy of PWM. In all the discussions about using PWM, we haven't been discussing accuracy at all. All I have said is for my own purposes I don't care much about accuracy - I said 1% is OK for my purposes. 

Are you saying that PWM cannot get 1% accuracy? You probably didn't bother to read my early posts where I did discuss how to make it more stable. I just don't get why you are attacking an idea when you are not reading the posts or any of the replies I have posted to your attacks.

You keep talking about 1ppm accuracy - why? No-one in their right mind would contemplate a PWM directly from the pins of an Atmel micro could achieve 1ppm accuracy.

Richard.
« Last Edit: April 04, 2012, 12:07:47 pm by amspire »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf