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.

  • 505parts on the bench
  • 45boards running now
  • 1.00xreal time, on every board
Arduino Uno: an NTC thermometerlive0.000 s 0.00x
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.

How it works

Three steps from a blank tab to a running circuit.

  1. Open the editor

    It runs in your browser tab. Nothing to install, and you need no account to start.

    Your first project
  2. Wire it and write the code

    Drag parts onto a breadboard, run each wire from pin to pin, and write the sketch beside it.

    Wiring
  3. Press Run

    Your sketch compiles in the tab and runs on a model of the chip, with the Serial Monitor beside it.

    Run and serial
Reviews

What makers say about Mokxi.

“The AI checker helps check and correct my circuits, and it has way more components than Tinkercad. As a student I really appreciate the tool.”

ChloeEngineering student

“I’d been looking for a real online electronic simulator that was intuitive and complete when I found Mokxi. I was able to quickly import a Fritzing file and my Arduino sketch and start testing. Mokxi has all of the makings for the best online Arduino simulator I have been able to find!”

JayModel builderFeatured in his DioramaOS post

“I’m using Mokxi to develop and simulate an STM32-based four-wheel-drive robot car before building the actual hardware. It allows me to experiment with DC motor control, PWM, RPM measurement using photointerrupters, and different acceleration, braking, and reversing strategies, helping me understand and refine the system before implementing it in real life.”

NusretRobot car builder, Hamburg

Share your story

FAQ

Questions, answered.

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.

Read a thermistor

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