1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

electronic gate lock

Discussion in 'Homework Help' started by silent_thunder, Sep 9, 2011.

  1. Reloadron

    Reloadron Well-Known Member Most Helpful Member

    Joined:
    Dec 23, 2009
    Messages:
    6,801
    Likes:
    282
    Location:
    Cleveland, Ohio USA
    The projects I have done using a bar code reader were done on a PC, I never used a PIC chip. The link you provided looks to be a cypher lock system where the user enters a 4 digit code on a keypad. If the code is correct the door opens. The experimenting I have done with this involved using a bar code reader connected via USB to a PC. The software used a data base. When an employee scaned their bar code on their badge the software searched the data base for that employee code. If it found the code to be valid it would open a door. I used a USB DIO (Digital In / Out) device to communicate with the door strike solenoid.

    I never used a PIC to read a bar code and use for example a look up table to verify the code. In the example a single code is programmed into the PIC. I am just not sure how to interface the reader to the PIC.

    Ron
     
  2. 4pyros

    4pyros Well-Known Member Most Helpful Member

    Joined:
    Oct 22, 2010
    Messages:
    4,368
    Likes:
    282
    Location:
    Pennsylvania, USA
    You cant just connect a scanner to a door lock and expect it to work. All a bar code scanner does is read bar codes, it cant make any decisions like if it is the right bar code. You need a controller to take the info from the scanner and compair it to info from a user and make a decision to open the door or not.
     
  3. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    Barcodes are terribly un-secure. Anybody can get a friends card and photocopy it, scan/print it, take a sneaky photo of it with their cellphone then print it out later etc etc.

    This sounds completely worthless except maybe as a homework project.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Reloadron

    Reloadron Well-Known Member Most Helpful Member

    Joined:
    Dec 23, 2009
    Messages:
    6,801
    Likes:
    282
    Location:
    Cleveland, Ohio USA

    I believe this is just a school assignment of sorts.

    Ron
     
  6. silent_thunder

    silent_thunder New Member

    Joined:
    Sep 15, 2010
    Messages:
    50
    Likes:
    0
    Location:
    Mindanao, Philippines
    what particular programming language you used, sir?
    where did you connect the door strike solenoid?, so that when the time that the barcode reader scanned the bar codes and software recognizes that codes, the door will open.
     
    Last edited: Sep 18, 2011
  7. silent_thunder

    silent_thunder New Member

    Joined:
    Sep 15, 2010
    Messages:
    50
    Likes:
    0
    Location:
    Mindanao, Philippines
    what specific uController am i going to use?, and after this, am i going to program the uController to take the information from the scanner and compare to the information from a user and then open the door if it finds the information correct?
     
  8. silent_thunder

    silent_thunder New Member

    Joined:
    Sep 15, 2010
    Messages:
    50
    Likes:
    0
    Location:
    Mindanao, Philippines
    yeah, it is just a school assignment.
     
  9. silent_thunder

    silent_thunder New Member

    Joined:
    Sep 15, 2010
    Messages:
    50
    Likes:
    0
    Location:
    Mindanao, Philippines
    I think this is not a lock system where the user enters the 4 digit code, sir. Based to the description of this project, automatic operation of this when a guest pushes the doorbell and not by entering 4-digit codes.

    how could you say that it is operated through entering 4-digit code?thanks...
     
  10. 4pyros

    4pyros Well-Known Member Most Helpful Member

    Joined:
    Oct 22, 2010
    Messages:
    4,368
    Likes:
    282
    Location:
    Pennsylvania, USA
    Thats like asking me what car you should buy.
    And I said "controller" not "uController".
    I would use a PC
     
  11. silent_thunder

    silent_thunder New Member

    Joined:
    Sep 15, 2010
    Messages:
    50
    Likes:
    0
    Location:
    Mindanao, Philippines
    so that's it...and who will make the decision in opening the door or not, after the confirmation of info that the scanner scanned to the info from the user, sir?thanks..
     
    Last edited: Sep 22, 2011
  12. carbonzit

    carbonzit Active Member

    Joined:
    Mar 19, 2011
    Messages:
    1,958
    Likes:
    13
    I don't know how you got that, Ron. Did you read the page the O.P. linked to? It describes a system with no security whatsoever. As they describe the operation:
    • automatic operation when a guest pushes the doorbell, the strike is operated immediately - can be set by a switch (SW)
    • manual remote operation - by pushing a button (BUTTON), the strike is operated immediately
    • timer delayed operation by pushing the same button longer than 500 ms - the strike is operated after a pre-set time

    All that stuff about entering codes is just for setting the delay times, not security codes.

    It's still extremely unclear what the O.P. actually wants this thing to do. If they could describe it clearly, then maybe we could help them design it.
     
  13. Reloadron

    Reloadron Well-Known Member Most Helpful Member

    Joined:
    Dec 23, 2009
    Messages:
    6,801
    Likes:
    282
    Location:
    Cleveland, Ohio USA
    I used Microsoft Visual Basic. I am not a programmer type so VB works for me, simple for me to understand. I used USB and an external hardware device for the DO for the striker.

    Ron
     
  14. silent_thunder

    silent_thunder New Member

    Joined:
    Sep 15, 2010
    Messages:
    50
    Likes:
    0
    Location:
    Mindanao, Philippines
    sorry sir if it is really ambiguous to you..let me try to restate the project description..so that you will understand what I want to happen..thank you.

    So, I'll start it,
    I proposed a school project which entitled "Electronic Gate and Registration System", even though i dont know if it is the proper name for this project...

    "Electronic Gate and Registration System is a system that composed of electronic devices and one these devices is popularly called as Barcode Reader. This device is responsible for detection of Bar Codes printed in the student’s I.D. card and this device will translate it into information that is readable and understandable by human.
    Another device that will be used in the proposed system is the computer device. This device is planned to be connected to the Barcode Scanner and it will serve as the storage of information being transmitted by the scanner, This computer device consists of a software (computer program) intended to display the information provided by the scanner
    The proponents also planned to have another electronic device that will automatically open and close the gate right after the Barcode Scanner scanned the students’ I.D. card."


    -one of my questions with regards to this,
    *what particular device suitable for the door lock?
     
    Last edited: Sep 25, 2011
  15. silent_thunder

    silent_thunder New Member

    Joined:
    Sep 15, 2010
    Messages:
    50
    Likes:
    0
    Location:
    Mindanao, Philippines
    sir, if it is ok to you,,can I copy the program code that linked the software to the data base....sir, did you used Microsoft Access for the Data Base?...thank you so much for the information..
     
  16. silent_thunder

    silent_thunder New Member

    Joined:
    Sep 15, 2010
    Messages:
    50
    Likes:
    0
    Location:
    Mindanao, Philippines

    yeah it might not work if i will just connect the barcode reader to the door lock...
    but, i am looking to the possibility that this will work if i will connect the reader first to a micro controller (mounted in the PCB)to the door lock...

    how do you find this sir?,,is it a nonsense idea sir?...thank you so much
     
    Last edited: Sep 25, 2011
  17. Reloadron

    Reloadron Well-Known Member Most Helpful Member

    Joined:
    Dec 23, 2009
    Messages:
    6,801
    Likes:
    282
    Location:
    Cleveland, Ohio USA
    Hi Silent_Thunder

    The code I used was written in VB 6.0 and I did this some time back. Yes, I used Microsoft Access but I would imagine Microsoft SQL or My SQL could also be used. I'll look around and see if I still have the old project or a similar project. It amounted to using a search function once a bar code was scanned in. It was used with a PC and not a u controller.

    Ron
     
  18. silent_thunder

    silent_thunder New Member

    Joined:
    Sep 15, 2010
    Messages:
    50
    Likes:
    0
    Location:
    Mindanao, Philippines
    TO: Reloadron

    sir, thank you...
    i didnt expect that somebody who is expert like you helps the needy student like me...
    i am waiting sir for the code..i hope you will find it or similar project..
     
  19. Reloadron

    Reloadron Well-Known Member Most Helpful Member

    Joined:
    Dec 23, 2009
    Messages:
    6,801
    Likes:
    282
    Location:
    Cleveland, Ohio USA
    I will give you some example querry code this weekend and a few ideas. It will be visual basic. Unless you have Visual Basic it will be useless but I'll provide it.

    Ron
     
  20. carbonzit

    carbonzit Active Member

    Joined:
    Mar 19, 2011
    Messages:
    1,958
    Likes:
    13
    Ron, just a suggestion: Give the O.P. your code (some code, any code). They'll soon realize that it's totally unsuitable to their specific application. This might impel them to do what they should have done in the first place, which is to properly define the project.

    Just a suggestion.
     
    • Like Like x 1
  21. 4pyros

    4pyros Well-Known Member Most Helpful Member

    Joined:
    Oct 22, 2010
    Messages:
    4,368
    Likes:
    282
    Location:
    Pennsylvania, USA
    Give me some code!
    I what some code!
     

Share This Page