Alarm Using the SX28 and Parallax 433.92 MHz RF modules
Want to make three transmitters and one receiver connected to a sensaphone for alarm system for construction site, transmitters will be powered by batteries and have a simple normally closed contact on craw space door or any other doors. Would like to run several transmitters and one base receiver connected to a sensaphone. If transmitter one is activated it·sends a·coded signal to to a base that triggers the #1 contacts on the sensaphone, calling and identifying the site·of·the break in. We are battling the copper theft's that have stripped the wires out of buildings not just once but twice, this is a nationwide epidemic any suggestions would be much appreciated. Have found·construction sentry's online costing from $5000·and up.
Comments
Also, protoboard prices being what they are, you might consider using an SX48 or Propeller. You would have more design flexibility at about the same cost.
Post Edited (dbj) : 6/10/2007 6:32:56 AM GMT
You could do that to save battery power. Whatever state change triggers your alarm, say High-to-Low, just finish transmitting then go to sleep and wait for the opposite condition to occur. This will indicate that the alarm condition has been cleared. So just have the SX go back to sleep yet again, this time waiting for another High-to-Low event signaling a new alarm condition.
Definitely go with an external oscillator or resonator. You will want stable timing for sending serial data over the temperature range your construction site will see.
I hope this helps.
- Sparks
The data packet that I send as the Identifyer for witch transmitter is sending a alarm, what would be most efficent data type to send to the recever?
You could transmit a full-fledged packet with header, payload and checksum values or just send a single identifier byte. Whatever you send I would send it several times to help ensure that it is actually received. To further reduce errors you may want to select identifiers that differ by than more than a single bit.
For testing the serial settings you can set the radios aside and just connect the serial signal from the SX to the BS2 along with a ground line provided that both are running at five-volt levels.
- Sparks
Post Edited (dbj) : 6/13/2007 11:34:10 PM GMT
I will try to break this to you gently. Your present TX1.SXB code is not well written. (I understand SX/B may be new to you. Many of us have made similar mistakes while we were learning.)
Here are some of the problems.
- 1.) The program as written will make only one check of the alarm trigger before ending. To check continuously add something like “GOTO Main” at the end of your program.
- 2.) The PUSLEOUT command is expecting a Duration value not a quoted string. In my opinion the compiler should report an error in this case. Replace your "OT9600" entry with a number representing how many 10ms durations you want the pulse to last.
- 3.) The SEROUT command expects to send a single byte serially. You are attempting to use it to try to send an entire string. This is a common misunderstanding of how the command works under SX/B. Again, I think the SX/B compiler should generate an error under this condition but it does not seem to do so at this time.
- 4.) While technically not a problem, the ELSE statement and the NOP command are not necessary and can be omitted.
Other than that, you appear to be on the right track. Let us know how it goes.To send an entire string check out the LCD_OUT subroutine of the RFID Reader Interface example in the SX/B Help file. It demonstrates the passing of string data to a subroutine, which in turn uses the SEROUT command to send the data serially one byte at a time.
- Sparks
Post Edited (JonnyMac) : 6/19/2007 12:01:14 AM GMT
This article may help you understand the nature of transmitting serial data: http://www.parallax.com/dl/docs/cols/nv/vol6/col/nv117.pdf
The book "Serial Port Complete" is a great start.
http://www.amazon.com/Serial-Port-Complete-Jan-Axelson/dp/0965081923