[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reporting Data 1-Way-Out?
Steve ][ wrote:
Thanks a lot for giving me new web-search keywords. :)
I have a few IIGS machines, so for my first pilot project I wanted to
do outdoor weather temperature and barometric pressure. I was hoping
that I could find an already-built sensor/monitor of some type that I
could wire to the IIGS game port (I haven't read PDL0 in years
<grin>); if there is nothing pre-built, I wouldn't mind paying a few
bucks for someone to build me one or following (solderless) directions
for assembling something. But simple is the key since I want to walk
through this with my very young son and want to spend more time on the
II computing part than the infrastructure.
Humidity will probably require some adaptation. Perhaps you can find
a sensor+electronics that outputs a pulse rate that is a function of
humidity. That would be pretty easy to time or count using a pushbutton
input.
Windspeed is a natural for a pulse period/rate measurement, since most
sensors will involve an anemometer rotor. Most rain gauges also work
by collecting rain over a few square inches into a small reservoir that
tips over when full, so time-to-tip is a direct measurement of rainfall
rate, and total tips is a measurement of cumulative rainfall.
My second project will probably deal with temperature, etc for a fish
tank.
A thermistor is a natural for measuring temperature using the paddle
circuits. There are lots of thermistors available, some with maximum
resistance in the 100K-200K range--perfect for paddle inputs.
As noted earlier, the resistance is a nonlinear function of temperature,
so you'll need to use a function to linearize it--about one line of
BASIC should do fine. ;-)
Google will turn up the temperature-resistance transfer function for
your device, and you and your son will enjoy the three-point calibration
process using a cup of heated and cooled water and a thermometer.
As you know, there is no direct way of measuring an analog voltage on
the Apple II. Either the voltage must be used to control a current
that stands in for a variable resistance in a paddle circuit, or an
Analog-to-Digital Converter must be added, either on a peripheral card
or as an external device connected using the annunciators and PB inputs.
The direct resistance-to-digital capability of the paddle circuits has
been used for many different kinds of sensors, such as temperature and
light (using a light-dependent-resistor photocell), and, of course,
position, using a potentiometer.
The direct digital inputs have been used with phototransistors to sense
position and rotational speed, among other things.
The annunciator outputs can be used to control digital devices, and both
the inputs and the outputs can easily be extended to more bits by the
use of a serial-in, parallel-out shift register.
I am pretty much sold on Complete Pascal. It is very high level (just
GSOS adds a ton of overhead I know), but it achieves several things
for me.
In the GSOS environment, if you want to do simple timing loops (to
measure pulse period or frequency, for example), you'll need to disable
interrupts and possibly switch processor frequency to get a well-defined
timing environment.
-michael
NadaPong: Network game demo for Apple II computers!
Home page: http://members.aol.com/MJMahon/
"The wastebasket is our most important design
tool--and it's seriously underused."