Source: https://mokxi.com/thermistor-simulator

Simulator

# A thermistor simulator: a 10k NTC on an Arduino

Mokxi is a free online thermistor simulator that runs in your browser, with nothing to install and no account needed. An NTC temperature sensor module, a 10k thermistor under a 10k resistor, on an Arduino Uno’s A0. The sketch turns the reading into degrees with the beta equation and prints both, twice a second. Drag the module’s slider to change the temperature.

Start building free or put it on a 16x2 LCD

- 455 parts on the bench
- 43 boards running now
- 1.00x real time, on every board

Click to open it in the editor

Drag the temperature slider on the module and watch the reading change, or click anything else to open it in the editor.

## What you can do here

In the circuit above, or in the editor it opens.

- Drag the temperature from -40 C to 125 C and read the result
- Watch the divider voltage on A0 fall as the thermistor warms
- Change the thermistor’s beta and see what a wrong constant costs
- Add an LCD, a fan on a relay or a buzzer alarm
- Swap in a TMP36, a DS18B20 or a DHT22 and compare
- Edit the Arduino code and press Run again

## What the running circuit shows

A divider that moves with temperature.

The module puts a 10k NTC thermistor under a 10k resistor across 5 V, with the joint on A0. At 25 C the two are equal, A0 sits at 2.50 V and analogRead gives 512. As the thermistor warms its resistance falls, so A0 falls too, and the sketch works backward from the reading to the thermistor’s resistance and then, with the beta equation and a beta of 3950, to a temperature.

In the engine the module starts at 24 C: A0 reads 523 and the serial monitor prints “reading 523, temperature 24.0 C”. At 0 C it prints “reading 788, temperature 0.0 C”, at 37 C “reading 383, temperature 37.0 C”, and at 50 C “reading 270, temperature 50.0 C”. At 100 C the reading is down to 67 and the sketch prints 99.8 C: one step of the ADC is now more than a degree, which is why an NTC under a 10k resistor is least precise when it is hottest.

## How the thermistor is modeled

The beta equation, both ways.

The thermistor’s resistance follows the beta model, R = R25 · e^(B(1/T − 1/298.15)), solved with the resistor and the analog input as one circuit. The sketch uses the same equation backward, so as long as its BETA matches the part’s, the temperature it prints is the one the slider is set to.

Change the part’s beta to 3435, a common value for other 10k thermistors, and leave the sketch at 3950: at 50 C the sketch now prints 46.4 C. That is the most common thermistor mistake, and the fix is the constant from the thermistor’s own datasheet. What it leaves out: self-heating from the current through the thermistor, and the time a real one takes to follow the temperature around it.

A 10k thermistor with Arduino and an LCD The TMP36 with Arduino The voltage divider simulator The DHT11 simulator

## Questions

Is it free?

Yes. The circuit on this page, every part in it and the editor it opens in are on the free plan, with no card.

Do I need an account?

No. The circuit runs the moment the page does, and the editor opens without one. A free account is only for saving a project to the cloud and sharing it by link.

What is a thermistor’s beta value?

A constant, in kelvin, that says how fast its resistance changes with temperature. 3950 and 3435 are common for 10k NTC parts. The sketch has to use the beta of the thermistor it is reading.

Why does the reading go down as it gets hotter?

An NTC thermistor’s resistance falls as it warms, and in this module it is the lower half of the divider, so the voltage on A0 falls with it.

Can I use a thermistor on an ESP32?

Yes. Put the module on an ADC pin and change 1023 to 4095 in the formula, since the ESP32’s ADC reads 12 bits. Power the divider from 3.3 V.

## More simulators

Each one opens on a circuit that is already running.

Online circuit simulator Breadboard simulator ESP32 simulator Op-amp simulator Logic gate simulator LED circuit simulator Servo simulator LCD simulator OLED simulator NeoPixel simulator 7 segment display simulator LED matrix simulator Stepper motor simulator Motor driver simulator Ultrasonic sensor simulator Rectifier simulator Digital circuit simulator Potentiometer simulator PWM simulator Relay simulator Shift register simulator DHT11 simulator RFID simulator Accelerometer simulator RGB LED simulator Buzzer simulator MOSFET simulator Circuit simulator for kids Flip-flop simulator Multiplexer simulator Full adder simulator I2C simulator UART simulator PIR sensor simulator Oscilloscope simulator Multimeter simulator DC motor simulator Traffic light simulator Diode simulator Capacitor simulator Series and parallel circuit simulator Wheatstone bridge simulator Voltage regulator simulator Soil moisture sensor simulator Zener diode simulator Solar panel simulator AC circuit simulator Thevenin simulator Decoder simulator Encoder simulator PID simulator Robot arm simulator Load cell simulator IR sensor simulator LM35 simulator HC-05 Bluetooth simulator nRF24L01 simulator

## Read a thermistor

Open the circuit, drag the slider and press Run. Nothing to install, and no account needed.

Start building free Open the editor
