Easy Cheese Dispenser

by brain11111 in Circuits > Sensors

215 Views, 0 Favorites, 0 Comments

Easy Cheese Dispenser

the arduni.jpg
the pen.jpg
ir sensor power.jpg
servo power.jpg
top and middle.png
sticks 4.png
side wall.png
sensor.png
4 stick wall.png
back wall.png
can hole.png
door.png
font wall.png
sensor holer.png
sensor servo wall.png
1.jpg
2.jpg
3.jpg
4.jpg
5.jpg
6.jpg
7.jpg
8.jpg

Step 1: Cut all those pieces drawn.

Step 2: make sure the servo/sensor code and wiring is working correctly.

Step 3: Glue the 2 side walls to the back wall.

Step 4: Glue the can hole square in the middle section to the left were you will have the hatch above.

Step 5: Glue 1 of the "middle/top" pieces aligned with the can hole square. You should now see a flat area in the middle.

Step 6: Attempt to cut the hole you see on the back wall which is right above the "middle/top" piece, so that you can plug in the Arduino through it. (attempt to make it as much to the right side of the wall as possible)

Step 7: Glue the Arduino at the spot were the plug meets the hole. Then glue the bread board right behind that. (see images for clarity)

Step 8: Glue the sensor/string hole square onto the right side of the can hole. There should be a gap between the floor and the can hole. (Picture will be provided with a pen pointing towards it)

Step 9: Glue the 4 sticks that hold the can in place near the hole with just enough space to fit the can. (see pictures for how I did it) Also if it ends up not being strong enough to resist pulling then add a pieces between the left stick and the wall (most strained area) to help the sticks not break.

Step 10: Glue the wall that goes between the 4 sticks and were the Arduino will be. (MUST be glued high enough for the hatch to rest on it.)

Step 11: Glue the second "top/middle" wall to the top aligned with both sides and the back wall to make a flat roof.

Step 12: Install the hatch in the hole on the roof Make sure the latches are fitted properly. (it should be right above the can hole and be able to rest on the wall between the sticks and Arduino)

Step 13: Install the servo at the bottom right of the machine with the little block if needed to support it. Also, make sure its capable of attaching the string to it can pull it through the hole.(servos may vary on how it should be installed in the area. See images for how mine was glued)

Step 14: Install the sensor with the block to support it in the hole were the sensor will be. (image shows which hole is for the sensor)

Step 15: Connect the string to the servo and put it through the hole for the string.

Step 16: Connect all the wires to the bread board, Arduino, servo, and sensor. (image for wiring will be provided for my specific servo and sensor)

Step 17:Install the wall to cover the servo/sensor area.

Step 18: Install the front wall.

Step 19: Finished!

Supplies

2 sheets of wood (incase mistakes are made)

2 small latches for the hatch (if the latches did not come with screws, then you will need those too)

1 bread board

1 Arduino

1 servo (I bought the ANNIMOS 25kg RC Digital Servo Large Torque High Speed Full Metal Gear Waterproof 180 Degree Control Angle Red from Amazon for $20)

1 sensor (I bought the HiLetgo 10pcs IR Infrared Obstacle Avoidance Sensor Module for Arduino Smart Car Robot 3-Wire Reflective Photoelectric for Arduino Smart Car Robot from Amazon for $8)

1 thin yet durable string at 1 ft(I have no recommendations, I used some left over string from my garage door sensors.)

Wires for the sensor, servo, and Arduino/bread board.

Wood glue to glue everything together

(optional) a coating for the outer layer of the machine to look nice.

The Code

coding 21432142343124.png
libaray1.png
library 2.png

#include

Servo servo;

#define sensor 7

int angle = 0;

int detection = HIGH;

void setup()

{

servo.attach(8);

servo.write(angle);

}

int detectLst = HIGH;

void loop()

{

detection = digitalRead(sensor);

if (detection != detectLst) {

detectLst = detection;

if (detection == LOW) {

servo.write(90);

delay (2000);

servo.write(0);

}

delay (500);

}

}

ADDITIONAL

you will need a servo and a sensor library to make this work