DIY Food ATM that bridges the gap between excess and needy

DIY Food ATM Robot | Arduino RFID Project for Kids | MakeMindz
🏧🍱
🤖 Arduino + RFID Project for Kids

Build a DIY Food ATM
That Feeds the Needy!

Collect extra food from your community and give it to anyone who needs a meal — powered by Arduino and RFID magic! 💚

⏱️ 4–5 Hours 🔧 Difficulty: Medium 🎓 Age 12+ 💰 ~₹2,800 ❤️ Helps Real People
🌍 Did you know? 40% of food is wasted every day while millions go hungry. | Your robot can help change that! | 💡 One Food ATM can serve 20+ people a day.

🤔 What Is a Food ATM?

A Food ATM works just like a regular ATM machine — but instead of money, it stores and gives out food packets! People with extra food can drop it in, and anyone who is hungry can scan a card to collect a meal. No money needed. No questions asked. Just kindness powered by technology! 💚

Your robot will use an Arduino Uno as the brain, an RFID reader to identify donors and receivers, a servo motor to open the food hatch, and an LCD screen to show messages. It's tech that truly helps people!

1
🥡 Donor Drops Food

Scans RFID card to unlock the deposit door

2
📟 Arduino Logs It

Records food count on display and buzzes confirmation

3
🙋 Needy Person Arrives

Scans their RFID receiver card at the machine

4
🚪 Hatch Opens!

Servo motor opens food door; person collects meal

5
Count Updates

LCD shows updated food stock; buzzer beeps thanks!

💡 Real-World Inspiration: Food ATMs have already been installed in South Africa, the Philippines, and across India! Yours will be a miniature working prototype — and you could pitch it to your school or local community!
✦ ✦ ✦

🛒 Parts You'll Need

All these parts are available on Amazon India, RoboElements, or your local electronics shop:

🔵
Arduino Uno R3 The brain — runs all the logic and controls everything.
📡
MFRC522 RFID Module + Cards Reads donor and receiver cards wirelessly.
⚙️
2× SG90 Servo Motors One for the deposit door, one for the collection hatch.
📺
16×2 LCD + I²C Module Shows messages like "Food Added!" and stock count.
🔔
Active Buzzer Beeps for success, double-beeps for errors.
🟢
Green + Red LED (1 each) Green = access granted, Red = access denied.
🧱
Cardboard Box / Plywood Box The ATM body — build it like a mini vending machine.
🔌
Jumper Wires + Breadboard For connecting all components.
9V Battery or USB Power Bank Powers the Arduino and all modules.
🔩
330Ω Resistors (×2) Protect the LEDs from burning out.

⚡ Circuit Diagram

Here's how all the parts connect to the Arduino Uno. Study this carefully before wiring!

Food ATM — Full Wiring Diagram Arduino Uno 5V GND Pin 9 (Servo1) Pin 10 (Servo2) Pin 7 (Buzzer) Pin 6 (Green LED) Pin 5 (Red LED) 3.3V GND Pin 13 (SCK) Pin 12 (MISO) Pin 11 (MOSI) Pin 10 (SS) SDA → A4 SCL → A5 MFRC522 RFID VCC (3.3V) GND SCK MOSI MISO SS (SDA) Food ATM Ready! Stock: 0 meals LCD 16×2 + I²C SDA → A4 SCL → A5 Servo 1 Deposit Door SG90 / Pin 9 Servo 2 Collection Hatch SG90 / Pin 10 Buzzer Active / Pin 7 LEDs G R 330Ω resistors each LEGEND: Power SPI I²C Servo All GNDs share Arduino GND pin RFID Card Scan to donate or receive food 📶 Key Fob
📌 COMPLETE PIN REFERENCE — Arduino Uno MFRC522 RFID ──────────────────────────────────── VCC ──► 3.3V (NOT 5V — will fry the module!) GND ──► GND SCK ──► Pin 13 MOSI ──► Pin 11 MISO ──► Pin 12 SS (SDA) ──► Pin 10 (slave select) RST ──► Pin 9 (or any free digital pin) LCD 16×2 (I²C module) ────────────────────────── VCC ──► 5V GND ──► GND SDA ──► A4 SCL ──► A5 Servo Motor 1 (Deposit Door) ──────────────────── Red wire ──► 5V Brown wire ──► GND Orange wire ──► Pin 3 Servo Motor 2 (Collection Hatch) ─────────────────── Red wire ──► 5V Brown wire ──► GND Orange wire ──► Pin 5 Buzzer ─────────────────────────────────────── + (long leg) ──► Pin 7 - (short leg)──► GND Green LED → 330Ω resistor → Pin 6 (cathode to GND) Red LED → 330Ω resistor → Pin 4 (cathode to GND)
✦ ✦ ✦

🔧 Step-by-Step Build Guide

Follow these steps in order. Take photos as you go — you'll want to show this off! 📸

1
📦 Build the ATM Box

Take a large cardboard box (shoe box works great!) or cut plywood panels. You need:

  • Top slot — where food gets dropped in (deposit door)
  • Front hatch — where food comes out (collection door)
  • Front panel — where RFID reader and LCD are mounted
  • Inside shelf — cardboard tray that holds food packets

Cut two rectangular holes for the servos to swing open their doors. Hot-glue the servo bodies inside the box walls so the servo horn is exactly over each door flap.

📐 Tip: Make the deposit slot on top slightly funnel-shaped so food packets slide down easily without jamming!
2
🔌 Install Arduino IDE & Libraries

Download the Arduino IDE from arduino.cc. Then install these libraries from the Library Manager (Sketch → Include Library → Manage Libraries):

  • MFRC522 — for the RFID reader
  • LiquidCrystal_I2C — for the LCD screen
  • Servo — built into Arduino IDE already
✅ Easy Install: In Library Manager, search the name and click Install. Takes just a minute!
3
📡 Register RFID Cards

First, you need to find the unique ID of each RFID card. Upload this sketch to your Arduino, open the Serial Monitor (9600 baud), and scan each card:

read_rfid_id.ino
#include <SPI.h>
#include <MFRC522.h>

#define SS_PIN  10
#define RST_PIN  9

MFRC522 rfid(SS_PIN, RST_PIN);

void setup() {
  Serial.begin(9600);
  SPI.begin();
  rfid.PCD_Init();
  Serial.println("Scan your RFID card...");
}

void loop() {
  if (!rfid.PICC_IsNewCardPresent()) return;
  if (!rfid.PICC_ReadCardSerial())  return;

  Serial.print("Card UID: ");
  for (byte i = 0; i < rfid.uid.size; i++) {
    Serial.print(rfid.uid.uidByte[i] < 0x10 ? " 0" : " ");
    Serial.print(rfid.uid.uidByte[i], HEX);
  }
  Serial.println();
  rfid.PICC_HaltA();
}

Write down the UID shown for each card — you'll paste them into the main code next!

4
🧠 Upload the Main Food ATM Code

This is the full brain of your Food ATM. Replace DONOR_UID and RECEIVER_UID with the UIDs you found in Step 3:

food_atm_main.ino
#include <SPI.h>
#include <MFRC522.h>
#include <Servo.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

// ── Pin Definitions ────────────────────────────
#define SS_PIN      10
#define RST_PIN      9
#define SERVO1_PIN   3   // Deposit door
#define SERVO2_PIN   5   // Collection hatch
#define BUZZER_PIN   7
#define GREEN_LED    6
#define RED_LED      4

// ── ⭐ REPLACE WITH YOUR ACTUAL CARD UIDs ──────
byte DONOR_UID[]    = {0xAB, 0xCD, 0xEF, 0x12};
byte RECEIVER_UID[] = {0x34, 0x56, 0x78, 0x9A};

MFRC522 rfid(SS_PIN, RST_PIN);
Servo   depositDoor;
Servo   collectHatch;
LiquidCrystal_I2C lcd(0x27, 16, 2);

int foodStock = 0;   // meals available

