Firstly here is an Australian bloke who has
done similar stuff http://quozl.linux.orgau/?category=Pic
Look to the "Emu fat" project (covers lightning,
communication to remote frezzer site, etc)
Also has pump controllers there too.
Secondly for timestamping I'd suggest a DS1307 RTC
(Real Time Clock). They use a standard watch crystal and will keep "ticking" for
ten years on a lithium watch-cell backup battery. I think they have
something like 56 bytes of ram as well that can be used. It also includes a
calandar that has the next 100 years of leap years included too. See http://pdfserv.maxim-ic.com/en/ds/DS1307.pdf
This RTC communicates via the I2C bus with the AVR
so check out the routines in the academy section at www.avrfreaks.com
Oh one last suggestion - the protect the uC you can
use optocouplers (these allow two circuits to send signals to each other via
light inside a plastic package - therefore no direct wired link between each
circuit
----- Original Message -----From: Chuck HackettTo: AVR-ChatSent: Thursday, October 21, 2004 7:42 AMSubject: [AVR-Chat] Remote site questionsHi, I'm new to the group and have just received my STK-500 and I'm ready to
start my first application (one-off) which is data logging, control and
monitoring of the irrigation pump & filter supplying our small orange grove in
Tampa, Florida.
Background: I'm a retired software developer (Financial Electronic Funds
Transfer, Automated Teller Machine systems as well as communications).
Electrical Engineer by training. I'll be programming AVRs mostly in C as that
is the language I'm most familiar with but I'm not afraid of ASM in situations
that require it.
Clock: For data logging timestamp purposes do folks use an external xtal and
onboard timer channel (assume Atmega16) or should one use an external RTC?
Tradeoffs? I'd like accuracy on the order of 10 seconds per month.
Backup Power: 110 VAC power is normally available but I'd like to provide backup
power to maintain the RTC clock function mentioned above. What's the
easiest/cheapest way to do this? One thought was to just purchase the smallest
battery UPS I can find. Another thought was a 12v battery supplying the
processor, etc. with a 'float' charger attached to it. Tradeoffs?
Field Connections: There are currently two pressure transducers (located outside
the weatherproof cabinet) feeding the microcontroller as well as a 24VAC signal
from the irrigation controller (pump start request, in the same cabinet) and a
24VAC signal to the pump start relay (outside the cabinet). Considering the
field connections to the pressure transducers in particular what precautions
should be used to protect the microcontroller from lightning, etc. (this is
located in Florida, lightning capital of the world!) - except, of course, a
direct strike where all bets are off :-) The transducer signals are 0-5vdc.
Varistor? Some kind of fast acting clamp?
Communications: I would eventually like to connect this site to a phone line
via a modem for status reporting and non-time critical command functions. I've
seen several chips/modules that provide this to 10-BaseT/100-BaseT nets but not
for dialup. Can you point me to available libraries supporting the
sending/receiving of email via dialup? I have a dialup ISP. I assume I'd need
dialer functions (easy to for me to do but why reinvent the wheel), TCP/IP
stack, SMTP/POP3 functions, etc.
Cheers,
Chuck Hackett
"Good judgment comes from experience, experience comes from bad judgment"
7.5" gauge Union Pacific Northern (4-8-4) 844
http://www.whitetrout.net/Chuck