{"id":20430118,"url":"https://github.com/scruss/micropython-simple-thermistor","last_synced_at":"2025-10-23T21:24:01.662Z","repository":{"id":260187744,"uuid":"880560054","full_name":"scruss/micropython-simple-thermistor","owner":"scruss","description":"read NTC thermistor temperature wired in a potential divider","archived":false,"fork":false,"pushed_at":"2024-10-30T22:41:20.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-16T04:55:13.448Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scruss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-30T00:06:09.000Z","updated_at":"2024-10-30T22:41:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"f5673baf-d894-4375-9487-9f9da719ebcb","html_url":"https://github.com/scruss/micropython-simple-thermistor","commit_stats":null,"previous_names":["scruss/micropython-simple-thermistor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/scruss/micropython-simple-thermistor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scruss%2Fmicropython-simple-thermistor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scruss%2Fmicropython-simple-thermistor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scruss%2Fmicropython-simple-thermistor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scruss%2Fmicropython-simple-thermistor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scruss","download_url":"https://codeload.github.com/scruss/micropython-simple-thermistor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scruss%2Fmicropython-simple-thermistor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271570041,"owners_count":24782539,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T08:01:27.373Z","updated_at":"2025-10-23T21:24:01.590Z","avatar_url":"https://github.com/scruss.png","language":"Python","funding_links":[],"categories":["Libraries"],"sub_categories":["Sensors"],"readme":"# micropython-simple-thermistor\nread NTC thermistor temperature wired in a potential divider\n\n## WILL NOT WORK WITH\n\n* ESP8266 (limited 1 V max ADC)\n* W600 (no ADC!)\n\n## WILL NOT IMPLEMENT\n\n* High-side thermistor\n* °F conversion\n\n## TODO\n\n* some docs would be nice\n* implement:\n    * Beta calculation from known second temperature and resistance (T₁, R₁): `β(T₀/T₁) = ln(R₁/R₀) / (1/T₁ - 1/T₀)`\n    * Steinhart-Hart three-term calculation\n* platform testing:\n    * rp2\n    * EPS32\n    * STM32/pyboard\n    * SAMD\n    * external ADC?\n* thermistor type testing\n    * MF52\n    * Adafruit [10K Precision Epoxy Thermistor - 3950 NTC](https://www.adafruit.com/product/372)\n    * 100 kΩ glass bead thermistor (aka 3d printer thermistor)\n    * Vishay NTCLE100E3\n\n## Sample Code\n\n```python3\n# MicroPython, Raspberry Pi Pico\n# pylint: disable=E0401\n# -*- coding: utf-8 -*-\n\nimport machine\nimport time\nfrom simple_thermistor import Thermistor\n\n\n# setup for KY-013-alike thermistor on GPIO 26\nt = Thermistor(\n    adc=machine.ADC(\n        26\n    ),  # ADC object with read_u16() method returning 0–65535\n    beta=3950,\n    r0=10000,  # thermistor nominal resistance of 10 kΩ at 25 °C\n    t0=Thermistor.fromC(25),  # everything is Kelvin internally\n    resistor=10000,  # high side resistor of 10 kΩ\n)\nwhile True:\n    print(\n        \"%6.1f °C / %.1f Ω\"\n        % (Thermistor.toC(t.temperature()), t.resistance())\n    )\n    time.sleep(5)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscruss%2Fmicropython-simple-thermistor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscruss%2Fmicropython-simple-thermistor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscruss%2Fmicropython-simple-thermistor/lists"}