Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
Thread Tools Display Modes
Old 19th December 2007, 04:53 AM   (permalink)
Default Smoothing DAC output

I need some ideas for smoothing the output changes of a MCP4922 (It's a Digital to analog converter).

When you change the voltage of a DAC it does it in steps. If you do small step changes the voltage will change smoothly... but if your step changes are too large then the changes will be very jerky.

So my question is:
  • Should I program my PIC to incrementally increase the voltage so that it appears smoother? (I am guessing if the incremental increase is too fast it will still look like a step change, am I right?)

OR
  • Should I use an RC circuit to try to make the changes more gradual?

What will give me the best results and are there other options that I should be looking into?

So I have a balance between smoothening the DAC outputs and response time I believe... is there some equations that I can use to calculate how much lag I am introducing with trying to smoothen the output?

I hope everything I wrote is clear enough to understand, if not tell me. Thanks.
ChemE is offline  
Reply With Quote
Old 19th December 2007, 05:09 AM   (permalink)
Default

You know you can make an accurate DAC with any PIC that has Hardware PWM yeah?

eg, a 50% Duty Cycle like this;

Coupled with an RC Filter will produce 2.5V (50% of 5V)

and a 25% duty cycle like this;

Will output 1.25V. Heres a circuit (note, use a better opamp than a LM324 for more accurate results as a buffer amp)


I did a small thing on it here http://users.tpg.com.au/gramo/Site/dac.htm


Anyhow, a smallish cap might be the answer. Probably 1uF or so, allowing a fairly quick charge/discharge time but allowing limited voltage stability
__________________
Spency.

PIC Micro's - Your mind is the limit

PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net
gramo is offline  
Reply With Quote
Old 19th December 2007, 01:32 PM   (permalink)
Default

Yeah I knew you make a DAC using the PWM of a PIC but it was easier for me to just use a DAC.

Should I put the 1uF cap as close to the device that I am trying to control with the DAC or is there a more optimum location?

Thank you for the help.
ChemE is offline  
Reply With Quote
Old 19th December 2007, 01:41 PM   (permalink)
Default

you would still have to deal with the transition from one voltage level to another whether you use a DAC or a PWM. If you step up the duty cycle from 25% to 75% without any ramping up of the duty cycle, the output will have an RC charge up profile. It would really depend on what the OP wants the output to look like - can he accept an RC charge up/discharge profile on large transitions or does he need to have a linear transition. With either method, the same problem will occur.

In regards to where you need to place the capacitor... i suppose it depends on the distance between the DAC and whatever the DAC is feeding and the input impedance of that object that the DAC is feeding.
OutToLunch is offline  
Reply With Quote
Old 19th December 2007, 02:25 PM   (permalink)
Default

hi,
Look here:
http://ww1.microchip.com/downloads/e...Doc/21897B.pdf

Checkout the applications section.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Reply With Quote
Old 19th December 2007, 10:19 PM   (permalink)
Default

I like the look of page 25
__________________
Spency.

PIC Micro's - Your mind is the limit

PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net
gramo is offline  
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Output = Input - Problems adamthole Micro Controllers 20 24th April 2007 04:09 AM
555 timer output help for a newbee... WIZARDSV650S Electronic Projects Design/Ideas/Reviews 6 6th April 2007 04:04 AM
Using PicBasic with Output compare for sounds mduong77 Micro Controllers 7 29th March 2007 02:28 AM
Output going high on power up?!?! 2camjohn Micro Controllers 5 23rd March 2004 06:49 PM
How to design such output stage eeglp Electronic Projects Design/Ideas/Reviews 4 8th April 2003 06:01 PM



All times are GMT. The time now is 02:02 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.