Skip to main content

Pluto Robot

1. Key Criteria & Comparative Analysis

To establish a functional ordering mechanism without the overhead of developing and publishing a dedicated mobile app or complex cloud infrastructure, several hardware and software interface options were evaluated. The goal was to identify an architecture optimized for low cost, rapid implementation, and minimal friction for end users.

The AKK drink options

Comparative Analysis of Proposed Options:

Interface Option Pros Cons Reference System Blueprint Relative Cost
1. Small Touchscreen (On-Robot) – High reliability; works offline
– Clear visual feedback for actions (e.g., PIN unlock)
– Prevents input ambiguity
– Requires physical proximity to order
– User must bend down to interact
– Inaccessible for visually impaired users
ATM / Ticket Vending Machine ~€35 – €60
2. Voice Control Module – Hands-free and intuitive interaction
– High engagement / novel user experience
– High susceptibility to ambient noise
– Complex NLP/intent-parsing setup
– Requires proximity unless using remote wireless mic
Smart Elevator / Voice Assistant ~€15 – €25
3. Messenger Bot (Telegram/WhatsApp) – Zero onboarding (uses existing messaging apps)
– Remote ordering from any distance
– Enables asynchronous chat updates (e.g., “Arriving in 2m”)
– Requires persistent internet connection on robot
– Dependent on third-party API stability
– Requires external backend message parsing
DHL/FedEx Delivery Bots Free (€0)
4. Physical Hardware Buttons – Ultimate simplicity (single press = single action)
– High durability and tactile feedback
– Near-zero processing latency
– Zero payload flexibility (fixed target per button)
– High hardware footprint (requires 1 button per desk/station)
– No status feedback returned to user
Emergency Stop / Smart Home Scene Switch ~€10 – €20 per unit
5. Local Web App via QR Code – Contactless; runs on any smartphone browser
– Dynamic UI (easily update menu/actions in code)
– Pass implicit location via URL parameters (?location=Desk_A)
– Requires user to possess a smartphone
– Dependent on local Wi-Fi connectivity
– QR stickers can be damaged over time
Digital Restaurant Menu / Hotel Ordering Free (€0)

2. Final Choice: Local Web App (QR Code)

The Local Web App via QR Code solution was selected as the primary ordering platform.