// ── Setup ──────────────────────────────────────
void setup() {
  Serial.begin(9600);
  SPI.begin();
  rfid.PCD_Init();

  depositDoor.attach(SERVO1_PIN);
  collectHatch.attach(SERVO2_PIN);

  // Start with both doors closed
  depositDoor.write(0);
  collectHatch.write(0);

  pinMode(BUZZER_PIN, OUTPUT);
  pinMode(GREEN_LED,  OUTPUT);
  pinMode(RED_LED,    OUTPUT);

  lcd.init();
  lcd.backlight();
  lcd.print("Food ATM Ready!");
  lcd.setCursor(0, 1);
  lcd.print("Stock: 0 meals");

  Serial.println("Food ATM started!");
}

// ── Helpers ────────────────────────────────────
bool matchUID(byte* target, byte size) {
  if (rfid.uid.size != size) return false;
  for (byte i = 0; i < size; i++)
    if (rfid.uid.uidByte[i] != target[i]) return false;
  return true;
}

void beepSuccess() {
  digitalWrite(GREEN_LED, HIGH);
  tone(BUZZER_PIN, 1000, 200);  delay(250);
  tone(BUZZER_PIN, 1500, 200);  delay(300);
  digitalWrite(GREEN_LED, LOW);
}

void beepDeny() {
  digitalWrite(RED_LED, HIGH);
  tone(BUZZER_PIN, 400, 500);  delay(600);
  digitalWrite(RED_LED, LOW);
}

void updateLCD() {
  lcd.clear();
  lcd.print("Food ATM Ready!");
  lcd.setCursor(0, 1);
  lcd.print("Stock: ");
  lcd.print(foodStock);
  lcd.print(" meals");
}

void openDeposit() {
  lcd.clear();
  lcd.print("DONOR card OK!");
  lcd.setCursor(0, 1);
  lcd.print("Drop food in...");

  depositDoor.write(90);   // open
  beepSuccess();
  delay(5000);              // 5 sec to drop food
  depositDoor.write(0);    // close

  foodStock++;
  lcd.clear();
  lcd.print("Thank you! :)");
  lcd.setCursor(0, 1);
  lcd.print("Food added!");
  delay(2000);
  updateLCD();
}

void openCollection() {
  if (foodStock <= 0) {
    lcd.clear();
    lcd.print("Sorry! Empty.");
    lcd.setCursor(0, 1);
    lcd.print("Check back soon");
    beepDeny();
    delay(2000);
    updateLCD();
    return;
  }

  lcd.clear();
  lcd.print("Here's your meal");
  lcd.setCursor(0, 1);
  lcd.print("Collect it now!");

  collectHatch.write(90);   // open hatch
  beepSuccess();
  delay(6000);               // 6 sec to collect food
  collectHatch.write(0);    // close hatch

  foodStock--;
  lcd.clear();
  lcd.print("Stay strong! :)");
  delay(2000);
  updateLCD();
}

// ── Main Loop ──────────────────────────────────
void loop() {
  if (!rfid.PICC_IsNewCardPresent()) return;
  if (!rfid.PICC_ReadCardSerial())  return;

  if (matchUID(DONOR_UID, 4)) {
    openDeposit();               // donor card scanned
  }
  else if (matchUID(RECEIVER_UID, 4)) {
    openCollection();            // receiver card scanned
  }
  else {
    lcd.clear();
    lcd.print("Unknown card!");
    beepDeny();
    delay(1500);
    updateLCD();
  }

  rfid.PICC_HaltA();
  rfid.PCD_StopCrypto1();
}
🚀 How to run: Connect Arduino to your laptop via USB, select the right port in Arduino IDE (Tools → Port), then click Upload. Open Serial Monitor at 9600 baud to see live messages!
5
🎨 Decorate Your Food ATM

Make your Food ATM look welcoming! Decorate the box with:

  • Painted label: "Free Food ATM — Take what you need 💚"
  • Instructions printed on a card: "Donors: Scan GREEN card. Receivers: Scan YELLOW card."
  • Arrow stickers showing where to scan and where to collect
  • Solar fairy lights around the box for night visibility! ✨
☀️ Going solar? For a real outdoor installation, add a small solar panel + 18650 battery to power the Arduino all day without needing an outlet!
✦ ✦ ✦

🛠️ Troubleshooting Guide

Something not working? Don't worry — every inventor hits bumps! Check these:

