Hi, I am trying to use a 2 lead thermistror (not a temp/humidity sensor) with RPi 3B+. Is it possible to wire this without a breadboad?
I cannot find any instructibles or any rpi python code examples anywhere. What I did so far is connect the ground to one lead, vcc to the other lead using a Y union and put an inline 1-K ohm rewsitor to a third lead as signal [GPIO 23). Is there any code magic that can read the digital signal and convert it to tempature?
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.
Googling
raspberry pi using a thermistor to measure temperature
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.
Putting the midpoint into a comparator with a more precise threshold would help with accuracy over using GPIO1 directly. Using its reference voltage as GPIO0 divided exactly in half via a potential divider would make the system independent of I/O voltage variations.
IIRC Thermistors can be quite non-linear. Check the datasheet for the thermistor you are using. Over your specific temperature range it may be linear enough.
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:
formatting link
I2C interface ..
--
You can get much farther with a kind word and a gun than you can with a
kind word alone.
Al Capone
One wire? BULL! I quote the referenced pdf "... one data line (and ground)". And as a PRACTICAL point you need another wire to power the device. That makes it a *THREE* wire device.
You are probably not old enough/in te wrong country to have listened to the exploits of Larry the Lamb and Dennis the Dachsund in Toytown, on the radio.
There was a character called IIRC the Inventor who complained 'the trouble with this wireless is that it involves such a lot of WIRE!!!"
formatting link
--
Microsoft : the best reason to go to Linux that ever existed.
On a sunny day (Thu, 27 Feb 2020 09:08:45 -0400) it happened "Gregg Somes" wrote in :
First question is what do you want to measure if it is temperature below / above some point MAYBE, but thermistors are highly non-linear, so you want to either measure voltage across your resistor and then calculate the resistance / and then whatever that represents
AFAIK raspi has no analog input, so you need what is called an analog to digital converter (board?).
The GPIO as _digital_ input sees a 'logic zero' below some voltage and a 'logic one' above some voltage. Th exact voltage can vary, also depends on temperature and production spread, but is somewhere between 0 and 3.3 V
So UNLESS you want o measure a dead cold versus a red hot thermistor is not of much use.
An external ADC (analog to digital converter) also will need a stable external reference voltage I have done all sort of things with temperature sensors using Microchip PICs as ADC.. connected to serial port... but that needs some electronics and programming knowledge,
formatting link
Of course there are other ways, for the fun .. I wrote a program that converts a digital clock display read by a camera to time as text, you could use it to read a multimeter :-) Anyways to interface and ADC to GPIO takes some electronics knowledge and some programming knowledge, preferably C,
Of course there dies, Or rather an 12c interface board which is handier since you can mount it where you want to measure temps..
-- ?it should be clear by now to everyone that activist environmentalism (or environmental activism) is becoming a general ideology about humans, about their freedom, about the relationship between the individual and the state, and about the manipulation of people under the guise of a 'noble' idea. It is not an honest pursuit of 'sustainable development,' a matter of elementary environmental protection, or a search for rational mechanisms designed to achieve a healthy environment. Yet things do occur that make you shake your head and remind yourself that you live neither in Joseph Stalin?s Communist era, nor in the Orwellian utopia of 1984.?
They|some can be 'parasitically' powered from the data line's pull up ...
so one wire ... and a ground that is everywhere - ish :-)
Avpx
--
'You've got the loudest silences I ever did hear from anyone who wasn't
dead!'
(Lords and Ladies)
15:15:01 up 17 days, 19:05, 8 users, load average: 0.69, 0.84, 0.67
On Fri, 28 Feb 2020 11:39:05 GMT, Jan Panteltje declaimed the following:
Presuming common CMOS thresholds of 30 and 70%: 2.31V is HIGH. What the circuit does between those thresholds is indeterminate (I'd hope it holds the last valid state until the far threshold is crossed).
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/
No, it is perfectly possible to have the output between '0' and '1'. At hear all digital circuits are in fact analogue, just as all analogue circuits at the quantum level are in fact digital :-)
It does not.
--
"Anyone who believes that the laws of physics are mere social
conventions is invited to try transgressing those conventions from the
windows of my apartment. (I live on the twenty-first floor.) "
Alan Sokal
that is exactly what does NOT happen. the logic sate will flip at some in-determinant point between the two thresholds. The thresholds are simply points at which the state is guaranteed.
--
This restaurant was advertising breakfast any time. So I ordered
french toast in the renaissance.
-- Steven Wright, comedian
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.