Toronto, Canada
Offline
Edison Member
Karma: 2
Posts: 1233
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
|
 |
« Reply #15 on: August 20, 2011, 06:50:22 pm » |
@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.
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25497
Solder is electric glue
|
 |
« Reply #16 on: August 20, 2011, 10:04:56 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Toronto, Canada
Offline
Edison Member
Karma: 2
Posts: 1233
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
|
 |
« Reply #17 on: August 21, 2011, 10:34:50 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Toronto, Canada
Offline
Edison Member
Karma: 2
Posts: 1233
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
|
 |
« Reply #18 on: August 21, 2011, 10:37:13 am » |
Opps, I forgot to included the schematic.
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25497
Solder is electric glue
|
 |
« Reply #19 on: August 21, 2011, 04:13:34 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Toronto, Canada
Offline
Edison Member
Karma: 2
Posts: 1233
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
|
 |
« Reply #20 on: August 21, 2011, 09:50:26 pm » |
@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 ) 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
Sr. Member
Karma: 0
Posts: 267
Arduino - very interesting !
|
 |
« Reply #21 on: August 22, 2011, 03:35:24 pm » |
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
Brattain Member
Karma: 277
Posts: 25497
Solder is electric glue
|
 |
« Reply #22 on: August 22, 2011, 04:47:05 pm » |
No.
|
|
|
|
|
Logged
|
|
|
|
|
Melbourne, Australia
Offline
Full Member
Karma: 0
Posts: 219
Have you tried turning it off and on again?
|
 |
« Reply #23 on: August 22, 2011, 09:50:50 pm » |
What voltages are you reading on the inputs?
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Sr. Member
Karma: 0
Posts: 267
Arduino - very interesting !
|
 |
« Reply #24 on: August 23, 2011, 04:58:49 am » |
the device outputs 2.2mv/V at full load excitation voltage 5 - 15 V
|
|
|
|
|
Logged
|
|
|
|
|
Toronto, Canada
Offline
Edison Member
Karma: 2
Posts: 1233
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
|
 |
« Reply #25 on: August 23, 2011, 09:58:15 am » |
the device outputs 2.2mv/V at full load excitation voltage 5 - 15 V ??? a mV/V ??? excitation voltage ???
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Sr. Member
Karma: 0
Posts: 267
Arduino - very interesting !
|
 |
« Reply #26 on: August 23, 2011, 12:56:13 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 ?
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25497
Solder is electric glue
|
 |
« Reply #27 on: August 23, 2011, 01:08:03 pm » |
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
Sr. Member
Karma: 0
Posts: 267
Arduino - very interesting !
|
 |
« Reply #28 on: August 23, 2011, 01:30:22 pm » |
ty
i will read up on it
|
|
|
|
|
Logged
|
|
|
|
|
Melbourne, Australia
Offline
Full Member
Karma: 0
Posts: 219
Have you tried turning it off and on again?
|
 |
« Reply #29 on: August 23, 2011, 06:33:57 pm » |
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
|
|
|
|
|
|