Pages: 1 [2] 3 4 ... 7   Go Down
Author Topic: [SOLVED] TL082 preamp: help please!  (Read 9108 times)
0 Members and 1 Guest are viewing this topic.
Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34114
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Don't try and build a non-inverting amp, go for an inverting amp,
For audio it makes not a jot of difference.

@rlogiacco
The biasing on the output was fine. It was the input that was not. See the attached diagram, the first one you get when googling.
There is no need for the pot. The -ve end of the 10uF cap should go to the analogue input of the arduino. With a 10K resistor to +5V and another to ground to complete the biasing for the analogue input.
The gain is the ratio of the 100K and 1K resistors going to pin 2 of the op amp. So this is a simple X100 gain. Adjust these values for other gains.



* TL082Preamp.gif (4.23 KB, 412x307 - viewed 143 times.)
Logged

Roma - Italy
Offline Offline
Full Member
***
Karma: 2
Posts: 108
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Don't try and build a non-inverting amp, go for an inverting amp,
For audio it makes not a jot of difference.
Yes, I understand and I've no specific need for a non inverting amp, I was just trying to understand if I was misunderstanding the amp circuit. Inverting or non inverting doesn't make difference for my application.

@rlogiacco
The biasing on the output was fine. It was the input that was not. See the attached diagram, the first one you get when googling.

I'll do my best to understand it  smiley-lol

There is no need for the pot. The -ve end of the 10uF cap should go to the analogue input of the arduino. With a 10K resistor to +5V and another to ground to complete the biasing for the analogue input.
The gain is the ratio of the 100K and 1K resistors going to pin 2 of the op amp. So this is a simple X100 gain. Adjust these values for other gains.

The pot was there to control the gain as I think I need such control at this stage when I don't have any clue regarding the real gain I'm looking for.

With regards to connecting the Arduino analog pin to that point, wouldn't I risk to input a voltage higher than 5V and consequently damage the pin? I thought the voltage divider I created on the Arduino side would have ensured isolation and protection to the arduino...
Logged

Roma - Italy
Offline Offline
Full Member
***
Karma: 2
Posts: 108
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This preamp design stuff really isn't as trivial as it may seem.

 smiley-lol As I said, I did Google for it and what I'm presenting here is somewhat I did find on the net: http://www.instructables.com/file/F0ZL80WH7431186. I'm looking for help and tutoring/mentoring, not links  smiley-razz

The difficulty for me is I've some basic knowledge regarding electricity, I do understand a little about basic semiconductors (read transistors) and I'm now jumping into AC, biasing, op amps.... It's confusing and more I read and more I get confused...  smiley-cry

As I said in the title: I need help  smiley-lol
Logged

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

Quote
The pot was there to control the gain
No it was there to control the output level, the gain remains the same. If you want a variable gain make the 100K resistor connected to pin 2 into a variable resistor using one end and the wiper of the pot.

Quote
wouldn't I risk to input a voltage higher than 5V
No because the op amp is powered by 5V so it can not produce more than 5V output, no matter what the gain is.

Quote
I thought the voltage divider I created on the Arduino side would have ensured isolation and protection to the arduino.
No the two resistors forming a potential divider on the arduino input side that I described is to bias the audio signal, when there is no audio to half the available voltage range. This means when there is a signal it will sit symmetrically between the two voltage rails.

Quote
As I said in the title: I need help
That is what we are trying to do.
Make what I told you. Buy an oscilloscope.
Logged

Roma - Italy
Offline Offline
Full Member
***
Karma: 2
Posts: 108
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The pot was there to control the gain
No it was there to control the output level, the gain remains the same. If you want a variable gain make the 100K resistor connected to pin 2 into a variable resistor using one end and the wiper of the pot.

Ok, I don't get this either: isn't the opamp gain given by 1+(R3/R5)? This is what I found as definition of gain on wikipedia in regards to non inverting op amps which, I believe, is what I have depicted in the third diagram...

Quote
wouldn't I risk to input a voltage higher than 5V
No because the op amp is powered by 5V so it can not produce more than 5V output, no matter what the gain is.

Actually I'm powering the opamp with 12V, splitted into +6V and -6V.... Unless I'm misunderstanding that part as well...

Quote
I thought the voltage divider I created on the Arduino side would have ensured isolation and protection to the arduino.
No the two resistors forming a potential divider on the arduino input side that I described is to bias the audio signal, when there is no audio to half the available voltage range. This means when there is a signal it will sit symmetrically between the two voltage rails.

Ok, but the bias shouldn't come into the op amp on the input? I'm really getting confused now....

Quote
As I said in the title: I need help
That is what we are trying to do.

And I really appreciate! But I'm having difficulties in understanding your comments...
Sorry for being so noob.... smiley-roll-blue

Make what I told you. Buy an oscilloscope.

 smiley-eek-blue that's 60 quids the cheapest one I can find on ebay..... Do I really need an oscilloscope for the simple project I'm trying to realize?
Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 97
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

you shouldnt need an oscilloscope to make a preamp.  it helps, but is not neccessary.

do you have a drawing or picture of what you have currently built?  how are you making +/-6V from the 12V?

the only advantage of the inverting amplifier is that it is easier to bias / requires less components/
Logged

Roma - Italy
Offline Offline
Full Member
***
Karma: 2
Posts: 108
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

you shouldnt need an oscilloscope to make a preamp.  it helps, but is not neccessary.

That's what I thought, especially considering I the needs of my project....

do you have a drawing or picture of what you have currently built?  how are you making +/-6V from the 12V?

Latest version is already on this thread, but I'll repost here for clarity and simplicity. Please refer to this post http://forum.arduino.cc//index.php?topic=193115.msg1430261#msg1430261 for additional context

the only advantage of the inverting amplifier is that it is easier to bias / requires less components/

I understand that and I will definitely move to an inverting amplifier circuit, possibly using a rail to rail chip (LM358 ?) as my requriments are pretty low: I only need to detect frequency and amplitude of a simple wave on the two channels (separately) and it has to work on li-ion battery power.

I started with this because I had a TL082 around... and it got really complicated  smiley-roll-blue

But yes, I'll get your suggestion for a simpler circuit as I'm now learning a lot, but before moving into a new circuit and a new set of issues, I wish to understand this one and solve the problems I'm encountering here, mostly for learning purposes....


* audio_amp_volt_divider_schem.png (261.29 KB, 4014x2208 - viewed 43 times.)
Logged

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

Why do you keep on posting that circuit. I have told you already it will not work because the biasing is none existent on the front end.

Quote
I don't get this either: isn't the opamp gain given by 1+(R3/R5)? T
When I talk of the pot I was referring to the pot in the correct diagram I posted not your diagram.

Quote
Actually I'm powering the opamp with 12V, splitted into +6V and -6V....
Why? If you do that you will need protection on the arduino's input. Use two diodes, input to cathode and anode to +5V for one. input to anode cathode to ground for the other.

Quote
you shouldnt need an oscilloscope to make a preamp.
True if you know what you are doing. This poster is so new and knows so little yet that he will be left nowhere to go if it doesn't go 100% right, which given his newness he won't.

@rlogiacco - if you are not prepared to take advice then do not ask for it.
Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 97
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the lm358 isnt quite rail to rail, but will be close enough to get you started.  i would definitely reccomend starting from scratch with the lm358 and an inverting amplifier.  its good to understand what you have done, but you might find it easier to get there if you take smaller steps along the way.  if you look a the circuit for the AC inverting amplifier on this page

http://www.openmusiclabs.com/testpage/

you can just make R1, R3, and R4 10k, R2 100k, and C 1uF, and run everything off 5V.
Logged

Roma - Italy
Offline Offline
Full Member
***
Karma: 2
Posts: 108
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Why do you keep on posting that circuit. I have told you already it will not work because the biasing is none existent on the front end.

Two reasons Mike: first it is somewhat working, apart for that resonance effect I've noticed, and second because it is what I've currently built and I'm trying to "fix".

Now, if I understand you, there's no biasing on the opamp output (I understand that) but I thought biasing was referring to an input voltage. Nonetheless, because the supply voltage is +/-6V with no biasing (is it correct to say ground biasing?) I should get a +/-6V output, with gain given by G=1+(R3/R5).

Is the above statement correct referring my wrong circuit?


When I talk of the pot I was referring to the pot in the correct diagram I posted not your diagram.

Ok, sorry, my bad. I'll apply your suggestions as soon as I understand what's wrong with the current circuit. Please be patient, I'm a tough student  smiley-razz

Quote
Actually I'm powering the opamp with 12V, splitted into +6V and -6V....
Why? If you do that you will need protection on the arduino's input. Use two diodes, input to cathode and anode to +5V for one. input to anode cathode to ground for the other.

I'm using 12V because I've read the TL082 needs a negative input voltage and I actually got it somewhat working by using that voltage splitter.

In regards to the two diodes, are those there to prevent inverted current to flow into the Arduino?

@rlogiacco - if you are not prepared to take advice then do not ask for it.

Don't misunderstand me Mike, I'm not debating your suggestions and I'm thankful for your advices, I'm trying to understand the reasons behind them because I'm unable to apply them unless I understand them.

As an example, you gave me a diagram for an inverting amplifier with a grounded negative supply, which I already tried and it appeared non working for a TL082. I can try that exact circuit this afternoon, but I doubt it will work because accordingly to the specs the TL082 requires a negative supply voltage.

Among the other suggestions I received there were some regarding a two step gain, which I understand and I did appreciate, but that's not what I need and I believe they apply to complex audio outputs (HiFi and such): all I need is to take a +/- 0.25V sine wave input and boost it to 0/5V, inverting or not.

Right now I'm operating around a TL082 because that's what I currently have, I'll switch to an LM358 as soon as it'll be around.

So, please keep posting your suggestions and I'll do my best to understand them, but I'm unable to apply them blindly, mostly because I need to understand what I'm doing. I hope you don't mind and you'll keep trying to help me.
Logged

Roma - Italy
Offline Offline
Full Member
***
Karma: 2
Posts: 108
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

the lm358 isnt quite rail to rail, but will be close enough to get you started.  i would definitely reccomend starting from scratch with the lm358 and an inverting amplifier.  its good to understand what you have done, but you might find it easier to get there if you take smaller steps along the way.  if you look a the circuit for the AC inverting amplifier on this page

http://www.openmusiclabs.com/testpage/

you can just make R1, R3, and R4 10k, R2 100k, and C 1uF, and run everything off 5V.

I still don't have an LM358, when I'll have it I will go for that. May I ask what do you mean by "not quite rail-to-rail"?

May I ask you which IC would you suggest for my case?

Input +/- 200mV
Input freq. 50-200Hz (very low frequency, sine wave)
Output 0-5V
Supply 5V (Arduino powered by a lithium battery)

Goal is to minimize operating current so to maximize operating time on battery power.


I know, it's a little bit early for this considering I'm still trying to make it working  smiley-razz
Logged

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

Quote
I'm using 12V because I've read the TL082 needs a negative input voltage and I actually got it somewhat working by using that voltage splitter.
ALL op amps need a split supply. Voltage is relative, in the circuit I posted this effect of the split supply is provided by input biasing by producing a virtual ground.
What is important is the minimum voltage required to drive the amplifier, in the case of the TL082 this is =/- 5V. Down doad the data sheet of this amplifier.
The other thing is how close the output can get to the rail, in the case of this amplifier it is not very good. Figure 10 in the data sheet shows you this. However it only shows this for a 30V supply ( +/- 15V ) and the output can not get within 2.5V of the rail at best with a 1K load. If the output could reach up to and down to the power supply this would be called a rail to rail amplifier.
Basically it is the wrong amplifier for the job you want it to do.
Quote
May I ask you which IC would you suggest for my case?
I would use a MCP602 it will work happily off +/- 2.5V which means you can simply power it from 5V and generate the virtual ground with resistors.

Biasing is the act of adding a fixed DC voltage to a signal. it applies to either inputs or outputs and there are various ways of doing it.
Quote
(is it correct to say ground biasing?)
No.

Quote
I'm not debating your suggestions
You are doing a good job at pretending to then.
Quote
because I'm unable to apply them unless I understand them
You seem to be happy to implement the circuit you keep posting and you don't understand that.

Quote
you gave me a diagram for an inverting amplifier with a grounded negative supply, which I already tried and it appeared non working for a TL082.
Then you must have done something else wrong then.

Logged

Offline Offline
Faraday Member
**
Karma: 65
Posts: 2504
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It looks like you want to stay with this wrong thing that you have till you're told what is wrong with it even though you haven't a basis to understand - as you have acknowledged.
Given that, why can't you simply "do as you're told"?  Is this about ego?
You've blindly accepted this bummer circuit that you have now, so what's the problem?

That circuit that Mike attached

uses this TL082.
[The two 47K resistors on the non-inverting input "split" the supply.]
I don't like the "gain" pot on the output (it's an attenuator that way) and I wouldn't capacitively couple its output either, but those are side issues.
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Offline Offline
Jr. Member
**
Karma: 2
Posts: 97
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

RE: rail to rail - opamps are all a little different from one another, and none of the behave exactly like an "ideal" opamp.  and there are a number of different ways in which they stray from this "ideal" behaviour.  one of these has to do with how close a signal can get to the powersupply, both for signals being applied to the input pins, and the signal coming out of the output.  the TL082 is pretty bad about this, it can only get within ~3V of the output rail, on both the bottom and top rail.  The LM358 is better, it can accept inputs all the way down to the bottom rail, and apply outputs all the way down to the bottom rail, but can only go as high as (Vcc - 2V) at the input and (Vcc - 1V) output.  so if you were to run it off 0V and 5V rails, you could only get an output swing of 0V to 4V.  so its almost rail-to-rail, but not quite.

i usually like to reccomend the TLV2372 for generic rail-to-rail circuits.  its a little more expensive, and not available at the corner electronics store, but acts more like an "ideal" opamp.  the MCP602 is a good opamp as well, but it can not accept inputs all the way to the positive rail.  the MCP6002 is also a good choice, as it is very inexpensive and has full rail-to-rail inputs and outputs (RRIO), but i only hesitate to reccomend them because they run off 6V max.  so if you want to do a 9V battery circuit at somepoint and not use a voltage regulator, it will fry the amplifier.  so i generally keep a stash of TL082's and TLV2372's, and use the latter when i need rail to rail.
Logged

Roma - Italy
Offline Offline
Full Member
***
Karma: 2
Posts: 108
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It looks like you want to stay with this wrong thing that you have till you're told what is wrong with it even though you haven't a basis to understand - as you have acknowledged.
Given that, why can't you simply "do as you're told"?  Is this about ego?
You've blindly accepted this bummer circuit that you have now, so what's the problem?

No ego related to this, why do you think that? I've picked a circuit out there and tried to implement it. I might have done it wrongly, I might have picked a broken one, but it looked like a valid source and before moving away I wish to understand why I should. Have you opened the link I posted? Is the original circuit wrong?

The fact that I admit my ignorance on the topic doesn't imply I'm a dumb unable to understand any explanation, I might need a longer explanation though, which none here gets paid for so I will understand if I don't get an answer, but that's different from "do what I tell you to do and just shut up, I know what I'm talking about while you don't".

I understand my ignorance might frustrate you folks, but I'm here to learn and understand.

That circuit that Mike attached

uses this TL082.
[The two 47K resistors on the non-inverting input "split" the supply.]
I don't like the "gain" pot on the output (it's an attenuator that way) and I wouldn't capacitively couple its output either, but those are side issues.

I have that circuit on my breadboard right now, here is the schema (I'm missing a 0.1uF capacitor and have replaced a 0.1uF electrolytic one with a 47nF mylar capacitor).

I'm going to provide supply from Arduino +5V and bias from an Arduino digital pin, I believe the current consumption will be greater on the supply line and very small on the non inverting input.

I haven't powered the circuit yet as I've done no calculation on current draw and I wish to avoid to burn out the Uno: is there anything wrong on my wiring?


* TL082_schem.png (243.29 KB, 3375x2679 - viewed 46 times.)
Logged

Pages: 1 [2] 3 4 ... 7   Go Up
Jump to: