Continue to Site

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.

  • 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.

[DISCUSSION] Electronic combination lock based on PIC

Status
Not open for further replies.

alkoko111

New Member
how are everbody ..... i have a topic to discuss about togather .

I've being thinking of implement the Electronic combination lock project. therefor I decided to discuss it with you first.

Befor we go deeply , let's first discuss the component we need.

because it is based on PIC, then the first component is :
I suggest

1\ PIC16F628.
while our project will work on the AC supply of the home electricity, then :

2\ transformer . Is there a specific one should i choose ?

I suggest to add a serial LCD screen, then :

3\ HD44780-compatibe 2x16 char LCD. do you think this better ?

The last component :
4\ electrical lock of the door .


WHAT DO YOU THINK GUYS ? WHAT DO YOU SUGGEST?
 
Last edited:
There are so many unkowns in your project....

How many digits do you require for the combination? 2,4,8.....

What is the ac supply for the house? Do you need to battery back your unit for security incase of mains fail?

What does the lcd display do? What are you expecting to see?

What is the electronic bolt securing? a door?
What are its electrical requirements as this will determine the transformer needed.....

I detect a little deja vue here....
 
Using a 3 x 4 keyboard and a 4 bit LCD doesn't leave any pins left to opperate the lock.
Use a pic with more pins. 16F876 for example.
(based on my experiences using Nigel's tutorials)
 
How many digits do you require for the combination? 2,4,8.....
4 digits

What is the ac supply for the house?

220V OR 110V
Do you need to battery back your unit for security incase of mains fail?

Tell me about this please, i have no idea about this .
What is the electronic bolt securing? a door?
What are its electrical requirements as this will determine the transformer needed.....

Tell me what do you suggest, I have no idea
 
Using a 3 x 4 keyboard and a 4 bit LCD doesn't leave any pins left to opperate the lock.
Use a pic with more pins. 16F876 for example.
(based on my experiences using Nigel's tutorials)

My question was why does he need an lcd? What benefit does it provide?
the orig pic would do the job without reverting to more code
 
Last edited:
It lets you see the digits as you type them in - and it looks cool :D

and if a wrong number is put in it displays: * SYNTAX ERROR * (fits exactly in the first line), and * HANDS OFF ! * (fits exactly in the second line) :D
 
It lets you see the digits as you type them in Not if you're blind it don't :)

Since an entered PIN number or password is usually shown anyway as * * * * , means just 4 LEDS could be used, each with a * painted on it!

PIC software for reading the keys is easy peasy: Use a 3:4 matrix keypad out of a telephone. interface it to PIC. Make the PIC assert H's to the Rows. Poll the Columns (or use an ISR) looking for keypresses. When the keypress has been there for 200 ms, drop the rows one at a time until find which key is pressed. Do the 'drop rows routine' a few more times again to make sure, and good to do a do a 'best of 30' to exclude contact noise. Pulse an output to make a 'beep' sound for about 500 ms, and poke the data into whatever register is waiting for it. Hang around and wait for the key to unpress, and then wait some more time (about a second) before resuming the polling. If another keypress isn't detected after a 5 second timeout, sound a long beep to say pin entry "cancel!" If the 4 key numbers match the sequence already programmed into the PIC software, pulse the lock solenoid via mosfet driver. Which could be something like a solenoid bolt, or an small electric motor like they do on electric cat-flaps.
 
Last edited:
i found this schematic on the google designed by Peter JAKAB :
**broken link removed**

what do you think guys ?

marcbarker ..... could you clearify the algorithm of keypresses ?
 
the schematic is about exactly what i had in mind, but if i did it the BOM would be smaller. i'd pic a pic wiv osc built in.

no i won't claerify the keyscan algorithm, i haven't got time today :)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top