Candy Dispenser With Password Lock Powered by Arduino
by ROBO HUB in Circuits > Arduino
536 Views, 3 Favorites, 0 Comments
Candy Dispenser With Password Lock Powered by Arduino
Hello guys, In this instructables i will show you how you can make a candy dispenser!
Now you might be wondering, alas a candy dispenser there is nothing special here! well the special part here is this is not just a ordinary dispener "This dispenser is password protected"
This dispenser drops some candies only after you enter the correct code, well that's some security to save your candies from friends who loves to steal your sweets.
The logic behind the working of this dispenser is very simple, I'll explain in a common way,
Preset of codes will be fed to the uno board and it will be stored inside, when the correct(preset code is pressed) the servo gets activated thereby the candies pop out.
All these messages can be seen on the LCD display, You can also follow the instructions shown here to reset the code.
In the other way if wrong password is pressed, the servo remains idle thereby stopping the candies from coming out.
This is a great project that is useful at the parties.
I have given complete information regarding this project so that anybody could build and take most out of it.
Supplies
Complete list of components that is required to build this project
Arduino Uno Kit for this project from here
Keypad matrix 4x4
Micro Servo
LCD module with i2c
Piece of Cardboard
Strips of cardboard
Bottle top part
Ruler or acrylic strip
Hot Glue
Paper cutter
Candies
Programming cable for Uno
Arduino IDE
Circuit Diagram and Program
The circuit is not so complex here, Let me break it down for you component wise.
We are using Keypad matrix, LCD module and servo
4x4 Keypad connections
The keypad has 8 pins for rows and columns, allowing it to detect key presses.
Each pin of the keypad is connected to the following digital pin on the Arduino
Pin 1 of the keypad to Digital Pin 2
Pin 2 of the keypad to Digital Pin 3
Pin 3 of the keypad to Digital Pin 4
Pin 4 of the keypad to Digital Pin 5
Pin 5 of the keypad to Digital Pin 6
Pin 6 of the keypad to Digital Pin 7
Pin 7 of the keypad to Digital Pin 8
Pin 8 of the keypad to Digital Pin 9
16x2 LCD Display with I2c module
The connection from I2c module can be made to arduino using 4 pins and the connection are as follows
Scl to A5 and the Sda to A4, Gnd to Gnd and Vcc to 5v pin
Servo Motor connections
The Signal pin (usually yellow or white) of the servo motor connects to Digital Pin A2 on the Arduino.
VCC is connected to the 5V pin on the Arduino whereas GND is connected to the GND pin on the Arduino.
After you make these connections, You can upload the code to uno
Simply open IDE, connect to uno using cable and upload the code, Check for port and board type.
You also can simplify this circuit with a Simple small PCB, Complete your electronic projects in the best way from PCBWay
Why them? They have provided me with the best PCB and The quality is just amazing compared to other providers in the market, They also have Color PCB printing check it out
Check out their7th project design contestwhere you have a chance to participate and win exciting prizes.
Check Here for their Multicolor 3D printing service with this your project becomes more interesting
A revolutionary solution that combines the best of both rigid and flexible circuitry to elevate your electronic projects to new heights.
With their expertise in advanced manufacturing techniques, they offer a seamless integration of rigid and flexible components, ensuring enhanced reliability, durability, and space-saving benefits.
Downloads
Setting Up
After you have all the electronics assembled we can head over to give it a proper form that looks like some sort of device, so i will be following this simply on cardboard setup.
I will start by keeping all the components on this piece and making a note of placements, After this is done we can use hot glue and double sided adhesive to keep them secure.
I had a few 3d printed pieces(you can replace them with cardboard or acrylic sheets also)
The keypad matrix is thin and flexible so pressing on it would cause it to not work properly sometimes, so the solution is providing it with a back support. Use small amount of hot glue for this purpose.
The component placing is left to you, there is no thumb rule here.
After you make these adjustments you can leave some space to keep the dispenser and in the below step we will see how to make this mechanism.
Dispense Mechansim
This is the main part that controls the flow of candies and in short this part should work without any issues, The principle that we are following here is similar to the flour mill machine.
I will use the cap, i marked a small circle inside and used a cutter to trim those areas.
Now the inside circle should be glued well to the horns of the servo, Use hot glue for this purpose and make sure it is secured well because if it falls of by any chance the candies from inside of the container will come out without any control.
Attach the servo to bottle side, here the glue should not be too hot else the plastic may disfigure.
How to Dispense Candies
Using this is dispenser is simple like every other dispensers, This is kind of plug and play device.
I used transparent case to store the candies just to show you guys the working mechanism, You can replace this with any other material but make sure you are using food grade materials.
The size of container can be decided depending on your requirement.
Feed the container with your favourite candies and later you connect USB cable to uno, Now you should see the LCD module showing a message to enter the code.
By default the code is 1234 you can change this, Press * first and later continue with the passcode and press the A button.
The servo open up opening the lid of dispenser and thereby dispensing some candies, You can change the timings like how much candies should be dispensed in a single time.
Feel free to customize this model as per your taste and let me know how it went for you, Dont forget to share in the I made it section.
So gear up and build this dispenser, Thank you and happy build, Like always if you have any suggestions let me know in the discussion part.
Working Video
The dispensing of candies look soo cool like you withdraw money from ATM!
Watch the complete video tutorial of this project, You will miss many cool things if you miss to have a look at this video.
Candy dispensing is soo much fun after you make this project! If you are left with any questions feel free to leave those in the comments section, Thanks and have a great dispensing :)