Shop OBEX P1 Docs P2 Docs Learn Events
Opamp and transistor circuit — Parallax Forums

Opamp and transistor circuit

JudithJudith Posts: 9
edited 2007-07-25 12:02 in General Discussion
Hey,
I'm designing a circuit that needs to take a 2.5V-3.5 V variable input over a 0-5V range. will this work out? There are 3 inputs--ground, 5V and the variable input--I hooked that one up toa 3 ohm resistor, then to the (-) side of an opamp, with a grounded wire going out of the (-) side and an 8.3 ohm resistor hooked up in parallel. Then its hooked up to the transistor which goes to a 2.26 ohm resistor and then to a grounded wire, and then the other end is the output. What type of transistor do I need to use, and will the circuit work?
Here's a pic of the circuit if that helps
18K

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2007-07-23 18:51
    Judith,

    Are you sure those resistor values aren't in kilo-ohms? Those values are extremely low for normal op-amp work.

    Also, its almost always the case to have a current limiting resistor in the base lead of the transistor.

    If I understand you correctly, you want to have the circuit switch as the input voltage changes from 2.7 to 3.5 v. If thats the case, just do a Google on "op-amp comparator circuits" to get a few sample circuits.

    As shown (with + input at zero volts), the circuit will switch as soon as the - input goes above zero.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • Dave HeinDave Hein Posts: 6,347
    edited 2007-07-23 21:50
    Judith,

    This circuit has a gain of 5 with an offset of 2.5 volts on the input.

    Dave
    279 x 209 - 2K
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2007-07-24 12:38
    It would really be best to select a specific op amp and look at the typical circuits. Resistances of megohms are not uncommon. And some opamps are easier than others.

    Can someone suggest a good one to start with. I know the ever popular 741 is not really a good choice as technology has moved foward.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • JudithJudith Posts: 9
    edited 2007-07-25 03:02
    Thanks everyone,

    Stramptrol--I don't want for the circuit to switch, I just want to amplify the 2.5 V-3.5 V input so that it reads in the 0-5V range, with more detail.

    Dave--When you say it will gain 5 that means it'll gain 5V right--but it won't amplify the 2.5-3.5V range will it? what could I add to that circuit so that it would?

    Does anyone know what type of opamp I should use?
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2007-07-25 05:30
    The circuit that Dave posted will transform the 1 volt range from 2.5 volts to 3.5 volts into the range of 0 to 5 volts. That is, it offsets the 2.5 volts and amplifies times 5. The important thing for the math of offset and gain is the ratio of the resistors. You could make the following replacements and get the same result:
    ...100k instead of 16k
    ...150k instead of 24k
    ...60k instead of 9.6k (closest standard value is 60.4k).
    All three resistors affect both the offset and the gain.

    A good cheap op amp for this is the LM358. It is two op-amps in one 8 pin package, so the above circuit only uses 1/2 of the chip. You have to supply it with at least 6.3 volts on pin 8 in order for it to get up to 5 volts at the output. So supply it from Vin instead of from Vdd. The Vss connection goes to pin 4. There are other op amps that can go practically all the way to 5 volts even with a 5 volt power supply, if that is important for what you are doing.

    The attached circuit uses two op amps (both halves of the LM358).
    attachment.php?attachmentid=48358
    Your signal would go into input V2, while you would supply 2.5 volts from a voltage divider into input V1. A potentiometer there would allow you to trim the offset independent of the gain.
    For a gain of 5, the ratio of R2 to R1 has to be 4.
    for example
    ...R1 = 10k 1%
    ...R2 = 40.2k (standard 1% value)
    or
    ...R1 = 100k in parallel with 100k = 50k
    ...R2 = 100k in series with 100k = 200k
    so it could be done with only 100kohm 1% resistors or resistor network.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
    340 x 131 - 5K
  • stamptrolstamptrol Posts: 1,731
    edited 2007-07-25 12:02
    Judith,

    Ah yes, an analog circuit.

    I've got a good general purpose amp I use for just such an application. Don't have drawing with me at the moment, but will post later today.

    Cheers,

    >>>>>>> Drawing added Jul 25, 2007 >>>>>>>>>>>>

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com


    Post Edited (stamptrol) : 7/25/2007 4:29:01 PM GMT
Sign In or Register to comment.