On Thursday 21 October 2004 05:42, Chuck Hackett wrote: > 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. Independent RTC... mainly because of it makes the programming much easier ans well as ... > 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 Independent RTC with its own battery. Monitor battery voltage with the AVR when the controller is active. The controller could go into a low-power mode and be woken up once a second (or so) by the RTC driving an interupt. When mains power is available, provide a "float charge" to supplant the battery supply. A series resistor between the battery and the rest of the circuit is usually enough to prevent the battery from actually charging at a dangerous rate, while only increasing the power consumption during a power failure by a small amount. Resistor selection will depend on the current drawn by the RTC. Some RTC's probably have the integrated ability to draw from two power sources (i.e. main PSU and battery) making circuit design a lot simpler. You won't need any special circuitry if you use alkaline cells for battery backup; just keep your possible "charge" current below a milliamp or thereabouts (you could possibly "drive" it using an AVR pin as output; if the pin supports ADC, then you can periodically test the battery state by switching it "off" and after a decent interval, measuring a voltage indicative). Alkaline cells have a shelf life of about 7 years which you should be able to approach. > 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? Maintenance and battery life. This all adds to cost. > 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? Transorbs on power and "local" wiring. Optical isolation on signal inputs with long wires. > 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. SMTP is amazingly simple, but the underlying TCP/IP stack is quite a lot of baggage. If you have a dialer, then why not simply call a pre-determined number, have that answer and log the status? Thsi is how many "monitored" alarm systems operate. If you're anywhere near a GSM (or similar) network, then you can send status using SMS; and also receive messages to re-program as necessary. GSM phone modules aren't very expensive; unfashionable mobile phones are a cheap resource. Some will accept a serial connection and talk an AT-like protocol to allow the sending of messages without a landline. -- /"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia \ / ASCII ribbon campaign | I'm a .signature virus! X against HTML mail | Copy me into your ~/.signature / \ and postings | to help me spread!
Message
Re: [AVR-Chat] Remote site questions
2004-10-21 by Bernd Felsche
Attachments
- No local attachments were found for this message.