On Fri, 02 Nov 2012 09:42:51 +0000, Allan Herriman wrote:> Hi all, > > Sorry about starting another delta sigma modulator thread. > > I'm implementing a first order delta sigma DAC in a spare corner of an > FPGA. It's for a low quality audio application. > > I'm driving a speaker differentially from two output pins. > > I'm using the regular "one liner" DSM code that produces a single output > bit per clock. An output of 0 or 1 drives the two pins as 01 or 10 > respectively to give a negative or positive voltage across the speaker. > > This should meet my requirements as is and it is currently simulating > fine in Modelsim. > > > However, I can actually get three levels out of the DAC: negative, > positive and zero. I get zero from putting 00 or 11 on the pins. > My gut feeling is that three levels should be better than two. > > Question: Can I get any improvement in quality by using a third level? > How easy is it to use? > Any links or references?Thanks to all who replied. My FPGA has 1.8V outputs. I intend buffering that through two spare gates on a (1.8V powered) logic chip that's already on the board. I haven't done any spice sims yet, but I might end up with some series resistors or perhaps ferrite beads. EMI shouldn't be a problem as it's completely inside a metal enclosure. (I'm an analog designer; this stuff isn't a problem for me.) The lowest available clock frequency is 25MHz. I intend running the DAC at this rate. Low quality = internal PC speaker quality. This thing might need to beep or chime occasionally. It doesn't need to be loud. Tests show that 2 x 1.8V peak to peak on my tiny speaker should be loud enough. I'm not sure about the exact SPL though. The voltage rails are well regulated and the logic is fast (and the quality is low) so I won't need any analog feedback. This morning I implemented a three level system to see how it would go. Not having a clue, I chose my quantisation function like this: Integrator Quant DAC output output output 00000... 00000... -1.8V ... 00111... 00000... -1.8V 01000... 01000... 0.0V ... 10111... 01000... 0.0V 11000... 01111... +1.8V 11111... 01111... +1.8V The integrator is one bit wider than the input word. It seemed to work really well (in Modelsim). - There are about half the number of transitions compared to the 2 level case. - When the input is "zero" (i.e. at the half-way mark: 1000...) there are no output transitions at all. Most of the time it will not be making any sound, so no transitions for zero input seems like a desirable property. Regards, Allan
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →
Multi-level Delta Sigma DAC question
Started by ●November 2, 2012
Reply by ●November 3, 20122012-11-03
Reply by ●November 3, 20122012-11-03
On Sat, 03 Nov 2012 06:45:40 +0000, Allan Herriman wrote:> On Fri, 02 Nov 2012 09:42:51 +0000, Allan Herriman wrote: > >> Hi all, >> >> Sorry about starting another delta sigma modulator thread. >> >> I'm implementing a first order delta sigma DAC in a spare corner of an >> FPGA. It's for a low quality audio application. >> >> I'm driving a speaker differentially from two output pins. >> >> I'm using the regular "one liner" DSM code that produces a single >> output bit per clock. An output of 0 or 1 drives the two pins as 01 or >> 10 respectively to give a negative or positive voltage across the >> speaker. >> >> This should meet my requirements as is and it is currently simulating >> fine in Modelsim. >> >> >> However, I can actually get three levels out of the DAC: negative, >> positive and zero. I get zero from putting 00 or 11 on the pins. >> My gut feeling is that three levels should be better than two. >> >> Question: Can I get any improvement in quality by using a third level? >> How easy is it to use? >> Any links or references? > > > Thanks to all who replied. > > > My FPGA has 1.8V outputs. I intend buffering that through two spare > gates on a (1.8V powered) logic chip that's already on the board. > I haven't done any spice sims yet, but I might end up with some series > resistors or perhaps ferrite beads. > EMI shouldn't be a problem as it's completely inside a metal enclosure. > (I'm an analog designer; this stuff isn't a problem for me.) > > The lowest available clock frequency is 25MHz. I intend running the DAC > at this rate. > > Low quality = internal PC speaker quality. This thing might need to > beep or chime occasionally. It doesn't need to be loud. Tests show > that 2 x 1.8V peak to peak on my tiny speaker should be loud enough. > I'm not sure about the exact SPL though. > > The voltage rails are well regulated and the logic is fast (and the > quality is low) so I won't need any analog feedback. > > > This morning I implemented a three level system to see how it would go. > > Not having a clue, I chose my quantisation function like this: > > Integrator Quant DAC output outputoutput> > 00000... 00000... -1.8V ... > 00111... 00000... -1.8V 01000... 01000... 0.0V ... > 10111... 01000... 0.0V 11000... 01111... +1.8V11111... 01111... +1.8V> > The integrator is one bit wider than the input word. > > It seemed to work really well (in Modelsim). > > - There are about half the number of transitions compared to the 2 level > case. > > - When the input is "zero" (i.e. at the half-way mark: 1000...) there > are no output transitions at all. Most of the time it will not be > making any sound, so no transitions for zero input seems like a > desirable property.Table formatting broke, sorry. Integrator Quant DAC output output output 00000... 00000... -1.8V ... 00111... 00000... -1.8V 01000... 01000... 0.0V ... 10111... 01000... 0.0V 11000... 01111... +1.8V 11111... 01111... +1.8V
Reply by ●November 3, 20122012-11-03
On Saturday, November 3, 2012 2:50:44 AM UTC-4, Allan Herriman wrote:> On Sat, 03 Nov 2012 06:45:40 +0000, Allan Herriman wrote: > > > > > On Fri, 02 Nov 2012 09:42:51 +0000, Allan Herriman wrote: > > > > > >> Hi all, > > >> > > >> Sorry about starting another delta sigma modulator thread. > > >> > > >> I'm implementing a first order delta sigma DAC in a spare corner of an > > >> FPGA. It's for a low quality audio application. > > >> > > >> I'm driving a speaker differentially from two output pins. > > >> > > >> I'm using the regular "one liner" DSM code that produces a single > > >> output bit per clock. An output of 0 or 1 drives the two pins as 01 or > > >> 10 respectively to give a negative or positive voltage across the > > >> speaker. > > >> > > >> This should meet my requirements as is and it is currently simulating > > >> fine in Modelsim. > > >> > > >> > > >> However, I can actually get three levels out of the DAC: negative, > > >> positive and zero. I get zero from putting 00 or 11 on the pins. > > >> My gut feeling is that three levels should be better than two. > > >> > > >> Question: Can I get any improvement in quality by using a third level? > > >> How easy is it to use? > > >> Any links or references? > > > > > > > > > Thanks to all who replied. > > > > > > > > > My FPGA has 1.8V outputs. I intend buffering that through two spare > > > gates on a (1.8V powered) logic chip that's already on the board. > > > I haven't done any spice sims yet, but I might end up with some series > > > resistors or perhaps ferrite beads. > > > EMI shouldn't be a problem as it's completely inside a metal enclosure. > > > (I'm an analog designer; this stuff isn't a problem for me.) > > > > > > The lowest available clock frequency is 25MHz. I intend running the DAC > > > at this rate. > > > > > > Low quality = internal PC speaker quality. This thing might need to > > > beep or chime occasionally. It doesn't need to be loud. Tests show > > > that 2 x 1.8V peak to peak on my tiny speaker should be loud enough. > > > I'm not sure about the exact SPL though. > > > > > > The voltage rails are well regulated and the logic is fast (and the > > > quality is low) so I won't need any analog feedback. > > > > > > > > > This morning I implemented a three level system to see how it would go. > > > > > > Not having a clue, I chose my quantisation function like this: > > > > > > Integrator Quant DAC output output > > output > > > > > > 00000... 00000... -1.8V ... > > > 00111... 00000... -1.8V 01000... 01000... 0.0V ... > > > 10111... 01000... 0.0V 11000... 01111... +1.8V > > 11111... 01111... +1.8V > > > > > > The integrator is one bit wider than the input word. > > > > > > It seemed to work really well (in Modelsim). > > > > > > - There are about half the number of transitions compared to the 2 level > > > case. > > > > > > - When the input is "zero" (i.e. at the half-way mark: 1000...) there > > > are no output transitions at all. Most of the time it will not be > > > making any sound, so no transitions for zero input seems like a > > > desirable property. > > > > > > Table formatting broke, sorry. > > > > Integrator Quant DAC > > output output output > > > > 00000... 00000... -1.8V > > ... > > 00111... 00000... -1.8V > > 01000... 01000... 0.0V > > ... > > 10111... 01000... 0.0V > > 11000... 01111... +1.8V > > 11111... 01111... +1.8VGiven what you have told us, I think you should be OK with the system you are proposing. Note that the fact that you produce all 0's for a 0 input is only possible because you are using a 1st-order feedback system, so even if the integrator has some non-zero value (that gets quantized to your middle output level), the difference between input and feedback is 0 so your integrator will just hold it's previous value and never change. Of course if you were doing more than just making beeps, then you would be concerned about low-level signals, in which case you would get all sorts of nasty idle tones, but as long as you don't care about this you should be fine. Note that in a 2-level system, the absolute loop filter gain does not matter because you are just taking the sign of the integrated error, but in a 3-level (or more) system it does matter. In your case you want to make sure that if the integrator output is in the +1 range, it should get corrected so that it lands in the 0 range, where it will get trapped if you have 0 input. If you have too much gain it could toggle forever between +1 and -1. Bob







