OP Amps - help please, urgent

I’m doing a project. As part of it, I need to convert a voltage from 1.5V DC to prefereably 5, but 3.5V DC is sufficient.

To do this, I need an Op Amp. I bought 2 in case one was faulty - LM324N. The details about it can be found here:
http://www.fairchildsemi.com/pf/LM/LM324.html
and here:

I’m using it as a noninverting amplifier, which I believe is the right way round - I looked at this tutorial and read it & looked at the circuit diagram:
http://ourworld.compuserve.com/homepages/Bill_Bowden/opamp.htm

I’m connecting my 1.5v output into 1+, I’m connecting the 1- to ground, via the smaller resistor (Ra in the tutorial), and I’m connecting from before Ra to the output voltage (1o) via Rb (the larger resistor). The device needs to have 5V put through it and to be grounded in order to work. This is all done, there are no shorts.

Now, according to my math, the output voltage gain should be 1 + (Rb/Ra), which when I use a 440 Ohm resistor for Rb and a 10v resistor for Ra should be 48, when I use the 440 Ohm for Rb & a 220 Ohm for Ra should be 3.1, and when I use the 440 Ohm for Rb and a 150 Ohm for ra should be about 4.1.

No matter which I use, I’m getting an output voltage of about 3.4 or 3.5. This wouldn’t really be a problem, although it does distrub me, since this is the sort of voltage I need out of it.

But I’m also getting 3.8V when I don’t even have my 1.5v going into it. It’s putting out a higher amount with no voltage than it is with voltage. According to the specs with no input voltage, there should be 0 output voltage, so it doesn’t make sense.

It does it for bboth of the op amps I got, which seems unlikely that it’s a fault, although it may be.

I have to have 0V for zero input & 3.5V or higher (to a max of 5V) for my 1.5V input voltage, or I can’t use it as a controller.

Can anyone help please?

What are you using for the power supply to the op amp? Two nine-volt batteries? Notice that in the tutorial, pin 11 of the op amp is NOT connected to ground, instead its connected to minus nine volts (and pin 4 is connected to +9V, and the common connection between the two 9V batts is your ground reference.)

But in the pdf for the LM324, it has a diagram (on p1) showing V+ being connected, and having a ground (GND) on the other side. On page 9 of that pdf, it has a diagram identical apart from a kink in the wiring to the tutorial diagram (top left, with a range of voltage outputs for it shown in a graph to the right), with in brackets a note saying that V+ = 5V.

And I’m just using a simple 5V power supply.

When you don’t have your 1.5 V going into it, do you have the terminal grounded? If not, the input is floating to wherever it wants, which may be around 2 V.

>> And I’m just using a simple 5V power supply.

If your input reference is zero you need a split power supply. if you use a single power supply your input reference will be half the power supply voltage.

Is there a reason you need to use an op-amp? If all you’re looking for is a 5V out when the input is at or above 1.5V and a 0V output otherwise, it would seem easier to use a transistor and a few resistors as a voltage-controlled switch.

Ah, I see the problem. If you overdrive the opamp so it TRIES to produce a voltage far higher than 3.5V, instead it’s voltage doesn’t go any higher. That chip simply cannot exceed the power supply minus 1.4 volts (so, with a 5V power supply, the biggest output you can get will be around 3.6v or so.)

I calculate that, in order to produce a 3.5 volt output from a 1.5v input, you want to use 440 ohms for Rb, and 330 ohms for Ra. Do you get the same numbers?

Your other problem is well known. Whenever you disconnect an op amp input pin TOTALLY, the voltage on that pin can drift to any value depending on leakage across the plastic, and depending on “static electricity” on nearby objects. To prevent this effect, you need to connect a large-value resistor between that input pin and ground. That way there will still be a sensible resistance to ground, even when everything else is disconnected. Use a 1-meg resistor, or maybe a 10-meg (between the +inp and ground) and the circuit should start behaving sensibly.

Also try this. Disconnect the input pin. Measure the output voltage of the op-amp. Comb your hair with a plastic comb, then wave the comb near the chip. Sometimes the floating input pin will pick up the high voltage in the air! This is safe to do with most op amps such as LM324, LM741, etc., but if you use a CMOS op amp it can wreck the input transistors inside the chip.

PS, the normal way to connect an op-amp power supply is to give the chip a +V and a -V, that way the output pin can swing both positive and negative. In that case your “ground” reference becomes the junction between the two power supplies (or two 9v batteries) and pin 11 goes to -V, not to ground.

The data sheet for the op amp in question says it has a DC gain of “100 dB”. I assume that means a voltage gain of 100,000. If so, and voltage over 35 microvolts will “overdrive” the op amp.

“Leakage across the plastic”? I can’t believe that this phenomenon would contribute noticeably to the voltage at the unconnected input. The innards of the circuit cause the input to float to whatever value it floats to. Also, why not connect the pin directly to ground rather than using a large resistor?

