What DAC would you've used for uSupply rev B? - Page 1
Forum section: electronics / general

author: george graves
author_rank: Super Contributor
timestamp: April 03, 2012, 10:30:59 pm
content: 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?

author: Psi
author_rank: Super Contributor
timestamp: April 03, 2012, 10:53:49 pm
content: 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 VEven 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.

author: caroper
author_rank: Regular Contributor
timestamp: April 03, 2012, 11:03:17 pm
content: If you have not been following theGeneral Purpose Power Supply Designthread 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 nowCheersChris

author: george graves
author_rank: Super Contributor
timestamp: April 03, 2012, 11:08:42 pm
content: 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.

author: amspire
author_rank: Super Contributor
timestamp: April 03, 2012, 11:18:19 pm
content: Quote from: george graves on April 03, 2012, 11:08:42 pmWe 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.

author: george graves
author_rank: Super Contributor
timestamp: April 03, 2012, 11:19:52 pm
content: 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)

author: amspire
author_rank: Super Contributor
timestamp: April 03, 2012, 11:54:39 pm
content: Quote from: george graves on April 03, 2012, 11:19:52 pmWith 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.

author: caffeinatedbard
author_rank: Regular Contributor
timestamp: April 03, 2012, 11:59:14 pm
content: http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en532229May 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

author: amspire
author_rank: Super Contributor
timestamp: April 04, 2012, 12:31:18 am
content: Quote from: caffeinatedbard on April 03, 2012, 11:59:14 pmLove 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.

author: A Hellene
author_rank: Frequent Contributor
timestamp: April 04, 2012, 02:52:13 am
content: 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

author: nukie
author_rank: Frequent Contributor
timestamp: April 04, 2012, 03:19:34 am
content: Hello A Hellene,Thanks for pointing that out. There are many DAC choices out there, what do you recommend?Quote from: A Hellene on April 04, 2012, 02:52:13 am

author: A Hellene
author_rank: Frequent Contributor
timestamp: April 04, 2012, 03:38:24 am
content: 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 theLinear 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

author: Bored@Work
author_rank: Super Contributor
timestamp: April 04, 2012, 07:53:06 am
content: Quote from: george graves on April 03, 2012, 11:08:42 pmDon'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.QuoteYou 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]

author: amspire
author_rank: Super Contributor
timestamp: April 04, 2012, 11:44:44 am
content: Quote from: BoredAtWork on April 04, 2012, 07:53:06 amI 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.