Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


outdoorsnz

674 posts

Ultimate Geek


#289008 6-Aug-2021 11:34
Send private message

I've recently been experimenting with a jaycar XC-4520 temperature and humidity sensor. This was pretty easy to connect and have the pi outputting temp and time to a 8 / 7 segment lcd display.

 

This is a good guide for the XC-4520 / DHT-11 sensor setup guide.

 

https://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging/python-setup

 

And plan to add data logging with something like this. Seems a pretty good solution that doesn't use a 3rd party cloud server:

 

https://www.circuits.dk/temperature-logger-running-on-raspberry-pi/

 

The DHT-11 is only suitable for indoors. Plan to use the jarcar XC-3700 / DS18B20 temp circuit for outdoors.

 

BUT from my bits of brewing equipment I have a spare temperature probe. This has two wires, red and white. And includes quite a bit of cable, enough to jam through a window crack or something. Was purchased to connect to a brewing temp relay controller.

 

Does anyone know what type of temperature probe this would be (is sealed inside a metal probe) and how would I wire this to the raspberry pi? Assuming from what I've read needs a 4.7k or 10k resister.


Create new topic
tim0001
261 posts

Ultimate Geek


  #2756159 6-Aug-2021 13:39
Send private message

The probe might be a thermistor.  how to test a thermistor

 

You'd need an ADC to read the temp from a thermister.  An arduino would do.

 

 


 
 
 

Free kids accounts - trade shares and funds (NZ, US) with Sharesies (affiliate link).
gbwelly
1238 posts

Uber Geek


  #2756206 6-Aug-2021 15:19
Send private message

Be interested to know how accurate this method is in the real world:

 

https://www.mechatronicslab.net/raspberry-pi-analog-input/#Measure_temperature_using_a_thermistor

 

 








frankv
5678 posts

Uber Geek

Lifetime subscriber

  #2756209 6-Aug-2021 15:25
Send private message

I agree it's probably a thermistor. But you need to know what kind of thermistor it is. Some increase in resistance with increasing temperature, others decrease. They also vary in how many ohms/degree. If you don't have that information, you can calibrate it by measuring resistance at known temperatures (e.g. 0C and 100C). You'll need another resistor or two to make a simple circuit to convert ohms into volts.

 

One of the unfortunate things about the Raspberry Pi is that an ADC isn't built-in. :( There are various ADC HATs available, depending on what you want and how much money you have. e.g. https://www.tindie.com/products/cburgess129/12-bit8-channel-adc-hat-for-raspberry-pi/ A HAT plugs directly onto the RPi connector. Most ADC HATs come with a SPI or IIC (also known as I2C) interface. Or you can buy an Arduino ADC (make sure you get a 3.3V one with SPI interface) and run some wires from the RPi connector to the ADC board. Or you can not use the RPi, and just use an Arduino with a built-in ADC. Or an ESP8266 or similar, which gives you one ADC channel and a WiFi interface to talk back to the RPi.

 

The more bits the ADC has, the more precisely you can measure the voltage. The more channels, the more independent input voltages you can measure. If you only want to measure temperature in the range (say) -10 to 40 degrees to a tenth of a degree, that's a range of 500 values, so you would need 9 bits or more.

 

I'm happy to walk you along this path if you need help.

 

 




cyril7
9050 posts

Uber Geek

ID Verified
Trusted
Subscriber

  #2756213 6-Aug-2021 15:30
Send private message

As pointed out there is no ADC onboard a baseline Pi, but SPI is there, purhaps something like this.

 

https://nz.element14.com/microchip/tc77-5-0mcttr/sensor-thermal-13-bit-spi-sot/dp/1292291?MER=sy-me-pd-mi-acce

 

Cyril


frankv
5678 posts

Uber Geek

Lifetime subscriber

  #2756227 6-Aug-2021 16:13
Send private message

gbwelly:

 

Be interested to know how accurate this method is in the real world:

 

https://www.mechatronicslab.net/raspberry-pi-analog-input/#Measure_temperature_using_a_thermistor

 

 

Yeah, that would work. But...

 

1. Measuring time accurately on a RPi running Linux is problematic, unless you have some very complex code or use very long times

 

