Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
LinkBack Thread Tools Display Modes
Old 5th February 2005, 02:21 PM   (permalink)
Default OP-AMP Design help (High, Low output)

I am currently trying to make an alcohol breathalyser, i am going to use a pic as the delay on timer and also use the pic to display LEDs "drive" "dont drive". the problem is as follows

My sensor has a output of arround 2v in normal air (although i can alter this by varying the load resistor)

if you have no alcohol in your system the volage output from the sensor will drop, if you do have alcohol in your system the votage will rise.

I want to interface the op-amp to the PIC there for i need 0v = low and 5v = high inputs.

How do i make an op-amps output go to 5v when the sensor goes above 2v, and 0V when the sensor goes below 2V.

Could anyone help? if you could draw a quick schematic that would help alot

does this OP-AMP configuration have a special name i can research?

thanks for you help, its very much appreciated
lompa is offline  
Old 5th February 2005, 03:07 PM   (permalink)
Default

It's called a comparator - if you use a PIC16F628, that already has them internally!. Or you could use a 16F819, which has 10 bit A2D, and read the sensor directly.

Various other PIC's have similar facilities!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 6th February 2005, 02:50 AM   (permalink)
Default

im using pic basic what probably isnt good enough to do this, as i cannot find any info on comparators in the help files.

The aspect i find hard to understand is how i can make the op-amps output flick from 0v to 5V and vice versa with only small input changes?

Thanks

Nigel you should get a medal for your work on this forum, thanks
lompa is offline  
Old 6th February 2005, 10:38 AM   (permalink)
Default

Quote:
Originally Posted by lompa
im using pic basic what probably isnt good enough to do this, as i cannot find any info on comparators in the help files.
As I always say, you can't use a high level language effectively without a knowledge of assembler, which forces you to know the hardware you're using. if your PIC BASIC can use inline assembler, you may be able to do it like that - or perhaps even from BASIC itself, you would probably need to ask in a PIC BASIC group.

Quote:

The aspect i find hard to understand is how i can make the op-amps output flick from 0v to 5V and vice versa with only small input changes?
Have a look at http://www.uoguelph.ca/~antoon/gadgets/741/741.html for some good info on opamps, in particular look at figure 12, which uses a 741 as a comparator.

Basically, a comparator compares one input with another, the output can be either high or low, nothing else! - the high gain of the opamp guarantees this. It's also common practice to add a little positive feedback, something like a 10Mohm resistor from output to non-inverting input - this makes the output 'snap' much better.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 6th February 2005, 05:52 PM   (permalink)
Default

thanks much appreciated
lompa is offline  
Old 6th February 2005, 08:57 PM   (permalink)
Default

The output from your sensor is probably not stable, ie affected by humidity etc. It will be difficult to have a reference voltage to compare the output to, therefore an ADC would be the best way to go. You could store the reference number and compare to the test value easily.
__________________
see my website: www.geocities.com/russlk
Russlk is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 03:24 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker