LilyGO / TTGO-T-Beam

336 stars 111 forks source link

ADC1 Not Reading 2.3V - Different Results For 3.6V Between ADC Pins #56

Open BrugerX opened 1 year ago

BrugerX commented 1 year ago

I am trying to use the T-Beam to read a soil moisture sensor. I have used a voltage divider circuit with R1 being 10k and R2 being 20k. I get a reading from the output of the sensor of approx. 3.6V and approx. 2.4V from the output of the voltage divider. The readings were done using my Fluke 117 multimeter.

However, both pin 33 and pin 35 read 0 value using the Arduino analogRead with the 2.4V. Using the 3.6V directly I do get a result, however they're very different, with pin 33 reading approx. 1100 and pin 35 reading approx. 2800.

This is the code: ` void setup() { // put your setup code here, to run once: Serial.begin(9600);

pinMode(34,INPUT); }

void loop() { // put your main code here, to run repeatedly: Serial.println("strt"); Serial.println(analogRead(33)); Serial.println(analogRead(34)); Serial.println(analogRead(35)); Serial.println("Wai"); delay(1000); } `

And this is the diagram of my circuit:

image

Do you have any idea, why this is happening?