🔴 Problem🟡 Likely Cause✅ Fix
LCD shows nothing I²C address wrong or contrast too low Try address 0x3F instead of 0x27. Adjust contrast pot on I²C backpack
RFID card not reading Wiring issue or wrong SS/RST pins Double-check pin 10 → SS, pin 9 → RST. RFID needs 3.3V — not 5V!
Servo doesn't open Insufficient current from Arduino 5V Power servos from external 5V (phone charger), share GND with Arduino
Card always shows "Unknown" UID in code doesn't match card Re-run the read_rfid_id sketch, copy UID exactly into the main code
Buzzer makes no sound Passive buzzer needs tone(), active needs digitalWrite Replace tone() with digitalWrite(BUZZER_PIN, HIGH/LOW) for active buzzers
Food count resets on restart Variable stored in RAM (lost on power off) Use EEPROM.write() to save foodStock permanently (upgrade idea!)
✦ ✦ ✦

🚀 Level Up Your Food ATM!

Once your basic Food ATM is working, try these awesome add-ons:

📱 WhatsApp Alerts

Send a WhatsApp message to the community group whenever stock drops below 3 meals — using ESP8266 + Twilio API.

☀️ Solar Power

Add a small solar panel and 18650 battery so it runs 24/7 outdoors without any power plug.

💾 EEPROM Memory

Save the food count to EEPROM so it doesn't reset when power goes off — use Arduino's built-in EEPROM library.

📊 Web Dashboard

Add a NodeMCU (ESP8266) and log donations to a Google Sheet so you can see how many meals were shared!

🌡️ Temperature Sensor

Add a DHT11 sensor — if it's too hot inside the box, the LCD warns donors not to leave perishable food.

🔑 Multi-donor Cards

Store up to 10 donor UIDs in an array — so a whole school or apartment block can each have their own card!

✦ ✦ ✦

❓ Frequently Asked Questions

Do I need to know coding already?

Basic Arduino (C++) knowledge helps, but you can copy-paste the code and just change the RFID UIDs. Even total beginners get it working with the steps above!

Can I use more than 2 RFID cards?

Absolutely! Just add more UID arrays and extra if-else checks in the loop. You could have a "school card", a "temple card", a "community card" — all different donors!

What kind of food can it store?

Best to use sealed, non-perishable packets — biscuits, chips, energy bars, small rice packets. Avoid fresh food in a basic box without refrigeration.

Can I use this for a school science fair?

Yes, and it's a fantastic project because it's both a technical build AND has a social impact story. Judges love projects that solve real problems!

Where can I actually install this?

Great spots: school entrance, apartment building lobby, temple, community centre, local park corner. Always get permission from the building manager first!

Building the next generation of thinkers, makers, and changemakers.

#FoodATM #ArduinoProject #KidsRobotics #RFIDProject #STEMForGood #MakeMindz #SocialRobotics #FoodDonationRobot

Comments

Product Cards
Buddy Bot eBook
⭐ New 2026 Release
Build Your
Own Robot!
3D design, wiring &
Arduino coding.
Young inventors love it!
🖨️
3D Print
All parts
Wire it
Circuit guide
💻
Code it
Arduino IDE
🤖
Watch it
Walk & react
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Website Offer
₹499 300
🌍 International: $5 USD
One-time · Instant digital delivery
🔒 Secured by Razorpay · Your data is safe
📄 Download Free Sample Copy
🔒 Secured by Razorpay · Your data is safe
🍓
Raspberry Pi Pico Mastery
21 Projects
⚡ Launch Price — 80% OFF
Learn Pico
Build 21 Projects!
MicroPython · Wokwi
IoT · Certificate
Perfect for beginners!
🖥️
Wokwi
No hardware
🐍
MicroPy
From zero
🔨
21 Projects
IoT + sensors
📄
Certificate
Verified cert
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Launch Offer
₹999 200 80% OFF
🌍 International: $5 USD
One-time · Lifetime access · No subscription
🔒 Secured by Razorpay · UPI · Cards · NetBanking
🎉

You're in!

Payment successful! Your Buddy Bot eBook is ready. Time to build!

📖 Access Your eBook Now
🎉

Enrolled!

Payment successful! Lifetime access to all 21 Pico Projects is yours!

🍓 Go to My Course