![]() | ![]() | ![]() |
| | |||||||
| 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? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| 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 | |
| |
| | (permalink) |
| 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!. | |
| |
| | (permalink) |
| 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 | |
| |
| | (permalink) | ||
| Quote:
Quote:
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. | |||
| |
| | (permalink) |
| thanks much appreciated | |
| |
| | (permalink) |
| 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 | |
| |