My project will be "Smart Pet Feeder":
Purpose:
The Smart Pet Feeder ensures pets are fed on time and in the right amounts, even when their owners are away. It prevents overfeeding, keeps pets healthy, and makes life easier for busy pet owners.
Inspiration:
Pets never say no to food, which can lead to overeating if not managed. This project was inspired by the idea that pets deserve consistent care, even when life gets busy for their owners.
CAD Process on Fusion 360
Designing the Box Structure :
I started by designing the sides of the box.
The dimensions of each side are 233.5 mm in height and 220 mm in width (excluding the X slots).
The X slots were designed with a thickness of 6 mm and included 3 mm cuttings for the slot.
The tabs themselves have a height of 3 mm and a width of 85 mm, positioned at the top and bottom of the side panels.
Upper X-Slot Side
Lower X-Slot Side
2. Creating the Base :
After designing the side panels, I designed the bottom base by projecting the tabs after joining them.
The base dimensions are 240 mm x 240 mm.
bottom base
bottom base with arduino mounted
3. Mounting Components
I mounted the Arduino board and projected openings for nuts and nails to secure it and the arduino ports as well.
On the front side, I mounted the ultrasonic sensor and used an extrude cut to create its opening.
4. Designing the Feeding Tube
I inserted a 3D tube into the model to guide the top cover's design.
The tube was created as follows:
I started with two arcs: one with a radius of 170 mm and the other with a radius of 112 mm.
I then extended the shape with a 70 mm straight line.
On the perpendicular plane, I sketched two concentric circles with radii of 50 mm and 40 mm, then performed a sweep operation along the path created earlier.
step 1
step 2
step 3 sweep
Front part with nails opening same for the top
5. Designing the Top Cover
After inserting the 3D tube, I projected the opening and tabs to create the top cover.
I designed a simple circular cover that can be manually rotated to keep the food fresh by sealing the top lid.
6. Designing the Front Cover
The front part includes a movable cover controlled by a servo motor, which will regulate the food dispensing mechanism.
Laser Cutting Process
Rdworks : I sent the dxf files to Mahmoud our lab specialist and adjusted them on his laptop , as LaserCad and Rdworks softwares are not applicable with my laptop.
Parameters
Cutting :
Speed: 13 , Power: 65
Speed Cut:
Speed: 200 , Power: 20
Malky ML64 Machine For Fabrication
3D Printing Process
The tube is supposed to be printed overnight ( not done yet ) , so i just prepared the files.
Electronics Components
Arduino Uno --> Controller
The main microcontroller that processes inputs and controls outputs.
9V Power Adapter --> Power Supply
Provides power to the Arduino and connected components.
Arduino R3
jumper wires
330 ohm resistor
Input :
Bluetooth Module (HC-05) :
Receives commands from the mobile app to control modes (immediate feeding or pet detection).
Ultrasonic Sensor:
Measures the distance to detect if the pet is near the feeder.
hc-05 bt module
Ultrasonic Sensor
Action components :
Servo Motor :
Controls the food dispensing mechanism and gate movement.
Buzzer
Produces a beep sound to alert the pet when food is available.
MicroServo metal gear
buzzer
Connections
Action Components
buzzer : +ve --> 5V arduino / -ve --> GND
servo motor :
VCC --> 5V rail
GND --> GND
Signal --> pin 9
Input Components
bluetooth module :
VCC --> 5V rail
GND --> GND
TX --> pin 0 ( resistors added )
RX --> pin 1
Input Components
Ultrasonic sensor
VCC --> 5V rail
GND --> GND
Trig --> pin 6
Echo --> pin 7 (resistors added same way as the bt module)
Actual Wiring
The project uses a 9V adapter as the primary power source. A voltage regulator is added to step down the voltage for the Bluetooth module and ultrasonic sensor, ensuring they operate safely at their required voltage levels.
First iterations where made on week 8 code , updates where made to make it suitable for the project.
Explanation for Code :
Library Inclusion & Pin Definitions
The Servo library is included to control the servo motor.
Pins are defined for the ultrasonic sensor (TRIG & ECHO), buzzer, and servo motor.
A mode variable is used to determine how the gate should operate.
Setup Function
Trigger Pin (TRIG) as output --> pin 6
Echo Pin (ECHO) as input --> pin 7
Buzzer Pin as output pin --> 8
The servo motor is initialized and set to 115° (closed position).
Main Loop
Bluetooth Command Handling:
The system listens for commands from the Bluetooth module:
'1' → Mode 1: Opens the gate instantly.
'2' → Mode 2: Waits for pet detection before opening the gate.
A beep sound is played upon receiving a valid command.
Mode 2: Pet Detection Logic:
The ultrasonic sensor continuously measures distance.
If a pet is detected within 2 cm to 40 cm, the gate opens once and then closes.
The gateOpened flag prevents multiple openings in Mode 2.
The mode resets to 0 after the gate operation.
First Stage : I worked on the electronics , after finishing the wiring and everything on the breadboard and made sure everything is well functioning.
Second Stage : Assembling the model and mounting the components
Power Supply: The 9V adapter provides power, and a voltage regulator ensures that the Bluetooth module and ultrasonic sensor get the correct voltage.
Ultrasonic Sensor : Used to detect the pet's presence. If the pet is within range, the sensor triggers the servo motor.
Servo Motor: Controls the gate mechanism by opening when the pet is detected.
Buzzer: Beeps once when the pet detection mode is activated, signaling the pet.
Bluetooth Module: Allows remote control via a mobile app or serial input.
Demo Video
Yes, I asked for feedback during the design phase of the 3D-printed tube. Mohanad and Yasen suggested making the tube steeper so that the food could slide down more easily, which improved the dispensing efficiency.
Additionally, Rabab helped enhance the overall design by adding a cat image and text, making it look more visually appealing. Shokraan ya Ms. Rabab!
Challenges and Problem-Solving
Designing the 3D Tube:
Initially, I watched a YouTube video to understand how to design the 3D-printed tube. After adjusting the design to fit the box model, I was later informed that it couldn't be printed as intended. Mohanad then suggested using a ready-made tube instead and designing a bracket to hold it in place, which was a more practical solution.
Ultrasonic Sensor Issues:
I encountered problems with the ultrasonic sensor readings, which were inconsistent. After some research, I found that adding a resistor or a voltage divider to the echo pin could stabilize the readings and improve accuracy.
Lesson:
Before designing for 3D printing, confirm printability early on to avoid redesigning later.
If an electronic component isn't working as expected, research voltage and wiring adjustments before assuming it's defective.
If I had more time, I would invest more effort in improving the design aesthetics to make it look nicer and more polished. Additionally, I would consider adding more features, such as a integrating weight sensors to track food levels automatically and letting the user control dispensing portions from the mobile phone.