Author Topic: Multiple sensors with NodeMCU ESP8266  (Read 1052 times)

0 Members and 1 Guest are viewing this topic.

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Multiple sensors with NodeMCU ESP8266
« on: June 25, 2018, 03:04:05 pm »
I 've built this example and works fine.
Now I want to have multiple sensors (I use NTC thermistors as sensors) and so I 've built this, but I must modify the software.

The difference between these 2 circuits is:
In the first example, the thermistor is the bottom resistor of the voltage divider.
In the second example, the thermistor is the top resistor of the voltage divider.

The part of the code that I have to modify is:

Code: [Select]
         float logR = log( 10000 * ( 1024 / readValue - 1 ));                 // Separate the calculation for simplicity and debugging
       
        celsiusTemperature = 1 / ( aConst + bConst * logR + cConst * pow(logR,3) ) - 273.15;   // Calculate the temperature in Celsius
        fahrenheitTemperature = celsiusTemperature * 9 / 5 + 32;

Any help is welcome.
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Multiple sensors with NodeMCU ESP8266
« Reply #1 on: June 28, 2018, 04:37:38 pm »
I found that ESP8266 's analog input senses from 0 to 1 Volt.
So if I have a voltage drop of 0.65Volts over the diode, then the reading from the ADC is very faulty!
Is my thought correct?

Question #2: the example (1st link) as I already said, works fine (I built it), even though the voltage divider outputs 0-3.3V (to ADC input). And the ADC can 'sense' voltage from 0-1V and not 0-3.3V...How is it possible to be working correctly? Shouldn't it malfunction?
« Last Edit: June 28, 2018, 08:13:22 pm by panoss »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf