A "cheap"? DAC

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

Hello freaks,this is an idea,i haven't try it yet.
I want to make a reference voltage for a power supply better than 5mV.Using the 10bit fast PWM the resolution is about 5mV per step.If another one is used,OCR2 in 8bits the resolution is 19.53mV per step.Dividing by factor of 20 1mV per step is obtained.Adding the output voltage from OCR2 to the output of the first DAC the hole resolution then increases.Example,OCR1A=2
OCR2=2 the output is 12mV.The greater division factor of the output voltage of OCR2 the better resolution that is obtained.The above is just a thought of mine,what do you thinking about.

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

Yes, that can be done.

However, you need to sum those two filtered PWM signals together and the second needs to be weighted by 1/1024 compared to the first part. If the weighting is not accurate enough (1 part in 1024 or better), it won't be monotonic, It is pretty expensive to get 0.1% resistors!

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

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

Analog power supplies have coarse and fine adjust pots. Same idea sort of?

Imagecraft compiler user

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

Yes, it is. However, those are open-loop controls and it does not make much difference if the fine has a bit more range than one course step. In fact, it is often very handy. Straight-out digital control is somewhat more constrained.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

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

With a multiturn potensiometer the adjustment is fine with great accuracy.But this idea i will try to implement it.In a perfect world without component tolerances,offset,gain and timing errors combining 10bit and 8bit a 18bit dac is formed,at least at the paper.I will try it just for fun.
Thanks for the replies.

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

You could use a 10 or 11 or 12 or 13 or 14 bit PWM by using the TOP=ICR mode, and use Real Heavy lopass filtering and an opamp buffer so it takes a second or so to get a new settled output voltage. This is how the STK500 modulates the VCC... the schematics are on atmel somewhere....

Imagecraft compiler user

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

One other idea... If you can filter it pretty heavily (ie, if your voltage reference doesn't need to change much) then you can dither an 8- or 16-bit PWM output to get substantially better precision. Dithering with an 8-bit van der Corput sequence (which can be stored in progmem) is very fast, and I've had excellent results myself when the output is low-passed down to a few hundred hertz or so.

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

The dithering tecnique is very interesting,i use a reverse biased NPN transistor to apply noise in the measured signal in oversampling for the ADC.It improves significally the resolution.I ll do a web search for DAC oversampling.

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

Quote:
want to make a reference voltage for a power supply better than 5mV.Using the 10bit fast PWM the resolution is about 5mV per step.If another one is used

Remember, resolution & accuracy are two different things!! you can have very high resolution and horrible acccuracy (out of cal). You can (though not likely) very high accuracy and low res (5V & the voltage happens to really be 5.00000000 V).

If you want high accuaracy, then somewhere in your system you must have a reference that is at least that accuarate, or otherwise, you will be "out of cal
". Of course, in a digital systems we face the limits of bit resolution often (not always) degrading accuaracy & have the means (such as dithering) to wipe those effects away.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!