Temperature sensor

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators:Administrator, Global Moderator

Post Reply
Hans
Newbie
Posts:1
Joined:Thu Mar 18, 2010 2:29 pm
Temperature sensor

Post by Hans » Thu Mar 18, 2010 2:34 pm

Hi,
please can somebody tell me how to read the temperature from this sensor (connected to COM1) in a basic-program?
http://www.produktinfo.conrad.com/daten ... R_TO92.pdf

best regards
Hans

Valerie
Sr. Member
Posts:54
Joined:Wed Dec 15, 2004 8:10 am
Location:Coromandel, NZ

Post by Valerie » Sun Apr 04, 2010 10:01 am

How do you intend to connect the output of the temperature sensing device to the Com port? This device is just a sensing unit which will return a value (voltage?) on the output pin depending on the current operating temperature. e.g. For an input voltage of 5v at a temperature of 20C the output might be 3v, at a temperature of 40C the output might be 4v etc.. This voltage must then be detected and converted to a value (binary?) which can be read by the program. QuickBasic is not capable of reading/interpreting voltages, that's a job for other electronic components.

User avatar
BurgerBytes
Jr. Member
Posts:22
Joined:Thu Aug 06, 2009 7:44 pm
Location:Pittsburgh, PA, United States

Post by BurgerBytes » Sun Apr 11, 2010 12:16 am

From the tech description, the device sends pulses to represent the temerature eliminating the need for an Analog to Digital converter. The problem would be the time duration needed to read the pulses.

The pulses need to be counted in regular intervals and converted to an alolog value accordingly. That would require the program to convert the counts to degrees. This would be set up by trial and error.

Ted
Get my QB demonstrator here: http://dl.dropbox.com/u/8440706/Q-Basics.zip

Post Reply