Re: Multiple sensors on the ADC pin and overvoltage protecti
Posted: Thu Jan 12, 2017 1:41 pm
Hi
Thanks for your tips. Is 3.3V enough voltage at the gate for the 2N7002 ? I thought mosfets aren't very suitable for voltages around the 3V. As I remember I dont need any additional resistors to switch the mosfet, neither on the gate or the drain, is that correct ? I will try the 2n7002 with the 10k in parallel to the thermistors, just have to wait for the order I just placed at ali... (-:
I will also look the adc descriptions to get more infos about the adc input, thanks for that.
But how do I correct for the parallel 10k resistor in the software to get the correct reading ?
Before, the code to get the temp would look like this:
Rs would have to be 27000 (next value of E12) now, but how do I correct for the parallel 10k ??
thanks for your help
regards
Erich
Thanks for your tips. Is 3.3V enough voltage at the gate for the 2N7002 ? I thought mosfets aren't very suitable for voltages around the 3V. As I remember I dont need any additional resistors to switch the mosfet, neither on the gate or the drain, is that correct ? I will try the 2n7002 with the 10k in parallel to the thermistors, just have to wait for the order I just placed at ali... (-:
I will also look the adc descriptions to get more infos about the adc input, thanks for that.
But how do I correct for the parallel 10k resistor in the software to get the correct reading ?
Before, the code to get the temp would look like this:
Code: Select all
Rs = 64000; //64k resistor
Vcc = 3.3;
V_NTC = adc_val/1024;
R_NTC = (Rs * V_NTC) / (Vcc - V_NTC);
R_NTC = log(R_NTC);
Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * R_NTC * R_NTC ))* R_NTC );
Rs would have to be 27000 (next value of E12) now, but how do I correct for the parallel 10k ??
thanks for your help
regards
Erich