I tried using this on my nodeMCU which only has 1 analog pin. i did all the connections etc....
Both thermistors sensors are 10k and they also have a 10k resistor between ground and probe, the 3.3v will be the digital pin assigned on/off with the MUX code for the reading, everything is prepared it just this code cant figure it out at all and seperate the readings.
i got it to read the probes, actually both sensors behind like one if i touch one temp raises up and it will display on the lcd the change and if i touch the other sensor it will do the same both sensors work but it will show in the same spot on the lcd.
Point is, i want to read MUX ABC independently but i dont know what im doing wrong
this is what i want as my define pins
#define W 14 // Water
#define P 12 // peltier
#define E 13 // E=Extra not used
this is the original code
#define MUX_A D4
#define MUX_B D3
#define MUX_C D2
#define ANALOG_INPUT A0
void setup() {
//Deifne output pins for Mux
pinMode(MUX_A, OUTPUT);
pinMode(MUX_B, OUTPUT);
pinMode(MUX_C, OUTPUT);
}
void changeMux(int c, int b, int a) {
digitalWrite(MUX_A, a);
digitalWrite(MUX_B, b);
digitalWrite(MUX_C, c);
}
void loop() {
float value;
changeMux(LOW, LOW, LOW);
value = analogRead(ANALOG_INPUT); //Value of the sensor connected Option 0 pin of Mux
changeMux(LOW, LOW, HIGH);
value = analogRead(ANALOG_INPUT); //Value of the sensor connected Option 1 pin of Mux
changeMux(LOW, HIGH, LOW);
value = analogRead(ANALOG_INPUT); //Value of the sensor connected Option 2 pin of Mux
changeMux(LOW, HIGH, HIGH);
value = analogRead(ANALOG_INPUT); //Value of the sensor connected Option 3 pin of Mux
changeMux(HIGH, LOW, LOW);
value = analogRead(ANALOG_INPUT); //Value of the sensor connected Option 4 pin of Mux
changeMux(HIGH, LOW, HIGH);
value = analogRead(ANALOG_INPUT); //Value of the sensor connected Option 5 pin of Mux
changeMux(HIGH, HIGH, LOW);
value = analogRead(ANALOG_INPUT); //Value of the sensor connected Option 6 pin of Mux
changeMux(HIGH, HIGH, HIGH);
value = analogRead(ANALOG_INPUT); //Value of the sensor connected Option 7 pin of Mux
}
i wanted this code to work with this formula
int ThermistorPin = 0; // i know this would be the first sensor the pin 14
int Vo;
float R1 = 10000;
float logR2, R2, T0, Tc, Tf;
float c1 = 1.009249522e-03, c2 = 2.378405444e-04, c3 = 2.019202697e-07;
void loop() {
Vo = analogRead(ThermistorPin);
R2 = R1 * (1024.0 / (float)Vo - 1.00);
logR2 = log(R2);
T0 = (1.0 / (c1 + c2logR2 + c3logR2logR2logR2));
Tc = T0 - 273.15;
Tf = (Tc * 9.0)/ 5.0 + 32.0;
what would i need to change, so i can have lets said T0/T1/T2 etc.. sensor reading