# Amplifying audio signal before ADC

**URL:** <https://forum.arduino.cc/t/amplifying-audio-signal-before-adc/990513>\
**Category:** General Guidance\
**Created:** [May 10, 2022, 10:31pm UTC](https://forum.arduino.cc/t/amplifying-audio-signal-before-adc/990513 "2022-05-10T22:31:44Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![TijuanaKez](https://avatars.discourse-cdn.com/v4/letter/t/a88e4f/32.png) [@TijuanaKez](https://forum.arduino.cc/u/TijuanaKez)\
**Post date:** [May 10, 2022, 10:31pm UTC](https://forum.arduino.cc/t/amplifying-audio-signal-before-adc/990513/1 "2022-05-10T22:31:44Z")

</div>

I want to measure an audio level at the Arduino analog input, and I've breadboarded up the basic idea using the 'envelope follower' circuit described in this thread.

> [@Read 3.5mm audio jack volume values with Arduino UNO.](https://forum.arduino.cc/t/read-3-5mm-audio-jack-volume-values-with-arduino-uno/595153):
>
> Hello, Yesterday I started building a new project for reactive led lighting. I found this thread -\> [How to read data from audio jack? - Audio - Arduino Forum](https://forum.arduino.cc/index.php?topic=476900.0) and this configuration [http://i.imgur.com/Aop9U1r.png](http://i.imgur.com/Aop9U1r.png) which is this schematic [How to read data from audio jack? - Audio - Arduino Forum](https://forum.arduino.cc/index.php?action=dlattach;topic=476900.0;attach=211774) if I'm not mistaken. I use this female 3.5mm part - [http://www.powerstroke.org/forum/attachments/6-0l-electronics-discussion/242274d1392268638-wiring-aux-3-5mm-headphone-jack-diagram1sm0.jpg](http://www.powerstroke.org/forum/attachments/6-0l-electronics-discussion/242274d1392268638-wiring-aux-3-5mm-headphone-jack-diagram1sm0.jpg) and connecti…

Problem is, if I connect a headphone out of the laptop and send a test tone, I don't start seeing values above 0 until my test tone gets to about -15db. I really need it to register all the way down to -60db or thereabouts.

So obviously, I need a way to preamplify the signal. I would also like to experiment with measuring a microphone level with a variation of the circuit, so I'd need lots of amplification range.

Most circuits around here or other places involve using an opamp like TL072 or TL082, but they require a symmetrical power supply which isn't really an option.

I've seen other circuits using audio amplifier chips like LM386, but the circuits I can see always have this at the output, usually driving a speaker.

So what's the recommended way to amplify an audio signal before it gets to the Arduino analog input pin? (preferably still using common and breadboardable components)

---

<div class="post-metadata">

**Author:** ![lastchancename](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/lastchancename/32/215426_2.png) [@lastchancename](https://forum.arduino.cc/u/lastchancename)\
**Post date:** [May 10, 2022, 10:49pm UTC](https://forum.arduino.cc/t/amplifying-audio-signal-before-adc/990513/2 "2022-05-10T22:49:21Z")

</div>

You could find a cheap ‘ **pre amplifier** ,’ on ebay - suited to the input and output levels you are matching, or it’s not too many components, but it’s a separate project to design and build your own.

Your choice, in most cases,it’ll cost less than $10 to do it properly.

---

<div class="post-metadata">

**Author:** ![TijuanaKez](https://avatars.discourse-cdn.com/v4/letter/t/a88e4f/32.png) [@TijuanaKez](https://forum.arduino.cc/u/TijuanaKez)\
**Post date:** [May 10, 2022, 10:53pm UTC](https://forum.arduino.cc/t/amplifying-audio-signal-before-adc/990513/3 "2022-05-10T22:53:35Z")

</div>

Thanks for the reply. Yes I'm aware of the plethora of ebay/aliexpress premade bits and bobs, but as I said, I'd like the breadboard this for learning.

---

<div class="post-metadata">

**Author:** ![lastchancename](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/lastchancename/32/215426_2.png) [@lastchancename](https://forum.arduino.cc/u/lastchancename)\
**Post date:** [May 10, 2022, 11:31pm UTC](https://forum.arduino.cc/t/amplifying-audio-signal-before-adc/990513/4 "2022-05-10T23:31:00Z")

</div>

Ok, so you need to get from ‘headphone’ level to a nominal 5V peak…  
Basically like a small amplifier used with those cheap & nasty plastic speakers.

Line-level as you found already is too low to excite your 5V ADC needs, you need to kick out something more substantial!

Even if the amplifier output swings around 12V, you can use a resistor divider to bring it back in to 0-5V range for the analog input,

**Remember** , whatever source you’re using should operate at around 60% gain, otherwise any more, and you’ll introduce ‘clipping’ and unwanted distortion on the signal.

---

<div class="post-metadata">

**Author:** ![TijuanaKez](https://avatars.discourse-cdn.com/v4/letter/t/a88e4f/32.png) [@TijuanaKez](https://forum.arduino.cc/u/TijuanaKez)\
**Post date:** [May 10, 2022, 11:37pm UTC](https://forum.arduino.cc/t/amplifying-audio-signal-before-adc/990513/5 "2022-05-10T23:37:37Z")

</div>

Ok thanks again. So basically I could stick with the LM386 for simplicity and feed that into a voltage divider to bring it back down?

I figure I can avoid some complexity around noise levels, frequency response, distortion etc usually employed in an audio preamplifier, as all I want to measure is an approximate 'volume' level of a sound source. Sound quality doesnt matter.

---

<div class="post-metadata">

**Author:** ![lastchancename](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/lastchancename/32/215426_2.png) [@lastchancename](https://forum.arduino.cc/u/lastchancename)\
**Post date:** [May 11, 2022, 12:23am UTC](https://forum.arduino.cc/t/amplifying-audio-signal-before-adc/990513/6 "2022-05-11T00:23:57Z")

</div>

Yeah, i’d breadboard that to get it working, then finalise it once you’re happy.

Good luck.

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [May 11, 2022, 1:08am UTC](https://forum.arduino.cc/t/amplifying-audio-signal-before-adc/990513/7 "2022-05-11T01:08:17Z")

</div>

> [@TijuanaKez](#):
>
> LM386

Possibly the worst choice you could ever make for a preamplifier. Just use an op amp. You can often find simple signal amplifier circuits using them, in their data sheets or application notes.

I don't know everything about your application, but it's also possible that a one-transistor amp circuit could work.

---

<div class="post-metadata">

**Author:** ![TijuanaKez](https://avatars.discourse-cdn.com/v4/letter/t/a88e4f/32.png) [@TijuanaKez](https://forum.arduino.cc/u/TijuanaKez)\
**Post date:** [May 11, 2022, 1:13am UTC](https://forum.arduino.cc/t/amplifying-audio-signal-before-adc/990513/8 "2022-05-11T01:13:32Z")

</div>

> Possibly the worst choice you could ever make for a preamplifier. Just use an op amp. You can often find simple signal amplifier circuits using them, in their data sheets or application notes.

Any suggestions that are well known and dont require symmetrical power supply?

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [May 11, 2022, 1:13am UTC](https://forum.arduino.cc/t/amplifying-audio-signal-before-adc/990513/9 "2022-05-11T01:13:40Z")

</div>

> [@TijuanaKez](#):
>
> Most circuits around here or other places involve using an opamp like TL072 or TL082, but they require a symmetrical power supply which isn't really an option.

It's relatively easy to bias an op amp from a single supply - just do some research. Thousands of musical instrument stomp boxes do it from a 9V supply.

If you plan to run it from 5V, get a "rail-to-rail" amp. Actually there are a good number of those available now, so many applications demand 5V operation...

---

<div class="post-metadata">

**Author:** ![TijuanaKez](https://avatars.discourse-cdn.com/v4/letter/t/a88e4f/32.png) [@TijuanaKez](https://forum.arduino.cc/u/TijuanaKez)\
**Post date:** [May 11, 2022, 1:30am UTC](https://forum.arduino.cc/t/amplifying-audio-signal-before-adc/990513/10 "2022-05-11T01:30:37Z")

</div>

Ok thanks. I'd already kinda figured from googling around that what I really needed was a 0-5V rail-to-ail opamp. But googling that is a minefield of wierd and wonderful unknown, usually SMD, sometimes expensive devices who's data sheets are beyond my full comprehension at this stage of my journey. Was hoping there might by something common that people could recommend that comes in a dip package, and that I might find other example circuit schematics to study. I guess I'll just buy random stuff from Ali and have a play.

---

<div class="post-metadata">

**Author:** ![DVDdoug](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dvddoug/32/671533_2.png) [@DVDdoug](https://forum.arduino.cc/u/DVDdoug)\
**Post date:** [May 11, 2022, 1:36am UTC](https://forum.arduino.cc/t/amplifying-audio-signal-before-adc/990513/11 "2022-05-11T01:36:43Z")

</div>

The LM386 might "work" but it's a "power amplifier" for driving a speaker.

[Here is a schematic](https://cdn.sparkfun.com/datasheets/BreakoutBoards/Electret_Microphone_Breakout_v20.pdf) for a microphone amplifier.

Of course you can leave-out the microphone and you can leave out R1 which powers an electret mic.

The gain is the ratio of R5/R4, = 82 = 38dB as-designed, but you can change those.

R2 & R3 make a 1/2 voltage divider to bias the output at Vcc/2 (so you can read the negative half of the audio signal).

The OPA344 is a "rail-to-rail" op-amp so the output can go from ground to Vcc. You'll want a rail-to-rail op-amp if you don't use higher and/or dual power supplies for your op-amp.

> [@](#):
>
> values above 0 until my test tone gets to about -15db. I really need it to register all the way down to -60db or thereabouts.

Decibels are **relative...** For example 0dBV is a reference where 0dB = 1V RMS. Or a voltage gain of 10 is 20dB of amplification. The _amplification_ or _change_ can be measured without a reference but the dB _level_ is meaningless without a reference.

The basic Arduino has **almost exactly a 60dB range...** -60dB is 1/1000th so if 0dB is an ADC reading of 1023 (the maximum 10-bit count) then a reading of 1 is about -60dB. In order to read -60dB, 0dB will to be 5V peak-to-peak = 1.76V RMS (unless you don't need to go all the way to 0dB).

**Also, with high gain noise usually becomes a problem.** You are amplifying any electrical noise and -60dB can be "difficult" without careful design and a solid-quiet power supply,

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [May 11, 2022, 1:36am UTC](https://forum.arduino.cc/t/amplifying-audio-signal-before-adc/990513/12 "2022-05-11T01:36:46Z")

</div>

Well, for an audio signal amp application using an op amp at a low voltage, you mainly need to look at the output swing, so first you need to understand what your output signal level requirement actually is. Have you considered limiting the range of the ADC to a lower voltage? You can often do it by changing the ADC reference voltage, which you can do with an Arduino command that I forget the name of right now. But if you set your ADC ref to 1.1V, it will more than quadruple the input sensitivity, therefore increasing the effective gain by more than 4. Maybe you don't need an amp.

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [May 11, 2022, 1:38am UTC](https://forum.arduino.cc/t/amplifying-audio-signal-before-adc/990513/13 "2022-05-11T01:38:03Z")

</div>

OP probably means dBm. Or equivalent dBV into a standard resistive load of 600(?) ohms. It's been a while. 🙃 🙃

---

<div class="post-metadata">

**Author:** ![TijuanaKez](https://avatars.discourse-cdn.com/v4/letter/t/a88e4f/32.png) [@TijuanaKez](https://forum.arduino.cc/u/TijuanaKez)\
**Post date:** [May 11, 2022, 1:43am UTC](https://forum.arduino.cc/t/amplifying-audio-signal-before-adc/990513/14 "2022-05-11T01:43:08Z")

</div>

Ok great, I'll have a look into the OPA344, it's probably what I need.

Yep dbs are relative, I was just giving an example that my signal is far too low at the ADC.

In reality, the 'swing' doesnt need to be huge as all I require is an approximation.  
E.g, if all I get at the ADC is values between 0-100 instead of the full 10 bit range, I can just amplify(multiply) in software. Its only to roughly measure signal level.

> **Also, with high gain noise usually becomes a problem.** You are amplifying any electrical noise and -60dB can be "difficult" without careful design and a solid-quiet power supply,

Well I was thinking a simple passive Lowpass RC filter would help me. Again, the 'sound' of the audio doesnt matter, it's just to drive an envelope follower.

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [May 11, 2022, 1:46am UTC](https://forum.arduino.cc/t/amplifying-audio-signal-before-adc/990513/15 "2022-05-11T01:46:09Z")

</div>

Why not just use the 1.1V ADC range? It's mentioned in the links you provided.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [November 7, 2022, 1:46am UTC](https://forum.arduino.cc/t/amplifying-audio-signal-before-adc/990513/16 "2022-11-07T01:46:11Z")

</div>

Closed on November 7, 2022, 1:46am UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
