Go Down

Topic: Arduino Realtime Audio Processing (Read 7 times) previous topic - next topic



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



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.


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


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.


Apr 01, 2013, 08:09 pm Last Edit: Apr 01, 2013, 08:16 pm by DVDdoug Reason: 1
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.) 

Go Up