Shop OBEX P1 Docs P2 Docs Learn Events
LM358 OpAmp Basics — Parallax Forums

LM358 OpAmp Basics

geneshultsgeneshults Posts: 22
edited 2011-02-25 09:47 in General Discussion
I'm experimenting with the LM358 OpAmp as a Voltage Follower.
Using the BS2 PWM Output I have noticed that when the output of the PWM gets to about 3.4 volts the LM358 is 3.4 volts and will not go any higher. My range on the PWM will go from 0-4.9 volts. The range from the output of the LM358 is only 0-3.4 volts.
PWM Duty LM358 Output PWM Vout
0 0 0
5 .105 .102
10 .202 .198
20 .39 .39
30 .59 .58
50 .98 .97
100 1.95 1.94
150 2.9 2.9
175 3.37 3.37
180 3.37 3.4
190 3.37 3.6
255 3.37 4.9
Is this norm for the voltage follower of the LM358?
I have seen that the LM358 Stableizes the voltage so that it doesn't fluxuate so much as it does when reading the PWM output.
I would like it to follow it all the way from 0-255 or 0-4.9 volts.
Is there another OpAmp which will do this or do I need to do some thing else?
New Be at this and need help.

Thanks
Gene

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-02-22 08:24
    You need more +V supplying the LM358.
    You're probably using V_cc (5V).
    Try using V_in instead.
  • SteveLSteveL Posts: 6
    edited 2011-02-23 12:55
    It is actually a limit on the input, rather than the output, that you have found. Can you read a datasheet? If you can, it's in there. Input Common-Mode Voltage Range has a specified maximum of (Vsupply - 1.5V).

    You need a higher voltage for the OpAmp supply.
  • geneshultsgeneshults Posts: 22
    edited 2011-02-23 23:00
    SteveL wrote: »
    It is actually a limit on the input, rather than the output, that you have found. Can you read a datasheet? If you can, it's in there. Input Common-Mode Voltage Range has a specified maximum of (Vsupply - 1.5V).

    You need a higher voltage for the OpAmp supply.

    Learning as I'm going. Can I supply a higher voltage for the OpAmp with out damaging my BS2?
    Yes can read datasheet, lol, after posting my post.
    Thanks
    Again can I supply a higher voltage for the OpAmp with out damaging my BS2?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-02-24 04:53
    geneshults,
    What did you not like about the answer/solution that I posted?

    If you're doing Experiment #22 in StampWorks, it shows that the LM358 is supplied from/by V_in (not V_dd) which is "9V" if you're using a transistor battery. Can that be any clearer?
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-02-25 04:45
    It just might be helpful to explain that any Op Amp will clip a signal that attempts to amplify beyond the range of the power provided to the op amp.

    Some op amps will go 'rail-to-rail' before doing so. That means that if you provide +5 volts to one input and ground to the other, it will cover the full range from 0 to +5. But most do not go 'rail to rail', so you end up with the results you are seeing.

    The documentation explains when clipping will happen. Wikipedia will explain what clipping is. It seems with the LM358 to occur at about +V minus 1.5 volts. And so the solution is to use a higher voltage power supply to the op amp.

    Since the Basic Stamp is OUTPUTing to the OP AMPs input, the OP AMP can operate independently on a higher range of voltage. Not only is it not limited by the Basic Stamp, it requires a higher voltage (maybe 6.5 volts minimun) to reach 5 volts output.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-02-25 09:47
    Experiment #22 makes that all very clear.
    For best results, especially if you're a "student", follow the instructions.
    666 x 593 - 25K
Sign In or Register to comment.