Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

8 Bit DAC audio output

Status
Not open for further replies.

omerysmi

Member level 5
Joined
Oct 10, 2014
Messages
91
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
1,128
I'm trying to implement audio output using R2R 8bit DAC and Arduino UNO.

This is my hardware:
http://imgur.com/a/hiUCq

This is the sound i want to hear:
http://vocaroo.com/i/s0VDwBBkQRdc

This is a wav file, 16Khz, mono, 8 bit pcm.

I used matlab to retrieve the binary data from the wav file, and then wrote this code:

http://csharppad.com/gist/0f39da965e31fc838c6de73ff50e5669

I connected the output to some speaker and what i hear is some strange sound..do you think i miss something in my hardware/software?

Thanks!


Code C - [expand]
1
#include <avr/pgmspace.h>



vncb4SR.png
 

Attachments

  • Vocaroo_s0VDwBBkQRdc.rar
    6.4 KB · Views: 49
Last edited by a moderator:

Hi,

It is very unlikely that audio signals are recorded with 8 bits resolution.
For audio signals you need more dynamic.

Klaus
 

I have played with a free digital sound processing program called Audacity. I experimented by recording audio at all variations of 8 or 16 bit, 22 or 44.1 kHz, big or little endian, etc. This is a versatile program, useful to import digitized audio in different formats, in a quest to find a format that works. You can also test various settings during playback, to speed up or slow down, etc., to discover what sounds correct. It might be a helpful tool as you're experimenting with your own setup.
 

I'm trying to implement audio output using R2R 8bit DAC and Arduino UNO.

This is my hardware:
http://imgur.com/a/hiUCq

This is the sound i want to hear:
http://vocaroo.com/i/s0VDwBBkQRdc

This is a wav file, 16Khz, mono, 8 bit pcm.

I used matlab to retrieve the binary data from the wav file, and then wrote this code:

http://csharppad.com/gist/0f39da965e31fc838c6de73ff50e5669

I connected the output to some speaker and what i hear is some strange sound..do you think i miss something in my hardware/software?

Thanks!

Hi,

It is very unlikely that audio signals are recorded with 8 bits resolution.
For audio signals you need more dynamic.

Klaus

But there are many examples in youtube of using 8 bit dac audio output and it's sounds good...
I've checked my dac and it's working good in voltages of 0 to 5..maybe the problem is after the dac? because the sound i get is not similar to the original sound..
 

I agree that linear 8 bit PCM audio can achieve a kind of pocket radio quality, at least audible voice.

The code is however flawed. delay(0.0625) has the same effect as delay(0), because it's delaying integer milliseconds.
 

I agree that linear 8 bit PCM audio can achieve a kind of pocket radio quality, at least audible voice.

The code is however flawed. delay(0.0625) has the same effect as delay(0), because it's delaying integer milliseconds.

I fixed the code problem, now i hear something that repeat it self and it similar to the audio file in the rate of it but it still sounds like a noise or humming and not like a voice..
 

I also noticed that if i remove the 220uf cap, 10nf cap and 10k resistor there is no difference in the sound i get..maybe the problem is in the op amp?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top