|
The temperature/light sensor:
Pc joystick port can be used very easily for simple
measurement
of light and temperature values. All you need for light measurements is
to connect
a LDR resistor between +5V and potentiometer input. For temperature
measurements
substitute the LDR with suitable NTC-resistor. If you use only one
input, put
a 0..100 kOhm resistor to other input so that the computer won't think
that
there is no joystick available (this is for those that use BIOS routines
or
some other ready-made library).
pin 1
+5
________________
|
NTC
or LDR |
pin 3 stick 1x ____/\/\/\_____|
|
100
k |
pin 6 stick 1y ____/\/\/\_____|
Select the variable resistor (NTC or LDR) type so that is will give
resistor
values are in 0..100 kOhm area in your measurement situations. The
larger difference
between smallest and largest resistor value, more accurate the system
will be.
The problem is that the system will never be very accurate, because the
joystick
interface is not degigned to be very accurate instrument. The value
given you
get can vary from component temperature drift, large differences between
diffrenet
joystick interface cards, computer clock speed differences and some
other things.
|