I accidentally stumble upon this oxygen analyser video, though I throughouly enjoy it, it's seems like you are in beginning of your career as electronic engineer and myself as electronic engineer, I would like to share my 2 cents knowledge and some constructive criticism. 1. I strongly not recommend using external ADC, because all ADC is limited by stability of input reference voltage. More stable you reference voltage, higher stability of ADC reading. Since Arduino uses linear regulator( high Frequency noise can easily passed through it) its major culprit of not getting stable one reading( I m sure you might observed some fluctuations in adc while making this circuit). 2. I will strongly advise you to use Arduino internal reference ADC which is 1.1v( as it is more stable form). As far as sensor is concern most electrochemical sensor like oxygen ( which you are using) tend to give out reading between 9-13 mV in naked air. You just need to use op-amp to amplify this, I will suggest "Low Pass Filter Sallen Key ", as this will not only amplify the signal but even reduce the noise generated by sensor too. You can use DSP(digital Signals Processing)running exponentially FIR filter to further smooth out the signal. 3. Last but not least, always remember Ideal Gas Equation i.e PV= nRT, which state that Pressure is directly proportional to N( number of moles),if you applied pressure more than 1 atm,your sensor will give higher reading. So make sure that pressure is 1 atm to get best reading( can use flow meter). If follow this, maybe you can sell this to industry and manufacture as commerical product. Normal benchtop O2 analyser retail for 15-30k in India
HI Kaustav!...I find your explanation appealing even though I am not an engineer. Could you share some resources where I can read about these issues as a novice and also where I can buy "Low Pass Filter Sallen Key" for using it the way you suggested? Thanks a lot for putting in your invaluable insights here. I commented particularly because I am getting very unstable readings from this ADA as you have also pointed out. Sometimes I am just not sure what the actual reading is!
These sensors works on Volume based, if you apply more number of moles of o2 and simulatenously other gas molecules also since result no change in the result. I tested this pratically, for various pressure range
For connections please follow below: The OOM202 sensor had three pins, of which the ground pin (white wire) and analog output (blue wire ) are used centre pin is not used.. The analog output is connected to A0 terminal of the ADS (ADS1115) whereas the white cable is connected to GND port of the Arduino UNO target board. The ADS1115 has two outputs, the SCL and SDA pins which connect to the corresponding SCL and SDA pins on the Arduino UNO target. The ADS1115 takes a 5 V power input and a ground connection, both of which are drawn from the UNO target. This completes the circuit.
This ckt and the same sensor after using using connection as shown in your video gives negative values for AIN0 : I have following in the output 16:59:46.070 -> AIN0: -336 ????? 16:59:46.070 -> 0 V ????? 16:59:46.070 -> ADC0*0.2625 : 84 Calculated using absolute value of AIN0 16:59:46.105 -> Inside OxyConc() :23.52 Calculated using multiplier values in comments in this video. I have used the code which gives this result as follows: #include #include Adafruit_ADS1115 ads; /* Use this for the 16-bit version */ int16_t adc0; // Declaration of Global Variable void setup() { Serial.begin(9600); ads.setGain(GAIN_TWOTHIRDS); ads.begin(); void loop() { //SINGLE ENDED------------------------------------------------------------------- int16_t adc0 = ads.readADC_SingleEnded(0); int16_t volts0 = ads.computeVolts(adc0); Serial.println("-----------------------------------------------------------"); Serial.print("AIN0: "); Serial.print(adc0); Serial.println(" "); Serial.print(volts0); Serial.println(" V"); Serial.print(OxyConc()); Serial.println(" %"); } float OxyConc() { int16_t x = abs(ads.readADC_SingleEnded(0))*0.2625; // This is being done Since AIN0 values comes negative Serial.print("ADC0*0.2625 : ");Serial.println(x); // 0.2625 is multiplied as was mentioned in the comment here in youtube if (x < 73){ Serial.print("Oxygen lower than 20%"); }else if (x > 73){ float O2percent = x*0.28; // 0.28 is multipied as was mentioned in the comment here in youtube. Serial.print("Inside OxyConc() :"); Serial.println(O2percent); return O2percent; }
i am using this sensor,but its reading change as soon as pressure increases or descreses. and one thing i also done that i have check sensor by giving normal air from compressor using flow gauge set to 8 psi,at that time also sensor showing values. why this is happening?
Have you considered the need for re-calibrating the o2 sensor on a regular basis, as these sensors change / grow old over time and often require recalibration to a known source/percentage of oxygen (ie: 0, 21, 100)...
I guess this sensor works like a resistor that changes value with % of Oxygen content in the air. So you drive power through it; and expect certain resistances or sensor reading voltage based on how much oxygen it is sensing at the moment.
probably not as the arduino will not be able to detect the output from the sensor as the sensor values are so low and even if it does you wont get the accuracy required.
I accidentally stumble upon this oxygen analyser video, though I throughouly enjoy it, it's seems like you are in beginning of your career as electronic engineer and myself as electronic engineer, I would like to share my 2 cents knowledge and some constructive criticism.
1. I strongly not recommend using external ADC, because all ADC is limited by stability of input reference voltage. More stable you reference voltage, higher stability of ADC reading. Since Arduino uses linear regulator( high Frequency noise can easily passed through it) its major culprit of not getting stable one reading( I m sure you might observed some fluctuations in adc while making this circuit).
2. I will strongly advise you to use Arduino internal reference ADC which is 1.1v( as it is more stable form). As far as sensor is concern most electrochemical sensor like oxygen ( which you are using) tend to give out reading between 9-13 mV in naked air. You just need to use op-amp to amplify this, I will suggest "Low Pass Filter Sallen Key ", as this will not only amplify the signal but even reduce the noise generated by sensor too. You can use DSP(digital Signals Processing)running exponentially FIR filter to further smooth out the signal.
3. Last but not least, always remember Ideal Gas Equation i.e PV= nRT, which state that Pressure is directly proportional to N( number of moles),if you applied pressure more than 1 atm,your sensor will give higher reading. So make sure that pressure is 1 atm to get best reading( can use flow meter).
If follow this, maybe you can sell this to industry and manufacture as commerical product. Normal benchtop O2 analyser retail for 15-30k in India
HI Kaustav!...I find your explanation appealing even though I am not an engineer. Could you share some resources where I can read about these issues as a novice and also where I can buy "Low Pass Filter Sallen Key" for using it the way you suggested? Thanks a lot for putting in your invaluable insights here. I commented particularly because I am getting very unstable readings from this ADA as you have also pointed out. Sometimes I am just not sure what the actual reading is!
These sensors works on Volume based, if you apply more number of moles of o2 and simulatenously other gas molecules also since result no change in the result. I tested this pratically, for various pressure range
For connections please follow below:
The OOM202 sensor had three pins, of which the ground pin (white wire) and analog output (blue wire ) are used centre pin is not used.. The analog output is connected to A0 terminal of the ADS (ADS1115) whereas the white cable is connected to GND port of the Arduino UNO target board. The ADS1115 has two outputs, the SCL and SDA pins which connect to the corresponding SCL and SDA pins on the Arduino UNO target. The ADS1115 takes a 5 V power input and a ground connection, both of which are drawn from the UNO target. This completes the circuit.
Good topics sir
Very nice video and content too
Dear Manas Sir, can we use A09 sensor instead of current sensor
sir i am basic learner , Very useful sir, AO-o8 oxygen sensor How I connect sir , 3.5mm jack only there . How I connect give me a suggestion
Sir , can you please provide the arduino code...? 🙏
[code]
#include
Adafruit_ADS1115 ads;
void setup(void)
{
Serial.begin(9600);
ads.begin();
}
void loop(void)
{
int16_t adc0, adc1, adc2, adc3;
adc0 = ads.readADC_SingleEnded(0);
adc1 = ads.readADC_SingleEnded(1);
adc2 = ads.readADC_SingleEnded(2);
adc3 = ads.readADC_SingleEnded(3);
Serial.print("AIN0: ");
Serial.print(adc0);
Serial.print("\t");
Serial.print(adc0*0.2625);
Serial.println("%");
delay(1000);
}
[/code]
@@lavimittal86 sir , can you provide your email address, we need your help 🙏
@@amalkumar3430 sure, its lavi.mittal86@gmail.com
@@lavimittal86 what is the use of AIN1, AIN2 &AIN3?
This ckt and the same sensor after using using connection as shown in your video gives negative values for AIN0 :
I have following in the output
16:59:46.070 -> AIN0: -336 ?????
16:59:46.070 -> 0 V ?????
16:59:46.070 -> ADC0*0.2625 : 84 Calculated using absolute value of AIN0
16:59:46.105 -> Inside OxyConc() :23.52 Calculated using multiplier values in comments in this video.
I have used the code which gives this result as follows:
#include
#include
Adafruit_ADS1115 ads; /* Use this for the 16-bit version */
int16_t adc0; // Declaration of Global Variable
void setup() {
Serial.begin(9600);
ads.setGain(GAIN_TWOTHIRDS);
ads.begin();
void loop() {
//SINGLE ENDED-------------------------------------------------------------------
int16_t adc0 = ads.readADC_SingleEnded(0);
int16_t volts0 = ads.computeVolts(adc0);
Serial.println("-----------------------------------------------------------");
Serial.print("AIN0: "); Serial.print(adc0); Serial.println(" "); Serial.print(volts0); Serial.println(" V");
Serial.print(OxyConc()); Serial.println(" %");
}
float OxyConc() {
int16_t x = abs(ads.readADC_SingleEnded(0))*0.2625; // This is being done Since AIN0 values comes negative
Serial.print("ADC0*0.2625 : ");Serial.println(x); // 0.2625 is multiplied as was mentioned in the comment here in youtube
if (x < 73){
Serial.print("Oxygen lower than 20%");
}else if (x > 73){
float O2percent = x*0.28; // 0.28 is multipied as was mentioned in the comment here in youtube.
Serial.print("Inside OxyConc() :"); Serial.println(O2percent);
return O2percent;
}
pls share wiring diagram there is some confusion .
if you connect AREF to the ADC Board then why are you connect 5v
Which is the lower % of O2 can be read with this sensor? There is a data sheet of this sensor model?
Sir, plz share the UNO code
[code]
#include
Adafruit_ADS1115 ads;
void setup(void)
{
Serial.begin(9600);
ads.begin();
}
void loop(void)
{
int16_t adc0, adc1, adc2, adc3;
adc0 = ads.readADC_SingleEnded(0);
adc1 = ads.readADC_SingleEnded(1);
adc2 = ads.readADC_SingleEnded(2);
adc3 = ads.readADC_SingleEnded(3);
Serial.print("AIN0: ");
Serial.print(adc0);
Serial.print("\t");
Serial.print(adc0*0.2625);
Serial.println("%");
delay(1000);
}
[/code]
i am using this sensor,but its reading change as soon as pressure increases or descreses.
and one thing i also done that i have check sensor by giving normal air from compressor using flow gauge set to 8 psi,at that time also sensor showing values.
why this is happening?
Have you made code for 21 percent and 100 percentage code for o2 calibration
Can you please share the code ??
Oxygen sensor rate?
Can you please share the code
[code]
#include
Adafruit_ADS1115 ads;
void setup(void)
{
Serial.begin(9600);
ads.begin();
}
void loop(void)
{
int16_t adc0, adc1, adc2, adc3;
adc0 = ads.readADC_SingleEnded(0);
adc1 = ads.readADC_SingleEnded(1);
adc2 = ads.readADC_SingleEnded(2);
adc3 = ads.readADC_SingleEnded(3);
Serial.print("AIN0: ");
Serial.print(adc0);
Serial.print("\t");
Serial.print(adc0*0.2625);
Serial.println("%");
delay(1000);
}
[/code]
Have you considered the need for re-calibrating the o2 sensor on a regular basis, as these sensors change / grow old over time and often require recalibration to a known source/percentage of oxygen (ie: 0, 21, 100)...
Yes, Recalibration req . It's better to do it in every 6 months
@@Carrertalk how is recalibration conducted for this sensor? Any idea
Oky😶👍
can you post the interfacing code and ckt diagram of it
Bro did you get the code?
@@EEESharulKunkolkar Its very Simple bro..., just use the adafruit library you can make it,
@@dipanjanbanerjee1574 Bro if possible please post the code explained in video
[code]
#include
Adafruit_ADS1115 ads;
void setup(void)
{
Serial.begin(9600);
ads.begin();
}
void loop(void)
{
int16_t adc0, adc1, adc2, adc3;
adc0 = ads.readADC_SingleEnded(0);
adc1 = ads.readADC_SingleEnded(1);
adc2 = ads.readADC_SingleEnded(2);
adc3 = ads.readADC_SingleEnded(3);
Serial.print("AIN0: ");
Serial.print(adc0);
Serial.print("\t");
Serial.print(adc0*0.2625);
Serial.println("%");
delay(1000);
}
[/code]
Link for all the details: learn.adafruit.com/adafruit-4-channel-adc-breakouts/overview
hello manas ,
could you explain the formula you used in the program ?
and tell me about the value 73 ,how it can be changed in to the oxygen % level ?
Multiply it by .28
@@sudhanshusharma8674 👍
Перевод на русский
can you please explain why we have to multiply with 0.2625 with the adc data Serial.print(adc0*0.2625);
To convert the value into percentage
Kindly please provide the program
[code]
#include
Adafruit_ADS1115 ads;
void setup(void)
{
Serial.begin(9600);
ads.begin();
}
void loop(void)
{
int16_t adc0, adc1, adc2, adc3;
adc0 = ads.readADC_SingleEnded(0);
adc1 = ads.readADC_SingleEnded(1);
adc2 = ads.readADC_SingleEnded(2);
adc3 = ads.readADC_SingleEnded(3);
Serial.print("AIN0: ");
Serial.print(adc0);
Serial.print("\t");
Serial.print(adc0*0.2625);
Serial.println("%");
delay(1000);
}
[/code]
Why only GND and signal connected to the sensor?.. isn't the VCC missing?
It generate electrical signal from reaction with air O2 so it not need vcc
Can u provide the code for lcd interface with arduino
8754123424
WhatsApp man
why you have not connected power (vcc) connection to sensor?
sensor must need some i/p voltage to work?
There are two types of sensor. one is active, other one passive. Active sensor do not need any power. Oxygen sensor is active sensor
@@Carrertalk ok, please tell me pin outs of sensor as its not mentioned in datasheet also
@@Carrertalk where is Arduino code ? and ADS1115 with UNO R3 interface is hardwired or I2C ?
I guess this sensor works like a resistor that changes value with % of Oxygen content in the air. So you drive power through it; and expect certain resistances or sensor reading voltage based on how much oxygen it is sensing at the moment.
Hii
Can we use this without using ADC 1115??
probably not as the arduino will not be able to detect the output from the sensor as the sensor values are so low and even if it does you wont get the accuracy required.
sir what is the code of the program
[code]
#include
Adafruit_ADS1115 ads;
void setup(void)
{
Serial.begin(9600);
ads.begin();
}
void loop(void)
{
int16_t adc0, adc1, adc2, adc3;
adc0 = ads.readADC_SingleEnded(0);
adc1 = ads.readADC_SingleEnded(1);
adc2 = ads.readADC_SingleEnded(2);
adc3 = ads.readADC_SingleEnded(3);
Serial.print("AIN0: ");
Serial.print(adc0);
Serial.print("\t");
Serial.print(adc0*0.2625);
Serial.println("%");
delay(1000);
}
[/code]
Sir please can you give the program
[code]
#include
Adafruit_ADS1115 ads;
void setup(void)
{
Serial.begin(9600);
ads.begin();
}
void loop(void)
{
int16_t adc0, adc1, adc2, adc3;
adc0 = ads.readADC_SingleEnded(0);
adc1 = ads.readADC_SingleEnded(1);
adc2 = ads.readADC_SingleEnded(2);
adc3 = ads.readADC_SingleEnded(3);
Serial.print("AIN0: ");
Serial.print(adc0);
Serial.print("\t");
Serial.print(adc0*0.2625);
Serial.println("%");
delay(1000);
}
[/code]
Any Recommended website for Oxygen Sensor?
Amazon
Where is the program?
[code]
#include
Adafruit_ADS1115 ads;
void setup(void)
{
Serial.begin(9600);
ads.begin();
}
void loop(void)
{
int16_t adc0, adc1, adc2, adc3;
adc0 = ads.readADC_SingleEnded(0);
adc1 = ads.readADC_SingleEnded(1);
adc2 = ads.readADC_SingleEnded(2);
adc3 = ads.readADC_SingleEnded(3);
Serial.print("AIN0: ");
Serial.print(adc0);
Serial.print("\t");
Serial.print(adc0*0.2625);
Serial.println("%");
delay(1000);
}
[/code]
Please provide library file for sensor
Go to Tools>Manage library>search for Adafruit_ADC>install latest version
sir can you please give me the code
Will arduino nano work
Yes
I need product
Sensors prise
can you provide me the source code ?
Hello Manas,
I want to pair this sensor with ESP32 in my project. Please provide your contact details.
Programing code not found
WhatsApp 8754123424
Plz share the code, or copy paste in the chat box
[code]
#include
Adafruit_ADS1115 ads;
void setup(void)
{
Serial.begin(9600);
ads.begin();
}
void loop(void)
{
int16_t adc0, adc1, adc2, adc3;
adc0 = ads.readADC_SingleEnded(0);
adc1 = ads.readADC_SingleEnded(1);
adc2 = ads.readADC_SingleEnded(2);
adc3 = ads.readADC_SingleEnded(3);
Serial.print("AIN0: ");
Serial.print(adc0);
Serial.print("\t");
Serial.print(adc0*0.2625);
Serial.println("%");
delay(1000);
}
[/code]
দাদা আপনার ফোন নম্বরটা দিলে আমি আপনার কাছে শিখতে চাই।
Please post code
[code]
#include
Adafruit_ADS1115 ads;
void setup(void)
{
Serial.begin(9600);
ads.begin();
}
void loop(void)
{
int16_t adc0, adc1, adc2, adc3;
adc0 = ads.readADC_SingleEnded(0);
adc1 = ads.readADC_SingleEnded(1);
adc2 = ads.readADC_SingleEnded(2);
adc3 = ads.readADC_SingleEnded(3);
Serial.print("AIN0: ");
Serial.print(adc0);
Serial.print("\t");
Serial.print(adc0*0.2625);
Serial.println("%");
delay(1000);
}
[/code]
github.com/karantarade/OxygenAnalyserOOM202