TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: THEO
from: THE NATURAL PHILOSOPHER
date: 2020-02-27 16:44:00
subject: Re: rPi 3 w/thermistor

On 27/02/2020 15:12, Theo wrote:
> Jim Jackson  wrote:
>> The setup you describe provides a variable analog voltage output. Non of
>> the raspberry pi have the capability to directly read an analog voltage,
>> you need an add-on Analog-to-Digital-Converter (ADC) either as a "hat",
>> breakout board, or chip in a breadboard.
>
> You don't need an ADC, you can do it via timing a capacitor.
>
> Wire up something like this:
>
> GPIO0 -=thermistor=-----+---||----- GND
>              R           |    C
>                        GPIO1
>
> Set GPIO0 low, wait a while.
> Now set GPIO0 high and start timing
> When GPIO1 goes from 0 to 1, stop the clock
>
> If you know the time, capacitance C, the GPIO output high voltage, and the
> low-to-high threshold voltage for GPIO inputs, you can solve the capacitor
> charging equation to find R.
>

Low to high threshold is probably more temperature dependent than the
thermistor!

A better bet is to construct an RC oscillator with the thermistor as
part of the R and measure frequency, but this is not a simple thing -
you need a fair few components

The best bet is to buy this:

https://thepihut.com/products/adafruit-mcp9808-high-accuracy-i2c-temperature-se
nsor-breakout-board

I2C interface ..


--
You can get much farther with a kind word and a gun than you can with a
kind word alone.

Al Capone

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.