Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
BrugerX opened this issue Jul 11, 2023 · 0 comments
Open

Comments

@BrugerX
Copy link

BrugerX commented Jul 11, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant