Is this possible with a BS2?
Archiver
Posts: 46,084
I have been asked to develop a BS2-based circuit that is capable of
the following:
1.) Monitor relay contacts for closure, and report such closure via
a cell phone, with voice notification of alarm (via some type of
prerecorded message).
2.) Log the date and time of the relay closure to EEPROM.
3.) Allow user to download the data contained in the EEPROM, into a
Palm handheld, via RS-232.
Is this even possible with the BS2-IC, or should I consider some
different Stamp type? Without interrupts, is it even possible to
have the Stamp looking for alarm events, but also allow the user to
download data? I would assume that the alarm scanning would have to
be stopped, and then resumed once the download has completed.
Let me know...
thanks,
Jim D. Martin
the following:
1.) Monitor relay contacts for closure, and report such closure via
a cell phone, with voice notification of alarm (via some type of
prerecorded message).
2.) Log the date and time of the relay closure to EEPROM.
3.) Allow user to download the data contained in the EEPROM, into a
Palm handheld, via RS-232.
Is this even possible with the BS2-IC, or should I consider some
different Stamp type? Without interrupts, is it even possible to
have the Stamp looking for alarm events, but also allow the user to
download data? I would assume that the alarm scanning would have to
be stopped, and then resumed once the download has completed.
Let me know...
thanks,
Jim D. Martin
Comments
You could do it with a bs2, but a bs2sx or bs2p is easier to use with 9600
baud rates. You need to receive as well as send if you are talking to modems
of any kind, so a faster stamp is better.
Why dont you simply send out a text message to a cell phone when the relay
contacts close ?, it can be done.
You can send basically anything serially, very easily with the stamp, so if
you have a program for your Palm, then it should be a breeze.
Yes you can do all of the things you wish with a stamp, and there's heaps of
examples on this group or Tracy Allens site and the Parallax site.
Cheers,
Chris
Original Message
From: "Jim D. Martin" <fw_econo@y...>
To: <basicstamps@yahoogroups.com>
Sent: Wednesday, July 23, 2003 8:59 AM
Subject: [noparse][[/noparse]basicstamps] Is this possible with a BS2?
> I have been asked to develop a BS2-based circuit that is capable of
> the following:
>
> 1.) Monitor relay contacts for closure, and report such closure via
> a cell phone, with voice notification of alarm (via some type of
> prerecorded message).
>
> 2.) Log the date and time of the relay closure to EEPROM.
>
> 3.) Allow user to download the data contained in the EEPROM, into a
> Palm handheld, via RS-232.
>
>
> Is this even possible with the BS2-IC, or should I consider some
> different Stamp type? Without interrupts, is it even possible to
> have the Stamp looking for alarm events, but also allow the user to
> download data? I would assume that the alarm scanning would have to
> be stopped, and then resumed once the download has completed.
>
> Let me know...
>
> thanks,
>
> Jim D. Martin
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
<wherever> so you can make it do anything you want.
Instead of sending the entire eeprom and neglecting everything else, just
send a portion of the eeprom that is equal to the greatest delay in alarm
response you are willing to accept. No need of an interrupt really.
e.g. read a byte from the eeprom then send it to the palm. Now go poll your
alarm pin. Repeat for next byte, etc etc.
Considering how fast this happens, even on a BS2, you can send a LOT of data
between polls. I mean, if there's a 1 second delay between checks of the
relays, will it matter? You're reporting over a cell so there's already a
significant delay between the relay event and the actual report.
You might want to terminate (or at least suspend) a download if you detect
an alarm. I imagine that reporting the alarm is a LOT more important than
requiring the download to restart a 5 second download [noparse]:D[/noparse]
If you absolutely positively MUST have both at once with no delays, you'll
need a second MCU (interrupts would make no difference here anyway). One
master for monitoring the alarms and sending orders to the slave CPU. The
slave would handle sending and receiving data - letting the master send a
simple command to initiate it.
Original Message
From: "Jim D. Martin" <fw_econo@y...>
To: <basicstamps@yahoogroups.com>
Sent: Tuesday, July 22, 2003 5:59 PM
Subject: [noparse][[/noparse]basicstamps] Is this possible with a BS2?
> I have been asked to develop a BS2-based circuit that is capable of
> the following:
>
> 1.) Monitor relay contacts for closure, and report such closure via
> a cell phone, with voice notification of alarm (via some type of
> prerecorded message).
>
> 2.) Log the date and time of the relay closure to EEPROM.
>
> 3.) Allow user to download the data contained in the EEPROM, into a
> Palm handheld, via RS-232.
>
>
> Is this even possible with the BS2-IC, or should I consider some
> different Stamp type? Without interrupts, is it even possible to
> have the Stamp looking for alarm events, but also allow the user to
> download data? I would assume that the alarm scanning would have to
> be stopped, and then resumed once the download has completed.
>
> Let me know...
>
> thanks,
>
> Jim D. Martin
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
How quickly do you need the Stamp to detect/log/report the alarm event while
the user is downloading the data? (Would a delay of a few seconds be a
problem?) Will there be a lot of data, or is the event just occasional? Is
the duration of the relay closure, when it does happen, long enough for the
Stamp to be checking it occasionally as it is downloading the data to the
Palm?
Depending on those answers, you may be able to have the Stamp send some of
the data to the Palm, check for the relay event, send more data, check the
relay, etc.
Another more certain method could involve the relay closure setting a
flip-flop, with the Stamp checking the flip-flop instead of the relay
directly. The Stamp could then reset (clear) the flip-flop once it detects
the event. That way the event would be detected even if the Stamp was busy
sending data to the Palm when the relay closed. Whether something like this
would be needed would depend on the minimum duration of the relay closure,
the amount of data, and how fast you need the response time to be when an
event occurs.
Randy Jones
www.glitchbuster.com
> I have been asked to develop a BS2-based circuit that is capable of
> the following:
>
> 1.) Monitor relay contacts for closure, and report such closure via
> a cell phone, with voice notification of alarm (via some type of
> prerecorded message).
>
> 2.) Log the date and time of the relay closure to EEPROM.
>
> 3.) Allow user to download the data contained in the EEPROM, into a
> Palm handheld, via RS-232.
>
>
> Is this even possible with the BS2-IC, or should I consider some
> different Stamp type? Without interrupts, is it even possible to
> have the Stamp looking for alarm events, but also allow the user to
> download data? I would assume that the alarm scanning would have to
> be stopped, and then resumed once the download has completed.
>
> Let me know...
>
> thanks,
>
> Jim D. Martin
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
1. You can do this without using interrupts.
(in other words, use a 'polled signal' approach)
2. You add a $5.00 DS1302 Time Chip for accurate,
battery-backed time.
3. You add a $5.00 EEPROM circuit
4. You do the interface code to help the BS2sx
(or whatever) to copy the EEPROM to the Palm.
5. You don't need to know the time of the
closure with greater than 1 second resolution.
The 1302 only goes down to seconds, and the BS2sx
is programmed in P-code Basic, and resolution
greater than this is unrealistic.
Having said all of that, this looks like
a perfect project for a Stamp. You can easily
get a sample loop which can monitor many
pins of input in one second. EEPROM logging
is a standard thing to do with a Stamp, and
you can use a standard Modem to do the
notification of closures.
You may have to do some clever multi-tasking
code to monitor closures while downloading
data, but it's not impossible. It would be
easier to stop the scan while downloading
data. At 9600 Baud, it should take around
10 seconds to download an 8K eeprom.
--- In basicstamps@yahoogroups.com, "Jim D. Martin" <fw_econo@y...>
wrote:
> I have been asked to develop a BS2-based circuit that is capable of
> the following:
>
> 1.) Monitor relay contacts for closure, and report such closure
via
> a cell phone, with voice notification of alarm (via some type of
> prerecorded message).
>
> 2.) Log the date and time of the relay closure to EEPROM.
>
> 3.) Allow user to download the data contained in the EEPROM, into
a
> Palm handheld, via RS-232.
>
>
> Is this even possible with the BS2-IC, or should I consider some
> different Stamp type? Without interrupts, is it even possible to
> have the Stamp looking for alarm events, but also allow the user
to
> download data? I would assume that the alarm scanning would have
to
> be stopped, and then resumed once the download has completed.
>
> Let me know...
>
> thanks,
>
> Jim D. Martin