DIY

Pet food dispenser

Pet food dispenser  Pet food dispenser Leaving your pets alone in the apartment for the whole day, you need to be sure that it will be fed and watered. This task is easily accomplished with a feed dispenser. Using such a device, you can be sure that the animal will be fed and not overfed.
Tools and materials: -Arduino UNO; -Power connector for the Arduino board; -Servo drive (plus screws and motor mounts); – RS26 switch – 2 pcs; -Switch; -Battery 9 V; -5-mm LED; -Wires;
-Furniture magnets – 4 pcs;
-Lumber;
-Acryl; -Epoxy resin; -Acrylic glue; -Laser cutter; -Nippers; -A tool for stripping wires;
-File;
– Soldering iron;
-Computer with Arduino IDE;
Pet food dispenser Pet food dispenser  Pet food dispenser Step one: laser cut plywood
The dispenser body is cut from plywood. The cutting files can be downloaded below.
Plywood (2) .aiPlywood (1) .ai
Pet food dispenser Pet food dispenser Step two: laser cutting of acrylic parts
The rest of the parts are cut from acrylic. The pictures below show what each part is used for.
Cutting files can be downloaded below.
Acrylic (1) .aiAcrylic (2) .aiFunnel.ai
Pet food dispenser Pet food dispenser  Pet food dispenser Step three: assembling the body
After cutting, you need to assemble the body.
All other parts, except for the top and two side parts, must be glued. The side pieces are held in place by furniture magnets and can be easily removed for maintenance. The upper part snaps into the grooves.
Pet food dispenser Pet food dispenser Pet food dispenser Step four: wheel
Now you need to glue the wheel, the feed will get into it and after spinning, the feed will pour out of it into the tray. Partitions are made inside the wheel. To turn the wheel, the master made an axle from an acrylic tube and a wooden strip.
Pet food dispenser Pet food dispenser  Pet food dispenser Step five: hopper
Now you need to glue the loading hopper. The hopper is designed as a rectangular funnel. The base is glued to the lower narrow part of the funnel.
 Pet food dispenser Pet food dispenser Pet food dispenser Pet food dispenser Pet food dispenser Step six: building
Installs the wheel inside the body. Both the funnel and the wheel are removable parts, making it easier to clean the dispenser.
Pet food dispenser Pet food dispenser Next, you need to set the switches. There are two switches and they have 12 contacts. You need to solder wires to pins 1, 4, and 7 on both switches. Another wire is soldered to the ground of one of the switches and a jumper is soldered from it to the ground of the second switch.
Pet food dispenser Next sets the servo and connects its axle to the axle of the wheel. Installs the Arduino UNO board. The LED is installed in the uppermost hole in the front panel of the case. Installs and connects the battery.
Two 12-pin switches are installed on the front panel, and a switch on the back.
Pet food dispenser Pet food dispenser Step seven: connection
Now you need to connect all electrical components.
Motor
Connect the red wire to the 5V port.
Connect the orange wire to the digital port 9.
Connect the brown wire to ground (GND).
Feed quantity switch
Connect the wire from pin 1 to digital port 2.
Connect the wire from pin 4 to digital port 3.
Connect the wire from pin 7 to digital port 4.
Timer
Connect the wire from pin 1 to digital port 5.
Connect the wire from pin 4 to digital port 6.
Connect the wire from pin 7 to digital port 7.
Switch On. On/Off
Connect one terminal of the switch to the red wire of the battery holder. Connect the second wire from the terminal to the red wire of the power connector. Connect the black wire of the battery holder to the black wire of the power connector.
LED
Connect the LED to GND and Vin, observing polarity.
Pet food dispenser Pet food dispenser Step eight: programming
To operate the dispenser, you need to program the Arduino microcontroller. The code can be downloaded below. The code is commented and can be changed according to your preference.

 #include & lt; Servo.h & gt; //Servo library int fill = 0; //default motor starting position when the continer fills. int empty = 135; //motor position when emptying the container int amount = 1; //number of cups to feed int interval = 4; //interval between feeds in seconds Servo mainServo; void setup () & # 123; //put your setup code here, to run once & # 58; mainServo.attach (9); pinMode (2, INPUT_PULLUP); //pin 1 on amount switch pinMode (3, INPUT_PULLUP); //pin 4 on amount switch pinMode (4, INPUT_PULLUP); //pin 7 on amount switch pinMode (5, INPUT_PULLUP); //pin 1 on time switch pinMode (6, INPUT_PULLUP); //pin 4 on time switch pinMode (7, INPUT_PULLUP); //pin 7 on time switch} void loop () & # 123; //put your main code here, to run repeatedly & # 58; amount = 1; //set to min value if (digitalRead (2) == LOW) & # 123; amount = 1; } else if (digitalRead (3) == LOW) & # 123; amount = 2; } else if (digitalRead (4) == LOW) & # 123; amount = 3; } runmotor (); if (digitalRead (5) == LOW) & # 123; interval = 4; } else if (digitalRead (6) == LOW) & # 123; interval = 8; } else if (digitalRead (7) == LOW) & # 123; interval = 12; } delay (interval * 3600000); } void runmotor () & # 123; for (; amount & gt; 0; amount--) & # 123; mainServo.write (empty); Serial.write (& # 34; Motor run starting & # 34;); delay (2000); while (mainServo.read () & gt; 100) & # 123; mainServo.write (fill); delay (2000); mainServo.write (empty); } mainServo.write (fill); delay (2000); Serial.write (& # 34; Motor run completed & # 34;); Serial.println (); }} & lt; br & gt;  

Source:

usamodelkina.ru

Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button