Lesson plan

Build a pet feeder lesson plan

A first robot with a real job: a servo hatch, meals on a clock, portions weighed by a load cell, a snack button with a ration, and a log of every meal.

3 chapters, 6 lessons, about 5 hours, on the Arduino Uno R3. Every lesson runs in the browser, with nothing to install.

The unit

Objectives and materials

By the end, students can

  • A servo hatch, then meals served on the minute by a real-time clock.
  • Portions by weight, a rationed snack button, and a log of every meal.
  • Your pet’s times and portions, and a build sheet.

Materials for the whole unit

  • Arduino Uno R3
  • Buzzer
  • Character LCD with I2C backpack
  • Half breadboard
  • Hobby servo
  • Load cell with HX711
  • Pushbutton
  • Real-time clock, DS3231
  • Servo, MG996R metal gear

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 1 h 50 min

Open and on time

A servo hatch, then meals served on the minute by a real-time clock.

LessonTimeWhat students do
A servo hatchA servo opens a food hatch when you press a button and closes it again. Change how wide it opens and how long it stays open, the two numbers that decide a portion.50 min
  1. The feeder’s door
  2. Press to feed
  3. And close
  4. A smaller opening
  5. A longer portion
Schedules from an RTCA DS3231 clock keeps time even with the power off. Watch a meal served on the minute, ask for an extra one, set the clock to dinner time, and write your own schedule.60 min
  1. A clock that remembers
  2. Breakfast on the minute
  3. Watch the gate
  4. FEED NOW
  5. Jump to dinner
  6. Your pet’s schedule

Materials

  • Arduino Uno R3
  • Buzzer
  • Character LCD with I2C backpack
  • Half breadboard
  • Hobby servo
  • Pushbutton
  • Real-time clock, DS3231
  • Servo, MG996R metal gear

Check for understanding

Each student finishes "Schedules from an RTC" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Your pet’s schedule".

Chapter 2. About 2 h 30 min

Weigh and keep track

Portions by weight, a rationed snack button, and a log of every meal.

LessonTimeWhat students do
Portion by weightPut a load cell under the bowl and stop guessing. Weigh the bowl, serve a meal that closes the hatch on exactly 40 g, catch an empty hopper, and calibrate a different cell.60 min
  1. A scale under the bowl
  2. Weigh the bowl
  3. Breakfast opens the hatch
  4. Close on 40 g
  5. An empty hopper
  6. A different load cell
A manual buttonA snack button for the humans, with a daily ration so nobody overfeeds. Give a snack, run out of snacks, and set your own limit.40 min
  1. A snack
  2. Out of snacks
  3. One press, one snack
  4. Your ration
Logging mealsDid the cat eat? Keep a log of every meal, snack, skip and empty hopper, skip a meal when the bowl is still full, and read the day’s total.50 min
  1. Read the log
  2. Not hungry
  3. The skip is logged
  4. An empty hopper is logged
  5. A hungrier pet

Materials

  • Arduino Uno R3
  • Hobby servo
  • Load cell with HX711
  • Pushbutton
  • Real-time clock, DS3231

Check for understanding

Each student finishes "Logging meals" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "A hungrier pet".

Chapter 3. About 40 min

Project: a two-meal feeder

Your pet’s times and portions, and a build sheet.

LessonTimeWhat students do
Project: a two-meal feederMake the feeder yours: check dinner, set your pet’s own times and portion, and write the build sheet for a real one.40 min
  1. Dinner too
  2. Your pet’s times
  3. Your pet’s portion
  4. The build sheet

Materials

  • Arduino Uno R3
  • Hobby servo
  • Load cell with HX711
  • Pushbutton
  • Real-time clock, DS3231

Check for understanding

Each student finishes "Project: a two-meal feeder" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "The build sheet".

Your class

Teach this unit as a class

Start a class from this course and its 6 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.