Final Decision Rationale:

    • Cost (€0): Eliminates the need for additional displays, buttons, or specialized micro-controllers; runs natively on the Raspberry Pi using open-source Python libraries (Flask / FastAPI).

    • Simplicity & UX: No installation required for users, and automatic location tagging via unique QR codes (e.g., http://robot.local/order?location=Desk_A) removes user entry errors.

    • Time Constraints: Rapid deployment requiring only a single lightweight Python script to handle routing and order queuing, seamlessly integrating with local audio output (e.g., triggering espeak-ng text-to-speech alerts on Ubuntu).

3. First Steps & Web Setup

A condensed reference for the setup and maintenance of your Tally-based ordering site.

How It Was Built

    • Platform: Tally.so (Free, unlimited submissions).

    • Layout: Built using 2 Columns (/columns) — Left side: Drink names (Text); Right side: Quantity selection (/dropdown or /number).

    • Confirmation: ‘Thank you’ page toggle turned ON at the bottom to return “Danke für deine Bestellung!” after submission.

Quick Editing Cheat Sheet

In Design Mode? Click the X in the top-right corner to exit the Customize panel and return to editing text/blocks.

Task Steps
Add a new drink Type /columns → Select 2 columns → Type drink name on the left → Add /dropdown or /number on the right.
Edit items/quantities Click directly on text to change titles. Click the Gear icon on dropdown fields to adjust selectable numbers.
Change confirmation message Scroll to bottom → Edit text under the ‘Thank you’ page line.
Publish changes Click the blue Publish button (top right).

Viewing Orders

    1. Go to your Tally Dashboard → Select project → Click Submissions.
    2. (Optional) Go to Integrations to auto-sync orders to a Google Sheet or set up Email Alerts.

  1.  

4. Raspberry Pi Deployment & Integration Guide

Here is a step-by-step guide to installing, configuring, and hosting the ordering website directly on your Raspberry Pi 5 running Ubuntu, including integration with your speech system (espeak-ng) and UART communication with the ESP32 chassis driver.

Step 1: Set Up the Python Virtual Environment

Ubuntu enforces managed Python environments. Prepare a project directory and virtual environment:

    1. Open your terminal on the Raspberry Pi 5.
    2. Create and enter your project folder:
      mkdir -p ~/robot_ws/web_server && cd ~/robot_ws/web_server
    3. Create and activate a Python virtual environment:
      python3 -m venv venv && source venv/bin/activate
    4. Install Flask and pyserial (for talking to your ESP32 driver over UART):
      pip install flask pyserial

  1.  

  1.  

  1.  

Step 2: Create the Integrated Web & Control Script

Create a file named app.py in your project folder (nano app.py) and paste the following code, which connects the web route, USB speaker TTS, and ESP32 UART serial commands:

import subprocess
import time
import serial
from flask import Flask, render_template_string, request

app = Flask(__name__)

# Initialize UART communication to ESP32 on Pi 5 (GPIO 14 TX / 15 RX)
# /dev/ttyAMA0 is the dedicated hardware PL011 UART on Pi 5
try:
    ser = serial.Serial('/dev/ttyAMA0', 115200, timeout=1)
except Exception as e:
    print(f"[UART WARN] Could not open serial port /dev/ttyAMA0: {e}")
    ser = None

order_queue = []

# HTML Interface served to smartphones
HTML_PAGE = """
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Robot Delivery</title>
    <style>
        body { font-family: Arial, sans-serif; text-align: center; padding: 40px 20px; background: #121212; color: white; }
        .card { background: #1e1e1e; padding: 30px; border-radius: 12px; max-width: 400px; margin: 0 auto; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
        h1 { color: #00e676; }
        button { background: #007bff; color: white; border: none; padding: 18px 32px; font-size: 20px; border-radius: 8px; cursor: pointer; width: 100%; margin-top: 20px; font-weight: bold; }
        button:hover { background: #0056b3; }
    </style>
</head>
<body>
    <div class="card">
        <h1>Delivery Robot</h1>
        <p>Station Location: <strong>{{ location }}</strong></p>
        <form action="/submit_order" method="post">
            <input type="hidden" name="location" value="{{ location }}">
            <button type="submit">Call Robot Here</button>
        </form>
    </div>
</body>
</html>
"""

def speak(text):
    """Triggers speech output over the USB speaker via espeak-ng."""
    try:
        subprocess.run(["espeak-ng", "-s 145", text], stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
    except Exception as e:
        print(f"[TTS ERROR] {e}")

def send_to_esp32(command):
    """Sends a formatted command string over UART to the ESP32 driver board."""
    if ser and ser.is_open:
        msg = f"{command}\n"
        ser.write(msg.encode('utf-8'))
        print(f"[UART TX -> ESP32]: {command}")

@app.route('/order')
def order_page():
    location = request.args.get('location', 'Unknown Station')
    return render_template_string(HTML_PAGE, location=location)

@app.route('/submit_order', methods=['POST'])
def handle_order():
    location = request.form.get('location', 'Unknown')
    order_queue.append(location)
    
    print(f"\n[NEW ORDER]: {location} added to queue.")
    
    # 1. Voice notification via USB Speaker
    speak(f"Order received for {location}. Starting navigation.")
    
    # 2. Hardware instruction over UART to ESP32 chassis driver
    send_to_esp32(f"GOTO:{location}")
    
    return f"""
    <body style="background:#121212; color:white; text-align:center; padding-top:50px; font-family:Arial;">
        <h1 style="color:#00e676;">Order Confirmed!</h1>
        <p>The robot is en route to <strong>{location}</strong>.</p>
    </body>
    """

if __name__ == '__main__':
    # host='0.0.0.0' allows access from any device on your local Wi-Fi network
    app.run(host='0.0.0.0', port=5000, debug=False)

Step 3: Grant UART Permissions & Enable Serial on Ubuntu

Ensure your user account can access serial ports (/dev/ttyAMA0):

    1. Add your user to the dialout group:
      sudo usermod -aG dialout $USER

    1. Enable UART0 on the Raspberry Pi 5 by editing boot parameters:
      sudo nano /boot/firmware/config.txt

    1. Add the following line at the end:
      dtparam=uart0=on

    1. Save and reboot your Pi to apply permissions:
      sudo reboot

Step 4: Run the Server and Generate Station QR Codes

    1. Re-enter your project directory, activate the environment, and run:
      cd ~/robot_ws/web_server && source venv/bin/activate && python3 app.py

    1. Note your Raspberry Pi’s local IP address (check via hostname -I or use raspberrypi.local).

    1. Generate QR codes for your target stations using any free QR code generator (or Python qrcode library):
      – QR Code 1 (Desk A): http://<YOUR_PI_IP>:5000/order?location=Desk_A
      – QR Code 2 (Desk B): http://<YOUR_PI_IP>:5000/order?location=Desk_B
      – QR Code 3 (Kitchen): http://<YOUR_PI_IP>:5000/order?location=Kitchen

Step 5: Automate Server Startup (Production Service)

To make the web server automatically boot when the Raspberry Pi powers up (via your UPS HAT):

    1. Create a systemd service file:
      sudo nano /etc/systemd/system/robot_web.service

    1. Paste the following configuration (replace ubuntu with your actual username if different):
      [Unit]
      Description=Robot Web Ordering Server
      After=network.target

      [Service]
      User=ubuntu
      WorkingDirectory=/home/ubuntu/robot_ws/web_server
      ExecStart=/home/ubuntu/robot_ws/web_server/venv/bin/python3 /home/ubuntu/robot_ws/web_server/app.py
      Restart=always
      RestartSec=5

      [Install]
      WantedBy=multi-user.target

    1. Enable and start the service:
      sudo systemctl daemon-reload && sudo systemctl enable robot_web.service && sudo systemctl start robot_web.service

Now, whenever the Raspberry Pi boots up, the ordering website runs in the background. Scanning a QR code at any station instantly alerts the robot, speaks through the USB speaker, and sends the destination command down the UART lines to your ESP32 driver board!

5. Deployment

Form edit link: https://tally.so/forms/KYZR17/edit

6. Problems

QR Code Generation and Localization

Due to time constraints, there was no time to generate the QR codes and localize the URL on the Raspberry Pi OS.