PIC18F14K50: Basic Alarm System with sEOS

After reading the “Embedded C” book from Michael J. Pont I built the alarm system where I must integrate all the techniques that the book has. I built the alarm system using the PIC18F14K50 because it has all the peripherals. At first I thought it was going to be easy because most of the libraries I needed I already had them but after moving forward in the project I saw that my libraries were designed for blocking so I could not use them for the sEOS and I had to update them, even added buffer functions to give them optimal functionality.

The software architectures used for this system were sEOS (Simple Embedded Operating System – Time based) with MSS (Multi-State System).

The modules that this system uses are:

  • FIFO buffer.
  • 4×4 Keypad with FIFO buffer.
  • UART with FIFO buffer.
  • sEOS (Time-based).
  • Alarm System.

The alarm system is designed to monitor one main door and five windows and as outputs it has one led and a buzzer speaker. The sensors are simulated with switch buttons.

Alarm functionality:

  • When you turn on the system, the alarm will enter into a DISARM state waiting for the correct password.
  • After entering the correct password the alarm will change to ARMING state where it will wait for 60s before checking the sensors so you can go out the place or if you need it to turn it off.
  • After that the alarm goes into ARMED state where it will start monitoring all the sensors.
  • If the main door is open it is going to change into DISARMING state where you have 60s to insert the correct password and disarm the alarm.
  • In case that the 60s has passed or one of the window sensors are triggered the system will change to INTRUDER state where the led and the buzzer are going to alert of intruder.

After the alarm is in INSTRUDER state it will only be disarmed with the correct password and go to DISARMED state.

Thanks for reading and happy programming.

References

Michael J. Pont, “Embedded C”, 2002

 

One Response to PIC18F14K50: Basic Alarm System with sEOS

  1. Pingback: PIC12F1840 + I2C DS1307 RTC | ProProjects

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: