[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reporting Data 1-Way-Out?
On May 13, 9:45 am, "Steve ][" <sc...@hotmail.com> wrote:
> Thanks for the follow-ups on this post. I just discovered the IIGS
> joystick-reading ToolBox code (thanks to Michale Stephens). So I think
> what I'd like to do is read temperature or water pH or etc from the
> outside world via the 16-pin joystick port* and then send the data
> using AppleTalk under GS/OS.
I had an Apple IIgs in the garage for over a year reading the outside
temperature from a New Micros 68HC11 board. That used one serial
port. The Apple II then sent the temperature and time data over the
second serial port to an old Sun Sparc 10. The Sun thought the Apple
II was the console and that the information was being typed. A second
program on the Sun then woke up every ten minutes to build a web page
with the current readings as well as gnuplot generated graphs showing
all sorts of temperature data (all, last 24 hours, high/low, etc).
I am currently, slowly, working on a new A/D interface for the Apple
II that would use the game port. It will use a PIC 10F222 to give two
8-bit A/D channels, either 0..5V or 0..10V. When will I finish? Not
sure, it keeps being put off by other things.
As to your particular question, serial output from the IIgs is the way
to go. The New Micros board (the $49 one, NIM-0021 or similar name)
provides a bunch of digital I/O lines and 8-bit A/D. You will need
some extra circuitry to get temperature. I used an LM34 to read
directly in Farhenheit and provided a constant voltage offset to
handle a negative input voltage. I live in Denver and we can go from
-10 to +100 F throughout the year. There are other LM series that
provide absolute temperature so you don't have to worry about negative
voltages. The New Micros board runs Forth and while it has very
little RAM (~240 bytes, max) you can configure it and read it via the
serial port by sending ASCII strings so you really don't need to run
any code on the device itself if you don't access it too frequently.
I just used the same board at work to simulate 3 incremental encoders
and it worked wonderfully.
Another option would be to use a DataQ DI-194RS (http://www.dataq.com/
products/startkit/di194rs.htm) which will give you 4 12-bit A/D
channels for only $24. I use this to read indoor and outdoor
temperature on a PC with a small GUI to display it on the desktop. I
wrote some Python code to read from it, it wouldn't be difficult to do
the same for the Apple II. BTW, all my Apple II projects use QForth
and some assembly, but the New Micros board expects plain 7-bit ASCII
at 9600 baud so you could control it from Applesoft if you wanted to
with PR# commands. Dittos for the DataQ board.
Lots of options! How are you planning on measuring the temperature?
Thermistors work but have to be carefully calibrated and I've found
that what works for one Apple II is not correct for another, it is
computer specific. The LM sensors remove that problem and allow for a
single point calibration with a small 10k pot.
Ron