![]() circuit breaker means here when it complies with the conditions then the circuit will be break. The project password-based door lock system is also known as the password-based circuit breaker. To sum up keep for loop commented, upload the sketch, change the passcode, uncomment the for loop and reupload the sketch.There is no ground and VCC wire to connect to the power.īecause there are no electronic components inside the keypad there is only the combination of circuit and wires. Then when you change the passcode go back to the skech and uncomment those lines in the setup and reupload the sketch.Įxplanation: What happens here is that everytime the Arduino starts it will go to the EEPROM and look for the correct passcode, the first time it will get unkown values stored there and can’t be used that’s why you comment those lines the first time then you change the code, chaning the code will store the new code in the EEPROM… and when you reupload the sketch with the uncommented lines the Arduino will look for the passcode in the EEPROM and will find what you stored there. Hello, did you uncomment the “for loop that contains getting the code from the EEPROM”?įirst you should upload the sketch as it is do not uncomment that line, then change the passcode from 6601 to anything 0000-9999 (if you want longer passcode change it from the program first). I hope it’s useful and if you have any problem or question leave a comment or contact my FB page… Well that was the test of the project, it’s the same for the solenoid or relay, and the push button opens from the inside if you want or you can remove it. Test Standby mode – waiting for keys or push button If you press the ‘*’ key it asks you to type the code Enter the correct code and press A to confirm A welcome message will show otherwise a wrong one System goes back to standby mode when you press ‘#’ it asks you to type the old code to change it Enter the old code and A to confirm it Old code is correct now you can change it Enter the new code and press A Confirm the new code again and press A If codes are matching it changes and stores in the EEPROM Otherwise the codes doesn’t change Just remember first time you must upload the code and change the passcode then uncomment some lines (read the code to find them (they’re in setup)) and reupload the code so it can read the passcode from the EEPROM. The codes are exactly the same the only thing is that you switch between (LOW and HIGH) to open the lock. Here you can download the codes I’ve created for the project: Keypad and EEPROM libraries are already installed. The only library I used is the LCD i²c NewLiquidCrystal: Download here N.B: You can use the relay to control any electric lock up to 250VAC, you can use it also to control the Solenoid… Libraries ![]() Wirings Wiring 1: For the solenoid use Solenoid keypad lock Wiring 2: For the relay use To make things easy to understand here’s the flowchart, it’s not completly detailed but it’s an overview of the code. The Transistor is used as a switch and it’s better to use an N-channel, the IRF510N is pretty popular when used with an Arduino, when you apply a 5V voltage across the Gate and the Source, the transistor becomes like a closed switch between the Drain and the Source, and it doesn’t need any resistor like bipolar ones.Īnd if there’s no voltage applied the transistor acts like an open switch, and this how we control the solenoid.įor the other example I’m using a 1 channel relay module, it works with 3.3V, and we control its input like controling the transistor, the only difference is that they are inverted (we’ll see in the code). ![]() The solenoid is powered by 12V external power supply, and driven by the IRF510N MOSFET transistor. I used 4×4 Keypad you can use 3×4 but you’ll need to modify somethings in the code like for confirmation I use ‘A’ you can change it to ‘*’ or ‘#’. The Push Button is meant to open the lock from inside, you can remove it if you want, the resistor is for debounce.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |