Hello,

I am trying to implement pulse oximeter circuit. I am using LM358 as an amplifier. My analog circuit works well but I am giving this output to Arduino analog input- and because of the fact that Arduino could not get negative voltage as an input, I should generate positive DC offset in the analog output(or output of LM358). I give 0.1V DC input bias and 100mVpp sinusoidal signal(to simulate pulse oximeter sensor output) but the output saturates at 5V, even if the supply voltage of LM358 is 12V. Why it saturates?

And if is there any suggestion to obtain AC voltage which average voltage is not 0V, I'll be very glad. I am very confused about how can I obtain positive DC bias for my circuit output.

PS: I attached the amplifier circuit to this post.

You haven't managed to attach the amplifier circuit, like you said you would.

sorry, here is the circuit.

Your circuit has a voltage source directly connected to the + pin of the opamp, which is wrong because the input signal will simply be shorted out. Perhaps you are feeding in a bias of 0.1V with a resistive divider in reality? If so the circuit looks good, 2.5V DC offset at the output and gain dropping to x1 at high frequencies, 25x at low frequencies (assuming the input capacitor isn't too small).

Is C1 electrolytic?

BTW you need to protect the Arduino from 12V so you cannot just plug the opamp output into An Arduino pin if the opamp is run from 12V.

You could connect the end of R4 that you have connected to ground, to your 0.1V DC source instead. But how are you producing 0.1V? It's not necessary.

You can run a 2.4 megohm resistor from R4 to 12V to produce the 0.1V bias.

MarkT and aarg thanks for your help. I updated the circuit according to your suggest. Here I attached the results taken from my circuit. When scope is in AC mode there is negative signal in the output but in DC mode even if I applied positive input bias, I could not see that negative voltages. Could you please check the results and inform me Is the result true or not?

Thanks,
Duygu

Now I am posting the results, there are always a delay to my posts because of the file types :s

circuit_results.pdf (401 KB)

As you see, that circuit doesn't work, and can't because the positive input is not properly biased. Also, you should not be using 12V as the op amp power supply, because you can damage the Arduino input.

Are you just making these circuits up, or consulting some reference design? What do you want the circuit to do?

I just want to apply some DC offset voltage on the output to see negative voltages on DC mode too. I am planning to calculate Spo2 from this output signal when I am be able to obtain DC offset. so what do you suggest me to apply input bias correctly? In addition I can use 5V supply for opamp but if I use 12V supply how can I protect Arduino from high voltage?

Duygu.

Make R7 = R4 and use 5V to power the op amp.

Edit: The input should go through R2, via a capacitor, and C2 should smaller and grounded. Look at the first circuit on this page: http://www.rason.org/Projects/opamps/opamps.htm

Do not cross post. The circuit you posted here did not produce the output shown here: http://forum.arduino.cc/index.php?topic=372629.0

If you want to amplify voltages on either side of zero and refer these to half of Vcc, use an LM386 operating from the 5V supply.

It does the biasing automatically.

jremington:
As you see, that circuit doesn’t work, and can’t because the positive input is not properly biased. Also, you should not be using 12V as the op amp power supply, because you can damage the Arduino input.

Are you just making these circuits up, or consulting some reference design? What do you want the circuit to do?

Which circuit are you talking about - the latest version is working - it has gain and level-shifts the input.

Regards my suggestion in #4 which is taking some criticism. Of course it's not conventional biasing. I was not trying to solve all the problems simultaneously (like changing the 12V to a 5V supply, for example). I see that my 2.4M got changed to a 3.3M with no explanation. I based the value on the minimum DC offset that would accommodate the requested input voltage range. Of course a DC offset of VCC/2 offers the greatest input range. But that non-inverting op amp configuration does not require any particular DC offset on the input in order to function. I was lazy about component values, but I think it can be made to work correctly over a reasonable input and output range.

Many ways to skin a cat. Try this. Connect R4 to Arduino's 5volt rail instead of ground (connect C2 with the right polarity!). Add an electolytic cap (100uF?) in series with R2 (between R2 and ground), to make bias independent of gain. Opamp's output is now biased at 5volt. Add a 10k:10k voltage divider between output of the opamp and Arduino pin. It will correct the bigger swing of the opamp (12volt supply), protect the pin, and bias the Arduino pin mid-voltage. Gain of the opamp can/must be doubled because of the divider loss, so adjust R2:R1 if needed. I would make R1 100k, and adjust R2. Leo..

Edit: I don't know what is connected to the input (C2). It might be wise to add a (1k) resistor in series with C2 to protect ? when C2 is charging/discharging.