bbeaty is correct: you simply can’t get the output to swing more than V[sup]+[/sup] - 1.5. There are two solutions to this problem:

  1. Use a higher supply voltage, such as 9 V or 12 V.
  2. Us an op-amp that can produce an output voltage within a few millivolts of the supply rails. (It also must be capable of operating from a single power supply.)

Another thing I noticed is that you’re using very low resistor values. Is there a reason for this? If not, then the Ra and Rb are needlessly burning up current that could be used to drive a load. I would suggest sticking to resistor values between 1K and 50K.

Let’s step back to what Fierra and I are trying to do, and perhaps the experts can recommend a better way to accomplish our end goal here.

We have a 1.5V digital signal that we want to increase to near 5V. This is because we are working with an Scenix SX28L microprocessor, and it really wants to see an input that is higher than 1.5V. Setting it to TTL logic on the input pins means that 1.4 V is technially “On”, but it acts erratically. If I simulate the signla with a 5V input, it works very reliably.

We are hooking this to a temperature probe, which has a 1.5 V output for an alarm signal (high pin). We need to detect this, and for the detection to occur reliably, it needs to be more than 1.5 V. Even in CMOS logic mode, 3.5 V would work - BUT, as Fierra said, when we removed the 1.5 V signal, we then got 3.8 V, instead of “0”.

What is a good way to wire this OP-AMP, or other system, that will boost a 1.5 signal to 3.5-5V? The only power supply we have available is a 1.5V and a 5V.

Between the two of us, we know about enough to be confused by the seemingly contradictory instructions that came with the OP AMP, and I just can’t help but wonder how it can be so hard to just double a 1.5V signal.

So, I hope this helps if anyone is willing to give us a hand.

Una

So, when you say you “remove” the 1.5 V signal, do you physically disconnect the temperature probe, or do you put it into its non-alarm state? If it’s the former, then I stand by my previous comment that a floating input can (or, depending on the device family, will) float high. The op amp amplifies this voltage and goes into saturation, which according to the datasheet linked by fierra is 1.5 V below Vcc, or 3.5 V. If it’s the latter, then maybe the temperature probe can’t sink enough current to pull the input low. I highly doubt that this is the case, though, since op amp inputs are very high impedance, and the probe would probably have to sink less than a milliamp. [I can’t seem to get the op amp datasheet to download right now, or I’d have a more precise answer.] So, if the probe is connected, putting out a low signal, and you’re still getting 3.5 V out of the op amp, I have no idea what’s going on.

Anyway, I calculate the gain of fierra’s lowest-gain configuration as 3.93, so it’d take only about 0.9 V to put the op amp into saturation.

Here’s another idea of what to do with your op amp: Since the saturation output is about what you want, you can use it open-loop. Simply make a voltage divider to give you about 1 V (or whatever you want the threshold to be), and hook the center tap of the voltage divider to the minus terminal. For example, use a 1 kilohm resistor from the (-) terminal to ground, and a 4 kilohm resistor from the (-) terminal to +5 V. The op amp will function as a comparator, giving Vcc when the (+) terminal voltage (the temperature probe) exceeds the (-) terminal voltage (whatever you’ve set your voltage divider to be), and it’ll give ~0 V when (-) exceeds (+).

You really do not need an Op-amp for this as they are best suited for analog signals. I would not use an op-amp for this application as you have to deal with the power supply issues.

Boosting a digital signal up a bit is quite easy and can be done in several ways. A couple of transistors will do the trick (invert twice) or you can use ICs. I would just use transistors as the simplest way.

I deally we would need to know the output impedance of the probe and the input impedance of the next stage. I am assuming the input impedance would be quite high and not an issue. The output impedance of the probe might have an effect if it is high but I can design something quick and dirty which would work in most cases and only need a bit od tweaking if the output impedance of the probe is very high.

It is quite simple. Email me if you want a schematic and instructions.

Una, I emailed you a simple diagram. If you have any difficulty I can build it and mail it to you as I have all the parts at hand. Just let me know.

Sailor is correct; two general purpose NPN bipolar transistors (e.g. 2N3904) will perform the level shift you need. Just configure each as an inverter.

(You could also use a bipolar for the first stage and a MOSFET for the second stage. This configuration requires one less resistor. But you also run the risk of zapping the MOSFET, so it’s probably safer just to use two bipolars.)

If you really did want to go with an IC (though the transistor solution should be simplest), the best in this case would be a comparator. It works as Mandarax explained, ‘tripping’ to maximum high or low when there’s a very small difference in the inputs. Most come in single supply and work down to 5V or less, and they are usually configurable for hysteresis. ( Does the temperature probe have any, or is this a concern at all? )

To set it up, you’d need to create a reference voltage to trip at (resistor divider from +5V) and make sure there’s a pull-up resistor on the output to 5V (most comparator outputs are open-collector/drain).

God damn, sailor - that circuit did the trick! 1.5V produces 4.95V, no muss, no fuss. To think, I wasted all that time with relays and Op-Amps and mice running in exercise wheels attached to a 5V generator and a rectifier to make it DC…Jeese. :slight_smile:

Thank you once again - the circuit diagram you sent should save my ass.

Una

Always glad to be of service. Feel free to email me if you need anything further.