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

350 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
115 posts

Master 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.

 

 


Affiliate link
 
 
 

Affiliate link: You will find anything you want at MightyApe.
gbwelly
1144 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
5114 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
8764 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
5114 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

350 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

350 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

350 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
115 posts

Master 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 »

Belkin Screenforce Tempered Glass Screen Protector and Bumper - Apple Watch
Posted 15-Aug-2022 17:20


Samsung Introducing Galaxy Z Flip4 and Galaxy Z Fold4
Posted 11-Aug-2022 01:00


Samsung Unveils Health Innovations with Galaxy Watch5 and Galaxy Watch5 Pro
Posted 11-Aug-2022 01:00


Google Bringing First Cloud Region to Aotearoa New Zealand
Posted 10-Aug-2022 08:51


ANZ To Move to FIS Modern Banking Platform
Posted 10-Aug-2022 08:28


GoPro Hero10 Black Review
Posted 8-Aug-2022 17:41


Amazon to Acquire iRobot
Posted 6-Aug-2022 11:41


Samsung x LIFE Picture Collection Brings Iconic Moments in History to The Frame
Posted 4-Aug-2022 17:04


Norton Consumer Cyber Safety Pulse Report: Phishing for New Bait on Social Media
Posted 4-Aug-2022 16:50


Microsoft Announces New Solutions for Threat Intelligence and Attack Surface Management
Posted 3-Aug-2022 21:54


Seagate Addresses Hyperscale Workloads with Enterprise-Class Nytro SSDs
Posted 3-Aug-2022 21:50


Visa Launching Eco-friendly Payment Solutions in New Zealand
Posted 3-Aug-2022 21:48


NCR Delivers Services to Run Bank of New Zealand ATM Network
Posted 30-Jul-2022 11:06


New HP Portfolio Supports New Era of Hybrid Work
Posted 28-Jul-2022 17:14


Harman Kardon Launches Citation MultiBeam 1100 Soundbar
Posted 28-Jul-2022 17:10









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