Fun With Micros
  • Home
  • Projects
    • Digital code lock with clock n temp sensor
      • Disco lights
        • Ping Pong
          • Autonomous Guided Vehicle
          • 8085 Projects
            • Lazy85
            • Tutorials
              • Things you need to get started
                • Install MPLAB and C18
                  • Blink some LEDS
                  • Need help?
                  • Updates

                  ___Digital code lock with digital clock and temperature sensor

                  Introduction

                  Picture

                  Digital code lock can be used for security purposes on doors , cupboards , desks etc. Once installed it works without any maintenance and no need to keep key always with yourself. It also shows time, day and current room temperature on its home screen which is sensed using LM35 temperature sensor. Microcontroller keeps scanning the keypad , when * is pressed it allows code to be entered and “enter code ” is displayed on LCD, now the 4 digit code can be entered to open the door.. when correct code is entered the LCD displays “welcome” and led glows for 3 seconds otherwise “wrong code” is displayed on screen and then LCD goes back to home screen. If someone presses * to enter mode and leaves it there then the microcontroller waits for an input for 7 seconds then it goes back to home screen if no key is pressed. Same happens if incomplete code is entered and is left.Time and day can be set at start up with the help of keypad. The temperature and time displayed on the screen is refreshed every 54 seconds.


                  COMPONENTS

                  Micro-controller (PIC16F877A or any others with around 20 i/o pins)
                  16x2 LCD
                  4x3 KEYPAD
                  LM35 temperature sensor
                  and a crystal oscillator,strip board,some wires,capacitors and resistors.


                  CONNECTIONS
                  LCD is connected to Port B of PIC16F877A, pins 7,8,9,10 of lcd should be left floating as only pins 11,12,13,14 are used to send data, pin 5 of the lcd should be grounded as data has to written on lcd, pin 3 is used to set contrast of lcd, it can be connected to 5k potentiometer or directly to Vss.
                  Rows of keypad are connected to port D and are grounded via 100k resistors while columns of keypad are connected to port C via 10k resistors.
                  Temperature sensor LM35 output pin is connected to AN1.A push button switch is provided between MCLR and ground to reset the microcontroller. A led is connected to RA2 which glows when correct password is entered via keypad.A 4MHz crystal oscillator is suitable for this kind of application as precise and stable frequency is needed and at 4MHz power consumed is also not high._

                  Picture

                  Program

                  Program was written using FLOWCODE . if u know C then use one of the microchip compilers or CCS and if u dont know C and still want to program microcontrollers then use flowcode.
                  i am uploading flowcode file, asm file and the hex file , c file can be generated by the flowcode file.
                  Default code is 4658.
                  clocklocktemp.fcf
                  File Size: 45 kb
                  File Type: fcf
                  Download File

                  clocklocktemp.hex
                  File Size: 12 kb
                  File Type: hex
                  Download File

                  clocklocktemp.asm
                  File Size: 66 kb
                  File Type: asm
                  Download File

                  Create a free website with Weebly