TGS2603 sensor unable function.

i been brought an tgs2603 sensor i following the data sheet of the sensor . i connection the AN2 to esp32 IO32 which was analog pin. 5V to the VCC and gnd to gnd of the esp32 board. During my coding

const int TELEGRAM_BUTTON_PIN =32;
int TELEGRAM_BUTTON_PINReading;

void setup() {
Serial.begin(115200);
// Initlaze the buttons
pinMode(TELEGRAM_BUTTON_PIN, INPUT);

}

void loop() {
  TELEGRAM_BUTTON_PINReading = analogRead(32);    // take a reading from the optical sensor pin
  Serial.println(TELEGRAM_BUTTON_PINReading);         // the analog reading of the optical sensor
  delay(5);                                     

}

the serial monitor keep printing 1623 value , by the way it should remaining 0. i have been testing this coding with other analog sensor it was working properly . Is i doing anything stupid ?

no one knows ?

Can you post a schematic? What value load resistor are you using?

BJHenry:
Can you post a schematic? What value load resistor are you using?

5 V the sensor name as 5 V so i connecting to 5 v pin of the esp 32

Hi,
A link to data/specs of the sensor please?

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom... :slight_smile:

BabyBoss101:
5 V the sensor name as 5 V so i connecting to 5 v pin of the esp 32

That doesn't really answer either of the points I asked you.

BabyBoss101:
5 V the sensor name as 5 V so i connecting to 5 v pin of the esp 32

ESP32 is 0 to 3.3V ADC.
Also look at the data sheet that shows it connections and how to get readings;
https://www.figaro.co.jp/en/product/docs/tgs2603_product_information_rev02.pdf
sensorpins.jpg

Tom… :slight_smile: