Introduction
Human attraction towards much easier, faster and modern ways of doing work has increased hugely over time since the expected workload goes higher each day. The truth is, everyone is looking for a way to do a task just by performing a simple click or a press of a button!
Door Messaging System is a system which helps the present lifestyle of people, and allows to display a message giving the status inside the room to the outside,
· Welcome : If the room is accompanied and the person is free for a meeting.
· Busy : If the room is accompanied and the person is not ready for a meeting.
· Away : If the room is not accompanied.
so that the visitor can decide whether to come back later or to enter without disturbing the person inside. The person inside will have to choose a message, select it and leave it on display. There can be special situations such as the person could be on a leave for several days or the room could be permanently unaccompanied by anyone, etc. To give such messages, the user should be able to input the message and leave it selected.
Materials and Methods
The other materials were selected so as to match the ability of each I/O port of the PIC and expected output of the device. When selecting the materials it is also important to concentrate on the cost and how their size could affect the final product. So other than the PIC16F877A, the following components are used for system’s main functions.
- 6 push buttons (inside)
- Alphanumeric 16×2 LCD – To display the message to outside once a switch is pressed from the inside. For the person inside there is an LED per switch to indicate which message has been selected.
- 5 LEDs – Corresponds to the first 5 push buttons. Each goes ON with each button.
- Buzzer (outside) – Corresponds with the 6th message. The person inside can let a blinking message to be indicated on the display once he/she knows there is a visitor. This buzzer makes a periodic sound along with the blinking to get the visitor’s eye to the changed message. Other than the I/O capability, Capture method and the capability to serial commuication with the computer are used in this device.
- push button for door bell (outside)
- Buzzer (inside) – Will sound when a switch from the outside is pressed, so as to let the person inside know there is a visitor.
- MAX232 – An integrated circuit for serial communication with the computer.
- DB9/Serial port(Female) – This allows to connect with the serial port(male) of the computer.
- Remote Controller – Allows the user to change among messages without taking trouble to go to the device.
- IR detector – Detects that a frequency signal is received once a button of the remote controller is pressed.
Capture
Serial Communication
- Microcontroller to computer
- Computer to microcontroller
Design
The circuit was designed as matched to the above methods used. So that the IR detector is connected to RC2 as an input and the MAX232 deals with RC6 and RC7 ports. All the Other components were used as simple inputs or outputs.The LCD which has 3 control bits and 8 data bits, is conneted in 4 bit mode.
Hardware
Mother Board
Daughter Card for inside
Daughter Card for outside
Coding
Discussion
When coding for the remote controller and the IR detector, the attempt was only to identify that a signal is received. Capture module can be initialized to identify any falling edge but we know that a signal consists of several falling edges.
So there was a need to set a delay, till the whole signal passes, after the first falling edge is captured. One might think that then, when a button is pressed continuously this delay could come to effect and not allow the message to change to next until that delayed period is passed. It is true that this takes place but note that the time needed for a signal to pass is much less than the time a person takes to press a button. So there is no effect and it was observed very well during testing period.
Another additional capability given to the system is serial communication. This could allow the user to display a message different from the ones initially defined until MCLR is pressed. But it is not added to the current system.
This system is advantageous since it is much cheaper and the user does not need to have a knowledge regarding embedded systems to use the device.
Even though the system works well according to the expected results, there are some limitations.
Results
Door Messaging System – Youtube video
Limitations
- The number of messages are limited by the memory space available in PIC 16F877A.
- There is no way to skip the special message which produces a beeping sound, using only the remote controller.
References
- Chapter 3: PIC16F877 Microcontroller – Book: PIC Microcontrollers – Programming, [Online], Available: http://www.mikroe.com/eng/chapters/view/16/chapter-3-pic16f887-microcontroller/ [November 2011].
- Character Strings as Arrays, [Online], Available: http://ee.hawaii.edu/~tep/EE160/Book/chap7/subsection2.1.1.2.html [November 2011].
- Computer terminal, [Online], Available: http://en.wikipedia.org/wiki/Computer_terminal [November 2011].
- FAQ for PIC micros and Hi-Tech c, [Online], Available: http://www.microchipc.com/HiTechCFAQ/#_Toc475127528 [November 2011].
- Huang, H.-W. (2007) PIC Microcontroller: An introduction to Software & Hardware Interfacing, 2nd edition, New Delhi: Cengage Learning.
- Interfacing With Microcontrollers, [Online], Available: http://www.scribd.com/doc/4287031/Interfacing-With-Microcontrollers [November 2011].
- Introduction to the PIC 16F877A, [Online], Available: http://www.hobbyprojects.com/microcontroller-tutorials/pic16f877a/introduction-to-the-pic16f877a.html [November 2011].
- Microcontroller Projects: HD44780 16×2 Char LCD interfacing with microcontroller, [Online], Available: http://www.circuitvalley.com/2011/09/hd44780-16×2-char-lcd-interfacing-with.html [November 2011].
- My PIC Projects, [Online], Available: http://www.ke4nyv.com/picprojects.htm [November 2011].
- PIC 16F877A/P (SKU: PIC16F877A) – HVW Technologies, [Online], Available: http://www.hvwtech.com/products_view.asp?ProductID=7 [December 2011].
- RS232 Adapter – Construction Article – Page 2, [Online], Available: http://www.imagesco.com/articles/rng/random-number-generator-pg2.html [November 2011].
- RS232 Communication Using PIC18F4520’s USART – PIC Microcontroller Tutorial, [Online], Available: http://extremeelectronics.co.in/microchip-pic-tutorials/rs232-communication-using-pic18f4520s-usart-pic-microcontroller-tutorial/ [November 2011].