Go Down

### Topic: Op-amps (Read 7114 times)previous topic - next topic

#### Techone

#15
##### Aug 21, 2011, 01:50 am
@low5545

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

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

Quote
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.

#### Grumpy_Mike

#16
##### Aug 21, 2011, 05:04 am
Quote
Drain is OUTPUT signal.   [font=Verdana]NO  Source is +5 V. [/font]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.

Quote
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.

#### Techone

#17
##### Aug 21, 2011, 05:34 pm
Quote
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...

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...
And a LM339 <--- Working

Go Figure

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

#### Techone

#18
##### Aug 21, 2011, 05:37 pm
Opps, I forgot to included the schematic.

#### Grumpy_Mike

#19
##### Aug 21, 2011, 11:13 pm
Quote
I use a 741 <-- Not working...

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

Quote

a LM1458 <--- Not Working

Only specked at +/- 15V

Quote
TL072 <--- Not working

Only specked at +/- 15V

Quote
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.

#### Techone

#20
##### Aug 22, 2011, 04:50 am
@Grumpy_Mike

I agree with you, those op-amps needed a + side & - side to operated normaly. The only one worked is LM339. A + side and a GND. Worked fine to my discovery.  In theory, an op-amp could be use as a comparator, I guess some units need a dual voltage to operated normaly. ( Very PICKY op-amps )

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

I did projects with the 741, and work fine with a +9/-9 rail. Beside I did not see a minimum operating voltage on the datasheet from National Semiconductor. <-- The one I have. Even I use a +5/-5 rail by using a LF351 on my old "undone" robot Tech Project.

#21
##### Aug 22, 2011, 10:35 pm
are there any alternatives to using an op amp if you want to read a very small voltage on the arduino

#22
No.

#### InvalidApple

#23
##### Aug 23, 2011, 04:50 am
What voltages are you reading on the inputs?

#24
##### Aug 23, 2011, 11:58 am
the device outputs 2.2mv/V at full load
excitation voltage 5 - 15 V

#### Techone

#25
##### Aug 23, 2011, 04:58 pm
Quote
the device outputs 2.2mv/V at full load
excitation voltage 5 - 15 V

a mV/V

excitation voltage

#26
##### Aug 23, 2011, 07:56 pm
the excitation voltage is the voltage supplied to the sensor

the mv/V is rated agaisnt the excitatyion voltage

so at 5 V supply ouput is 2.2mv * 5 = 11mv
at 15v supply output is 2.2 mv * 15 = 33 mv

what sort of amplification is required to read those sorts of values accurately

do op amps come with a multiplication factor ?

#### Grumpy_Mike

#27
##### Aug 23, 2011, 08:08 pm
Quote
do op amps come with a multiplication factor ?

No the gain of an op amp is determined by the ratio of the resistors surrounding it.
So if you have 33mV and you want this to be full scale on an arduino you have to amplify it by
5 / 0.033 = 151
so take this gain and apply it to the resistors in an inverting or non inverting op amp configuration.

#28
##### Aug 23, 2011, 08:30 pm
ty

i will read up on it

#### InvalidApple

#29
##### Aug 24, 2011, 01:33 am
The reason that I asked what the voltages on the inputs are is because you need to see if the other components are behaving as expected.

Looking at your circuit, you are just making a comparator - What voltages are you getting on the negative and positive input

Go Up