2. You can't do anything with the CPU while you're measuring time (brain the size of a planet, and all you want me to do is count...), so not really useful for fast-changing temperatures that you need to respond to.

 

3. Reading more than one channel becomes increasingly problematic

 

4. Measuring temperature like this is fine for a proof of concept, but IRL you'd use a <$1 chip on a SPI interface

 

 


outdoorsnz

674 posts

Ultimate Geek


  #2756303 6-Aug-2021 17:31
Send private message

Thanks all, you have given me a few things to look into. Will digest this in the weekend.

 

But looks like something small low powered with wifi build in will do the trick. i.e. ESP8266

 

I also have one of these hanging about. Thought it looked interesting but could never find anything practical to use it for.

 

Trinket 1501 Pretty sure it can read digital.

 

Cheers


outdoorsnz

674 posts

Ultimate Geek


  #2757343 9-Aug-2021 16:59
Send private message

tim0001:

 

The probe might be a thermistor.  how to test a thermistor

 

You'd need an ADC to read the temp from a thermister.  An arduino would do.

 

 

Found my old dick smith multi meter that I purchased as a teenager! And definitely a thermistor as I could see the OHM's change with my fingers on the probe.

 

As I have a trinket that can read ADC, this will be the next spare moment thing to do. In theory I should be able to power this by a raspberry pi and read the value over USB serial.




outdoorsnz

674 posts

Ultimate Geek


  #2757355 9-Aug-2021 17:07
Send private message

cyril7:

 

As pointed out there is no ADC onboard a baseline Pi, but SPI is there, purhaps something like this.

 

https://nz.element14.com/microchip/tc77-5-0mcttr/sensor-thermal-13-bit-spi-sot/dp/1292291?MER=sy-me-pd-mi-acce

 

Cyril

 

 

That looks quite good. I wonder what the actual accuracy difference is in cold temperatures i.e. -5 to mid 20's for where I live. They all quote around +- 1 deg: 25+ to 65+. C.

 

I found the DS1820B was about 3 deg out when compared to my brewing temp controllers and general consumer devices i.e. clock / endeavor simple weather station.


tim0001
261 posts

Ultimate Geek


  #2757911 10-Aug-2021 12:30
Send private message

The DS18B20 is a victim of its own success.  There are counterfeits of dubious quality .

 

Yet another alternative is the builtin temperature sensor in some Atmel chips (eg Arduino).   Probably not suitable for your application, but might come in useful one day.    Accuracy can be improved if you calibrate it and have the MCU in sleep mode just before the measurement. 


Create new topic





News and reviews »

Māori Artists Launch Design Collection with Cricut ahead of Matariki Day
Posted 15-Jun-2025 11:19


LG Launches Upgraded webOS Hub With Advanced AI
Posted 15-Jun-2025 11:13


One NZ Satellite IoT goes live for customers
Posted 15-Jun-2025 11:10


Bolt Launches in New Zealand
Posted 11-Jun-2025 00:00


Suunto Run Review
Posted 10-Jun-2025 10:44


Freeview Satellite TV Brings HD Viewing to More New Zealanders
Posted 5-Jun-2025 11:50


HP OmniBook Ultra Flip 14-inch Review
Posted 3-Jun-2025 14:40


Flip Phones Are Back as HMD Reimagines an Iconic Style
Posted 30-May-2025 17:06


Hundreds of School Students Receive Laptops Through Spark Partnership With Quadrent's Green Lease
Posted 30-May-2025 16:57


AI Report Reveals Trust Is Key to Unlocking Its Potential in Aotearoa
Posted 30-May-2025 16:55


Galaxy Tab S10 FE Series Brings Intelligent Experiences to the Forefront with Premium, Versatile Design
Posted 30-May-2025 16:14


New OPPO Watch X2 Launches in New Zealand
Posted 29-May-2025 16:08


Synology Premiers a New Lineup of Advanced Data Management Solutions
Posted 29-May-2025 16:04


Dyson Launches Its Slimmest Vaccum Cleaner PencilVac
Posted 29-May-2025 15:50


OPPO Reno13 Pro 5G Review 
Posted 29-May-2025 15:33









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.







Backblaze unlimited backup