I need PIC programing source code for "relay base security system". I'm using a Pic18F46J50 with a sim900 GSM module on it.
System needs to arm/disarm via cellphone.
output will give high voltage for indication LED to sigh
You need NC input (have code attached so you can see). Each Input (portB) connect to output (portD) relay.
Here comes the fun part.
First time the condition change on a input and the relay is triggered then next step would happen:
Count of 10 sec delay,
SMS send notifying system "alarm and which input"
A Output relay should be triggered with a 3min timer on it for a siren
A second relay should be trigger for a strobe and this relay will stay energized till alarm is deactivated.
When 10 sec is depleted, the relay matching that input will trigger for 10sec,
(Pause and wait for movement)
IF any other input trigger from this stage should be trigger the output relay will trigger for 10 sec instantaneously .
Each time a relay is trigger a SMS must be send with number of relay
When the same relay is trigger for the 3x time a 30 sec trigger should commence (this is optional and)
At any stage this system can be deactivated by sending SMS.
I also need a PIN where a receiver (normal remote receiver with relay on can be connected on) NO/NC (dry contact relay on receiver) doesn't matter but that pins should allow me to to arm and disarm using a remote and receiver
The a another input pin that over right everything (case tamper switch) when case is open when system is armed all relay will trigger.
Also when should be able to give its status like "System armed or System disarmed" when a MGS word for example "status" is send to it.
If it to much we can break project up into smaller pices
Send me mgs for more info. Schematic or if you need info
Project description - Alarm panel with a build in SIM900 GSM communicator
I need PIC programming source code for "relay base security system".
I'm using a PIC18F46J50 with a sim900 GSM module on it.
I need 6 NC inputs. Each Input (PORTB) links to an output (PORTD) relay.
The last two PINs (relays) on PORTD (PortD.6 & PortD.7) are used for siren and strobe light.
• Arming/disarming should be done via SMS --------à E.G - Arm System OR Arm SYS
• Via a RF receiver and remote, (RF receiver shall have a dry contact relay that will be able to pulse a input pin that will in return arm/dis-arm system. Any free pin on PORT A)
• An LED should indicate if the system is armed or not. Port A (any pin e.g. PortA.1)
System needs to arm/disarm via cell phone. ? Format e.g. Arm System/System On/Arm SYS/
Panel will need to reply via sms, to pre-programmed cell phone numbers depending on what event occur
• System arm
• System disarm
• Intruder – System in Alarm
• Delay timer On
• Strobe On
• Siren On
• Delay time-Out
• Relay e.g 1 triggered ---------------------à SMS every time relay is triggered
• Siren time-out
• Relay e.g 3 triggered -----------------------à SMS every time relay is triggered
• System Disarmed
• Strobe light reset
• Unit self test mgs every 4 days e.g. Date & time, inputs and outputs status
• AC lost and restored
When the Panel is armed:
The first time the condition changes on a input, THEN:
Send an SMS notifying that an alarm has occurred, and on which zone(s).
Siren relay should activate and stay on for 3min (or till reset) ? SMS when the siren starts and when it stops
Strobe relay will activate and stay activated till the system is reset ? an SMS should be sent to indicate that the strobe has been activated
A output relay should time-out after 10sec and wait for NEW input signal (movement in room)
If movement is found, relay should activate again.
While one relay is already triggered and another input is also violated that relay should also trigger etc.
(This would suggest intruder is moving around in area and each time an input is trigger a relay should trigger for 10sec.)
IF ? If No activity is detected then the system should stay in this mode till reset
same relay is trigger for the third time a 30 sec trigger should commence
NB: System will repeat if input is kept triggering, Till SYSTEM is Dis-armed.
NB:AT ANY STAGE A DIS-ARM signal/sms will reset system.
• When the system is armed, ONE input pin PORTA (Any spare input for switch), should override everything and activates all relays for 10 Sec, except the Siren & strobe which should function as per normal. This is for CASE TAMPER switch ? TAlarm ONLY when system is armed & this event occurs
• When a “status request” sms is send from a cell phone number that has been pre-programmed into the system, the unit should replay with status e.g "System armed or System disarmed"
• # Input pin that monitors Power, also a pulse would be send VIA relay (NO/NC pulse) when ac fail and it switch over to battery. –> sms would be sent AC Lost & AC restored
1. At any stage this system can be deactivated by sending SMS or receiver.
2. When disarm of arm the system must reply with conformation report
3. System should under NO circumstance be able to trigger output without system being armed.
4. All PIR Zones MUST BE CLOSED (high/no detection) for the system to arm.
5. Date and time should be pulled from cell phone tower. (RDC communicators does it after you send the unit a “format string from you mobile phone to unit - $1234*syt ” it will then keep date and time on sms’s