Loading...
Pages: [1]   Go Down
Author Topic: Arduino Realtime Audio Processing  (Read 2929 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 30
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://interface.khm.de/index.php/lab/experiments/arduino-realtime-audio-processing/

I have one question about the input circuitry. I would like to know how you adjust the 10k trimpot to set the DC offset to 127?

- run the loopback test sketch
- open the serial monitor window with 57600 baud
- after reset the actual value is shown "ADC offset=127"

this is the code section in setup()
  . 
  Serial.print("ADC offset=");     // trim to 127
  ii=badc1; 
  Serial.println(ii);
 .

martin
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 272
Posts: 25443
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Not sure what you are not getting.

You run this code and with no audio going in you getba stream of numbers in the monitor window. As you turn the pot these numbers will change, when you get the number 127 you stop turning the knob and never touch it again.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What changes should i make if the input audio signals from a USB port of a computer?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 272
Posts: 25443
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What changes should i make if the input audio signals from a USB port of a computer?
You can't recieve audio down the UBB port from a computer with the arduino unless you convert the audio into values that you can send down the serial port with some application on the PC.
Logged

Offline Offline
God Member
*****
Karma: 9
Posts: 764
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know anything about that project...    But 127 doesn't seem right, and I don't even think it's possible with that circuit (assuming you are directly reading the ADC).

The Arduino has a 10-bit ADC.  That means you can read values between zero an 1023.   The normal half-way bias-point for AC audio signals would be 511 or 512.  Are you getting readings around 500?

If I calculate the minimum reading from turning the offset pot all the way down, I get 1023 x 100K/210K = 487.  (And, I get a calculated maximum of around 536.) 
« Last Edit: April 01, 2013, 01:16:55 pm by DVDdoug » Logged

Pages: [1]   Go Up
Print
 
Jump to: