@rlogiaccoThe 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.

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.

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...

Please, do not send me personal messages containing forum related questions: I will not answer.

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... =(

As I said in the title: I need help XD

Please, do not send me personal messages containing forum related questions: I will not answer.

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.

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...

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....

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

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....

g_u_e_s_t

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.

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).

@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.

Please, do not send me personal messages containing forum related questions: I will not answer.

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"?

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.

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 attacheduses 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.

"Who is like unto the beast? who is able to make war with him?"When all else fails, check your wiring!

g_u_e_s_t

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.

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 attacheduses 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?