Go Down

Topic: LM358 Voltage Follower / Buffer (Read 3 times) previous topic - next topic


Dec 29, 2010, 01:02 am Last Edit: Dec 29, 2010, 01:07 am by tocpcs Reason: 1
I'm trying to setup a buffer using the LM358 dual op amp.
I'm supplying it 5V from arduino, connected ground to arduino ground.

+ Input = Pin9 on arduino, analogWrite = 127
- Input = Connected to output
Output - connected to + of multimeter.

Then I have ground from the multimeter to ground of the circuit, which as above goes to the ground on arduino.

Basic Math - 5V is what is put out on the pins at analogWrite 255, so if I use 127, I expect to find ~2.5V.

At the arduino this is the case, I put the multimeter to it and got 2.46V.
I expect to find 2.46V at the output of the LM358.

I find 1.83V.

Why is that?  :-?

Interesting also, I put 3.3V into the opamp (from arduino 3V3 pin) and the multimeter = 3.30V

So it has to be something related to PWM :S

Hooked up 9V batteries to the circuit, 3.3V from arduino registers as 7.2V through op amp.


Dec 29, 2010, 01:11 am Last Edit: Dec 29, 2010, 01:13 am by retrolefty Reason: 1
Your multimeter is probably not designed to accuratly measure a PWM waveform duty cycle, but rather just DC or sine wave AC voltages.

What is missing in your setup is a simple low pass filter between the pwm output pin and the + input of your opamp. Try a 5k ohm resistor between the pwm pin that the + input to the op amp and a 10mfd capacitor from the + input pin of the opamp pin to ground. This should filter out the PWM frequency and give you a pretty good DC voltage out of the opamp.



But why do I get 7V when it's 3.3V from arduino (no PWM), and 9V batteries to the op amp circuit?


But why do I get 7V when it's 3.3V from arduino (no PWM), and 9V batteries to the op amp circuit?

I would first have to see a actual schematic drawing of what you have before I speculate on that. Sounds like you are forcing the op-amp to it's positive rail limit, which on many opamps is somewhat less then it's +vcc value.



Please forgive my poor drawing.

I also removed 3.3V (leaving input open), and that gives 7.24V on output to multimeter.

Go Up