12bit DAC enough for ATM quality audio messages?

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

I know this has been discussed, in the xmega forum, but has anyone experience on this?

My board should output wav files on the speakers of something resambling an ATM.

I'm using a 3W class-D amplifier for the speakers. Wav files are from a sd card.

Everything works now just fine, but I'm using a codec in-between the micro and the amplifier.

This way I can output very high quality audio, but this is not truly neccessary.

I'm thinking of using the xmega DACs for direct output, but I'm afraid of the resulting "quality".

This would save board cost and complexity.

Also, someone said of using the 1V reference for the DAC. But from what I understand the theory, this would get 1Vpp which is only 0.35Vrms.

The amplifier inputs which are "line in" standard are 1Vrms which is 2.82Vpp, so the DAC should be used with VDDA (3.3V) reference.

Of course, the coupling should be AC with capacitors.

Am I missing something?

Anyway the big question is: is 12bit high enough for such application? Think that you will go to some bank ATM and it will give you some voice messages and a pleasant melody on its 3W speakers smiley

Thanks

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

rammon wrote:
go to some bank ATM and it will give you some voice messages
Like "Insufficient funds... loser." cheeky

Ross McKenzie ValuSoft Melbourne Australia

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

Absolutely, 12 bits gets you up to a 72 dB signal to noise ratio, which will sound pretty good.

Tom Pappano
Tulsa, Oklahoma

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

rammon wrote:
Anyway the big question is: is 12bit high enough for such application?

 

Landline telephone calls use 13-14 bit DACs, sampling at 8ksps. These samples are compressed to 8 bits per sample (using ADPCM). The sound quality is "adequate". With a higher sampling rate and no compression, you should get better quality.

 

How about you try testing out a 12-bit depth output by having your code set the bottom 4 bits of each sample to "0" before sending out to your 16-bit DAC?

 

- S

 

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

mnehpets wrote:

rammon wrote:
Anyway the big question is: is 12bit high enough for such application?

 

Landline telephone calls use 13-14 bit DACs, sampling at 8ksps. These samples are compressed to 8 bits per sample (using ADPCM). The sound quality is "adequate". With a higher sampling rate and no compression, you should get better quality.

 

How about you try testing out a 12-bit depth output by having your code set the bottom 4 bits of each sample to "0" before sending out to your 16-bit DAC?

 

- S

 

Hey, that's definitely a try. Thanks!

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

8-bits would even be sufficient! Sample rate is more important than the resolution (to my ears anyway).

 

You could try to save your wav-files in various resolutions and sample rates; I'm aware that 12-bits is probably not an option, but I think 8-bits should be.

Try for example to compare 8kHz vs 11kHz vs 22kHz in both 8 and 16 bits on your PC.

- Brian

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

8-bit uncompressed at 11k sampling is more than adequate.

 

The trick is to make a high quality recording and then process it in an audio editor to maximise the dynamic range before you reduce the sampling rate and number of bits.

 

See this example of what it can sound like...

Attachment(s): 

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

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

Some tinyAVR 1-series have 8b DACs at up to 350Ksps.

AN2547 Digital Sound Recorder using DAC with tinyAVR 1-series | Application Notes | Microchip Technology Inc. (EVSYS for ADC)

 

Most XMEGA have DMA for the DAC.

 

"Dare to be naïve." - Buckminster Fuller

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

Brian Fairchild wrote:
The Blue Nile - Tomorrow Morning.zip

Hmm! I was expecting lots of hiss / noise but there wasn't.

Was that a Needle Drop ?

Did you compress that to death or did that happen as a result of reducing the resolution ? The Blue Nile recordings I've heard are characterised by lots of "Presence" and lots of dynamic range. That clip had neither.

 

Last Edited: Wed. Dec 5, 2018 - 03:13 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

N.Winterbottom wrote:

Did you compress that to death or did that happen as a result of reducing the resolution ? The Blue Nile recordings I've heard are characterised by lots of "Presence" and lots of dynamic range. That clip had neither.

 

Very little processing at all. I simply took a 128kbps 44k sampled MP3 into Audacity, turned it into a mono track, resampled at 11,025Hz, and then saved as an 8-bit uncompressed PCM .wav file.

 

I too was surprised by the fidelity.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

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

rammon wrote:
Am I missing something?
Volume control?

 

"Dare to be naïve." - Buckminster Fuller

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

gchapman wrote:

rammon wrote:
Am I missing something?
Volume control?

 

The class-D amplifier has volume control as an analog input. Currently I use a DAC output for it, but I also have boards with PWM and RC filter, when the CPU doesn't have a DAC.

If I will use the DACs for data, I will use a PWM for volume control.

 

So, it's definetely worth a trying using the 12bit DACs.

 

About all the sampling rate thing and audio processing, this is beyond my control. I have no clue what files will be playing. All I can do is just set some limits/preferences/advices for the guys that will prepare the audio files.

But from my understanding, there is a compromise between the sampling rate/resolution. High sampling rate/low resolution == low sampling rate/high resolution. At least ideally.

 

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

rammon wrote:

About all the sampling rate thing and audio processing, this is beyond my control. I have no clue what files will be playing.

 

But you have to set some parameters. Otherwise you will need a device that can play any audio file given to it.

 

rammon wrote:

All I can do is just set some limits/preferences/advices for the guys that will prepare the audio files.

 

Advice is not enough. Tell them what format your hardware accepts.

 

 

rammon wrote:

But from my understanding, there is a compromise between the sampling rate/resolution. High sampling rate/low resolution == low sampling rate/high resolution. At least ideally.

 

No. Not even close. A 4-bit audio file will sound like a 4-bit audio file whether it is sampled at 8k or 192k.

 

There are some trade-offs you can make but not enough to justify your '==' in the above statement.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

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

Brian Fairchild wrote:

rammon wrote:

About all the sampling rate thing and audio processing, this is beyond my control. I have no clue what files will be playing.

 

But you have to set some parameters. Otherwise you will need a device that can play any audio file given to it.

 

rammon wrote:

All I can do is just set some limits/preferences/advices for the guys that will prepare the audio files.

 

Advice is not enough. Tell them what format your hardware accepts.

 

 

rammon wrote:

But from my understanding, there is a compromise between the sampling rate/resolution. High sampling rate/low resolution == low sampling rate/high resolution. At least ideally.

 

No. Not even close. A 4-bit audio file will sound like a 4-bit audio file whether it is sampled at 8k or 192k.

 

There are some trade-offs you can make but not enough to justify your '==' in the above statement.

I already have some constraints: max. 48kHz, max. 16bit.

A 4bit audio file at 128k is 16x oversampled from 8k. So, in the LSB there is room for another 4bit for a total of 7bit.

If, of course, it is really oversampled not just a series of dumb repeated 16 identical samples for the original one.