Pages: 1 [2] 3   Go Down
Author Topic: Op-amps  (Read 3931 times)
0 Members and 1 Guest are viewing this topic.
Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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 

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

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33375
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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... smiley-yell

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

Go Figure ??????

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

Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Opps, I forgot to included the schematic.


* comparator.jpg (96.63 KB, 1000x1061 - viewed 18 times.)
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33375
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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.
Logged

UK
Offline Offline
Sr. Member
****
Karma: 4
Posts: 320
Arduino - very interesting !
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

are there any alternatives to using an op amp if you want to read a very small voltage on the arduino


Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33375
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No.
Logged

Melbourne, Australia
Offline Offline
Full Member
***
Karma: 0
Posts: 219
Have you tried turning it off and on again?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What voltages are you reading on the inputs?
Logged

UK
Offline Offline
Sr. Member
****
Karma: 4
Posts: 320
Arduino - very interesting !
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the device outputs 2.2mv/V at full load
excitation voltage 5 - 15 V
Logged

Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
the device outputs 2.2mv/V at full load
excitation voltage 5 - 15 V

???   a mV/V ???

excitation voltage ???
Logged

UK
Offline Offline
Sr. Member
****
Karma: 4
Posts: 320
Arduino - very interesting !
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33375
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

UK
Offline Offline
Sr. Member
****
Karma: 4
Posts: 320
Arduino - very interesting !
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ty

i will read up on it
Logged

Melbourne, Australia
Offline Offline
Full Member
***
Karma: 0
Posts: 219
Have you tried turning it off and on again?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: 1 [2] 3   Go Up
Jump to: