Op-amps

Will an op-amp amplifying a small signal with a 1K resistor connected to it damage the Arduino?

That depends on how large the signal was before amplification.

You're going to have to give us a bit more information before we can help. Can you post a circuit diagram, showing how you connect the 1k Ohm resistor to the op-amp and the Arduino? Can you tell us how the op-amp is powered?

Actually I don't really know how to connect one. Can you give me an example according to the LM324 op-amp with the picture attached? I'm using it with the Arduino.

Tell us what do you want to achieve with the OpAmp, because there are many ways to connect this devices. Are you trying to amplify a signal? use it as a comparator? A filter?

As far as i know (and this is not much, so please confirm!) an OpAmp will not be able to source more voltage than Vcc. So if you are working with 5V, it will not damage the arduino if you are taking the opamps output as input to the arduino.

This is why I asked about the power to the op-amp. Some op-amps require positive and negative (i.e. below Ground) supply voltages, and hence have the potential (pardon the pun) to damage an Arduino's analog input pin. I think the 324 is OK with just Ground and 5V, so yes, that would make it safe.

low5545, can you say more about what exactly you want to do with the opamp?

I want to amplify a small signal made from a Double elements Pyroelectric Infrared Sensor like on http://www.escol.com.my/Datasheets_specs/RE200B.pdf and make it as an output on the Arduino. I may also add an analog comparator to make it easier to detect the signal. Can I use LM324 to amplify the small signal and use a LM339 analog comparator to make a 5V output to the Arduino input?
Any problems? I can't connect the output of the PIR element sensor to the Arduino immediately because it is too small to detect the voltage difference.


Can anyone give me an example to amplify a signal with Input 1 in the LM324 internal circuit above? Do I need to connect the VCC and Ground to 5V and GND on the Arduino?

What kind of input are you expecting: analog or digital?

Try this:

  • Drain to +5 V
  • Source to pin 2 of the LM324
  • pin 3 to GND
  • Pin 4 to 5V

That should get you a digital signal that you can input in the arduino.
Anyway, this is a very primitive cricuit.

Try this:
Drain to +5 V
Source to pin 2 of the LM324
pin 3 to GND
Pin 4 to 5V

pin 3? pin 4? pin 2 of the LM324, which one + or -? Which is which?

pin 3? pin 4? pin 2 of the LM324, which one + or -? Which is which?

Sorry, I was talking pins of the LM324 based on the image you posted.
Drain and source of your sensor.
I don't have anything at hand to draw it.

Then you have to attach pin 1 of the LM324 to an Input pin of your arduino.

Hope this helps.

Try this:
Drain to +5 V
Source to pin 2 of the LM324
pin 3 to GND
Pin 4 to 5V

I thought that:

  • Drain connects to pin 3 (+ input 1)
  • Source connects to 5V of the Arduino
  • Ground to pin 2 (-input 1)


Actually what does the + of the input and - of the input connects to? How to actually amplify a circuit? Do I need to connect pin 4 and 11 (V+ and GND) of the PIR to 5V and GND of the Arduino?

http://www.escol.com.my/Datasheets_specs/RE200B.pdf
Is the Drain of the PIR the OUTPUT of it, Source would be the voltage supply (5V), Ground would be the Ground.

what does the + of the input and - of the input connects to?

You use resistors to set the gain:-

Diagram taken from:-

You need a pull up resistor on the output before you connect it to the amplifier.
So source to ground through a 100K. Drain to 100K to +5V, and then into the input of the amplifier. That way you should bias the signal at the 2.5V level and allow you to see any changes.

What is the difference between an inverting and an non- inverting amplifier?

I thought that a resistor is internally connected in the PIR according to http://www.escol.com.my/Datasheets_specs/RE200B.pdf

inverting and an non- inverting amplifier

One inverts the signal and the other doesn't.
So in an inverting amplifier if the signal goes high the output goes low. It actually doesn't matter at all because you will be interpreting the output with software. Inverting amplifiers are easier to calculate the gain and to make. Note that the ground symbol referrers to a signal ground not the power ground. You make a signal ground at 2.5V by using two 1K resistors in a potential divider.

@low5545

When using an op-amp, inverting amplifier is this formula : Vout = - ( Rf / Ri ) * Vin
For non-inverting amplifier : Vout = ( 1+( Rf / Ri ) ) * Vin

Here a site to help you understand op-amps. http://www.play-hookey.com/analog/

Op-Amp operated at dual voltage : + side / gnd / - side ex: +5 . gnd . - 5

Bear in mind that the Arduino don't "like" negative at an analog pin, it will damage the ATmega chip

Is the Drain of the PIR the OUTPUT of it, Source would be the voltage supply (5V), Ground would be the Ground.

YES . GND is GND. Drain is OUTPUT signal. NO Source is +5 V. A resistor between Source & GND. A resistor between +5 V and Drain.

Look under JFET transistor use as an amplifier. http://www.electronics-tutorials.ws/amplifier/amp_3.html You will know why.

If you have access to an osciloscope, to see what signal come out of the sensor, than the need to design a circuit to convert the signal into a TTL signal, if it is needed.

This is base on the datasheet of the sensor.

Drain is OUTPUT signal. NO Source is +5 V. A resistor between Source & GND. A resistor between +5 V and Drain.

@Techone
This is wrong, the only time a source is connected to +5V is when you are dealing with a P-channel FET.

Op-Amp operated at dual voltage : + side / gnd / - side ex: +5 . gnd . - 5

Yes but you can also drive them off a single ended supply like the 0 to +5V you get with an arduino. To do this you must generate a signal ground for the op-amp, this is done with a potential divider to generate a point that is 2.5V above the arduino ground. This ensures that the output of the op-amp is not going to damage the arduino. The LM324 is capable of operating like this with as little as 3V between the + and -, here we have 5V. Not all op-amps can work with this low a voltage. However the output can only get to within 1.5V of the power rail so the swing will be limited with only 5V. You can get other op-amps that are "rail to rail" but these are more expensive.

Drain is OUTPUT signal. A resistor between Source & GND. A resistor between +5 V and Drain

@Grumpy_Mike

That what I mean. I know you do not connect +5 V at a Source, but the OP did. I am sorry you mis-understood me.

Since the tread is about op-amp, I try to build a comparator circuit using op-amp. and NOT WORKING... :stuck_out_tongue_closed_eyes:

Here a schematic. The pot is 50 K value set @ 2.5 V, the phototransistor is a TIL 99. Technicaly, IT SHOULD WORK.
But NOOOO . It ONLY work using an LM339. I use a 741 <-- Not working...a LM1458 <--- Not Working TL072 <--- Not working
LM324 <--- Not Working... :stuck_out_tongue_closed_eyes:
And a LM339 <--- Working :open_mouth:

Go Figure ??????

My raison for a comparator with an phototransistor, the responce is quicker, and can be convert into a TTL easy.

Opps, I forgot to included the schematic.

I use a 741 <-- Not working...

These will only work with a minimum of +/- 12V rail, did you have this?

a LM1458 <--- Not Working

Only specked at +/- 15V

TL072 <--- Not working

Only specked at +/- 15V

LM324 <--- Not Working...

Don't know but your circuit is poor in that it references everything to the -Ve rail instead of a signal ground.