{"id":13802566,"url":"https://github.com/Trexation/micropython-generic-thermistor","last_synced_at":"2025-05-13T13:32:20.732Z","repository":{"id":220742381,"uuid":"752480202","full_name":"Trexation/micropython-generic-thermistor","owner":"Trexation","description":"Micropython Generic Thermistor Library is a basic software module designed to simplify temperature sensing using NTC thermistors within MicroPython-based projects. The library assumes a generic NTC thermistor on the ground side of a voltage divider.","archived":false,"fork":false,"pushed_at":"2024-02-04T02:07:47.000Z","size":41,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-18T18:45:59.276Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/Trexation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-02-04T00:42:50.000Z","updated_at":"2024-03-11T23:38:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"53f8a934-4513-4520-a8ce-a54713dbd951","html_url":"https://github.com/Trexation/micropython-generic-thermistor","commit_stats":null,"previous_names":["trexation/micropython-generic-thermistor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trexation%2Fmicropython-generic-thermistor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trexation%2Fmicropython-generic-thermistor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trexation%2Fmicropython-generic-thermistor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trexation%2Fmicropython-generic-thermistor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Trexation","download_url":"https://codeload.github.com/Trexation/micropython-generic-thermistor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253950228,"owners_count":21989323,"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","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-08-04T00:01:47.263Z","updated_at":"2025-05-13T13:32:20.471Z","avatar_url":"https://github.com/Trexation.png","language":"Python","readme":"# Micropython Generic Thermistor Library\n\nMicropython Generic Thermistor Library is a basic software module designed to simplify temperature sensing using NTC thermistors within MicroPython-based projects. The library assumes a generic NTC thermistor on the ground side of a voltage divider. It provides functions for converting raw analog sensor readings into temperature values, taking into account the non-linear nature of thermistors using the β parameter equation.\n\n## Features\n- Temperature output in Kelvin, Celsius, or Fahrenheit\n- Checks for thermistor shorts to VCC or GND\n- Checks for reasonable output values as specified in Constants\n- New thermistors only require one line of code!\n\n## Installation - Hardware\nFigure 1 demonstrates the expected wiring scheme. \nR1 and the thermistor cannot be swapped with this library; \nthe code assumes the thermistor is on the ground side of the voltage divider.\n\n![Figure 1 - Wiring Diagram](images/schematic.png)\n\nNotes:\n- The resistance of R1 should be similar to the nominal resistance of the thermistor\n- Thermistor nominal resistance and beta values can be found on the thermistor datasheet\n- Thermistor is assumed to be NTC\n\n## Installation - Software\n1. Have a Micropython environment set up on something; for example, an ESP32\n2. Upload the thermistor.py file onto the Micropython device; upload steps vary based on familiarity with the terminal, OS, and/or IDE. You can create a new file named thermistor.py on the embedded device and copy-paste the code into the file.\n3. Configure the object constructor \"Thermistor\" with your values. The below example uses pin 4 on an ESP32 with a 10k ohm NTC, beta=3435, thermistor, and 10k ohm voltage divider. Make sure you use your own values here!\n```python\ntherm = Thermistor(ADC(4, atten=ADC.ATTN_11DB), beta=3435, therm_ohm=10_000, divider_ohm=10_000)\n```\n4. See the example main.py file\n\n## Warnings\n- This code was only tested on a single ESP32, with a single version of Micropython. Your mileage may vary.\n- This code does not have thermal runaway protection; use heating devices at your own risk.\n\n\n\n","funding_links":[],"categories":["Libraries"],"sub_categories":["Sensors"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTrexation%2Fmicropython-generic-thermistor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTrexation%2Fmicropython-generic-thermistor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTrexation%2Fmicropython-generic-thermistor/lists"}