UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > Other Discussions > Homebrew Equipment

Notices

Homebrew Equipment A place to show, design and discuss the weird and wonderful electronic creations from the hands of individual members.

Closed Thread
 
Thread Tools
Old 29th Dec 2021, 10:33 pm   #1
Philips210
Nonode
 
Join Date: May 2007
Location: Redruth, Cornwall, UK.
Posts: 2,562
Default Practical implementation of mathematical operations.

Hi.

I've always been interested in weather monitoring and have built various instruments over the years and I'm currently working on a cup anemometer and pondering on a new hygrometer for measuring relative humidity (RH).

I have been noticing a considerable variation in the readings of various hygrometers for example one reads 62% another 65% and another 67%. I was wondering which one is the one to trust so a calibration check could be done in a salty enclosure.

I read that the wet bulb/dry bulb hygrometer (psychrometer) is the most accurate way to measure RH. I have one of these which consists of two thermometers one the dry bulb the other the wet bulb the latter has a wick attached to the bulb and is in its own little water bottle. The psychrometer works best if it has a little airflow through it to assist in the evaporation of the wet bulb, a small fan may be used. To obtain the RH value, the two readings are taken and a look up table is consulted. This doesn't seem the best way to obtain good accuracy so the quite complicated formula can be applied to obtain best results. (see attached pic containing the formula).

I pondered on the idea of an electronic psychrometer using a couple of thermistors for the wet/dry bulb temperature sensors. The unit would display both wet/dry temp readings and compute the result to display the relative humidity.
A PIC would seem a logical way to do this but to my point, I was wondering if it would be practical to attempt this using analogue circuitry ie op amps to do the mathematical functions. I would imagine it would be pretty complicated to realise this as there's multiplication, division, addition, subtraction, exponential functions, addition of constants etc. It's like using an analogue computer really but with many functions tied together. It would be a great learning exercise if it could be achieved. What to others think about this?

Regards,
Symon
Attached Thumbnails
Click image for larger version

Name:	relhum.png
Views:	127
Size:	7.2 KB
ID:	248570  
Philips210 is offline  
Old 29th Dec 2021, 11:29 pm   #2
trsomian
Hexode
 
Join Date: Oct 2010
Location: Box End, Beds. UK.
Posts: 271
Default Re: Practical implementation of mathematical operations.

I suspect that lookup tables and interpolation are the way to go here unless the calculations are quite simple
trsomian is offline  
Old 30th Dec 2021, 12:10 am   #3
Terry_VK5TM
Nonode
 
Terry_VK5TM's Avatar
 
Join Date: Oct 2010
Location: Tintinara, South Australia, Australia
Posts: 2,324
Default Re: Practical implementation of mathematical operations.

I'm assuming you want to build something yourself as opposed to buying humidity sensors and interfacing them?

Heard of the Bosch BME280 & BME680 sensors?

Amongst other things, they measure humidity to 3% accuracy.

Plenty of PIC/Arduino projects on the net using them (they are digital so op-amps/analog circuits are out).
__________________
Terry VK5TM
https://www.vk5tm.com/
Terry_VK5TM is offline  
Old 30th Dec 2021, 12:25 am   #4
kalee20
Dekatron
 
Join Date: Feb 2007
Location: Lynton, N. Devon, UK.
Posts: 7,061
Default Re: Practical implementation of mathematical operations.

Bearing in mind the equations given are non-linear, and not simple exponential either - and furthermore you're looking at thermistors which have a non-linear relationship of resistance to temperature, any circuit to derive RH is going to be rather complex. At best I'd suggest a piecewise-linear approximation, with umpteen break points.

Whereas, a (2-dimensional) lookup table should be able to give very good results, resistance of dry thermistor across the rows; resistance of the wet thermistor across columns, the intersection giving the appropriate value of RH.

You can digitise each thermistor to (say) 8-bit accuracy, put the two together to give a 16-bit word, shove this into a 16-bit ROM. The addressed location contains the RH value.

You do the calculations once and for all on a PC, and use the data generated to blow the ROM.

It should be as accurate as the equations and the thermistors are capable of.
kalee20 is offline  
Old 30th Dec 2021, 5:05 pm   #5
Philips210
Nonode
 
Join Date: May 2007
Location: Redruth, Cornwall, UK.
Posts: 2,562
Default Re: Practical implementation of mathematical operations.

Hi.

Thanks for all your replies and the links to the Bosch 3 in 1 sensor,Terry.

Yes, I think it would be a tall order to implement the mathamatical equation using op amps and OTAs, possible but not really practical.
The look up table is the way to go trsomian.
Kalee20, your suggestion of how to approach the idea looks very good. I will have to look into this in the new year. This project could employ an EPROM for the look up table. Interesting challenge. Thanks again.

Regards,
Symon
Philips210 is offline  
Old 1st Jan 2022, 12:58 pm   #6
trsomian
Hexode
 
Join Date: Oct 2010
Location: Box End, Beds. UK.
Posts: 271
Default Re: Practical implementation of mathematical operations.

If you want to get the whole 2D lookup table into a modest PIC I would use something like a 16 x 16 lookup table, with interpolation between the looked up values, which will probably give adequate accuracy, and 256 lookup values which is not too demanding of non-volatile memory. Address the lookup table with the most significant four bits of the temperature values, and do the interpolation with the least significant bits
trsomian is offline  
Old 4th Jan 2022, 4:53 pm   #7
Philips210
Nonode
 
Join Date: May 2007
Location: Redruth, Cornwall, UK.
Posts: 2,562
Default Re: Practical implementation of mathematical operations.

Thanks for the advice trsomian. I am probably out of my depth with PICs but do want to learn about programming them. In my case that will be a long learning curve.

Regards,
Symon
Philips210 is offline  
Closed Thread

Thread Tools



All times are GMT +1. The time now is 11:12 pm.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.