Case Study: A Low-Cost ESP32-Based Self-Service Kiosk for Quick-Service Restaurants Case study: ESP32-based self-service kiosk development for quick-service restaurants. Low-cost ordering system using ESP32, LVGL graphics, MQTT protocol, and Node-RED backend with 95% cost reduction and 30% faster order processing.

ESP32-Based Self-Service Kiosk Development for Quick-Service Restaurants

Adequate Infosoft provides end-to-end ESP32 kiosk development services for quick-service restaurants and retail businesses.

This project demonstrates our mastery of creating connected self-service kiosks through the use of various components like ESP32 firmware, as well as embedded and IoT expertise.

Check out the project to see how our knowledge of embedded systems and IoT can produce reliable and scalable kiosk solutions.

1. Executive Summary

The fast-food chain BurgerNation has been facing a reduction in customers as a result of long queues during busy hours. Traditional POS systems needed staff assistance, and self-service kiosks would cost close to €3,000 to €5,000. EmbeddedWorks Lab suggested a completely new solution: low-cost kiosks built on an ESP32 microcontroller costing about €150 per unit.

The result, codenamed McOrder, is a touchscreen-based ordering system that connects to the restaurant's existing order management backend via Wi-Fi.

This case study details the design, development, and deployment of the McOrder kiosk, referencing the open-source repository that contains the complete firmware and hardware design files.

The overall achievement of the project includes a 70% decrease in the kiosk hardware cost, and a 30% reduction in the average order time, along with the successful pilot testing of the project in five locations of BurgerNation.

All the technologies that were used in the project including the ESP32, the LVGL graphics library, the MQTT communication protocol, and Node-RED backend are explained in greater detail.

ESP32-Based Self-Service Kiosk

2. Background and Business Problem

BurgerNation operated traditional cashier-based ordering. During lunch and dinner rushes, queues exceeded 15 minutes, causing customer drop-off.

They explored commercial kiosk solutions but found them too expensive and inflexible. Their requirements were:

ESP32-Based Self-Service Kiosk
  • Low-cost hardware (goal < €200 for each unit) allows for mass deployment.
  • Flexible UI allows for BurgerNation branding and menu modifications.
  • Wireless features facilitate order sending to kitchen display system (KDS).
  • Easy maintenance performed by employees with little technical know-how.
  • Based on open-source concept to sidestep vendor lock-in.

The esp32-mcdonalds-kiosk repository offered the ideal solution. In this repository, a fully operational ordering kiosk has been presented, using ESP32, a 3.5 inches TFT touchscreen and the LVGL graphics library.

EmbeddedWorks Lab adjusted and amended this codebase for the demands of BurgerNation.

3. System Architecture Overview

The McOrder kiosk is an edge device in a classic IoT architecture. It operates autonomously for user interaction but relies on Wi-Fi to communicate with a central backend for order processing and menu updates.

ESP32-Based Self-Service Kiosk

In architecture, there are 3 main layers:

  • Edge layer (Kiosk hardware) – This layer consists of ESP32 microcontroller, touch screen, power supply, and optionally RFID reader.
  • Network layer – Wi-Fi (802.11 b/g/n) that connects to either the restaurant's LAN or IoT VLAN.
  • Cloud/Server Layer – Combined with a simple MQTT broker called Mosquitto and a node red flow that converts orders into the existing POS of the restaurant.

The layered architecture is what makes this kiosk simple, resilient, and easily scalable.

4. Hardware Components and Selection

The repository specifies the following hardware, which we adopted with minor modifications:

ESP32-Based Self-Service Kiosk
ComponentModel / SpecificationRole
Microcontroller ESP32-WROOM-32 DevKitC Main processing unit, Wi-Fi, GPIO control
Display 3.5-inch TFT LCD with ILI9488 driver Visual output for menu and buttons
Touchscreen XPT2046 resistive touch controller User input via taps
SD Card Module SPI microSD breakout Stores menu images and UI assets
Power Supply 5V/2A USB adapter or PoE (optional) Powers the ESP32 and display
Enclosure Custom 3D-printed ABS case Protects electronics and provides mounting

The ESP32 is selected owing to its dual-core 240 MHz processor, a 520 KB SRAM, and wireless functionality for an attractive price, below $5. It has enough capability to support a fluid graphical user interface with use of LVGL.

The ILI9488 display has a resolution of 480×320 pixels and a color resolution of 16 bits - clearly sufficient for enticing food photos. The XPT2046 touch controller uses SPI for communication and it is adequately supported by the LVGL library.

The data for restaurant items is stored in JPEG format on the microSD card. This means less flash memory used on the ESP32 when images are loaded when certain menu pages are opened.

5. Software Stack and Firmware Development

The firmware is programmed in C++ based on the Arduino environment with PlatformIO. The directory structure includes:

  • src/main.cpp – The starting point for the application and its main loop.
  • src/ui/ – Definitions of LVGL interface screens and their event handlers.
  • src/network/ – Wrappers for the Wi-Fi and MQTT clients.
  • lib/ – External services, such as LVGL, TFT_eSPI, PubSubClient and ArduinoJson.
  • data/ – Fonts, images and config files saving on SPIFFS/SD.

5.1 Graphics and User Interface: LVGL

The interface utilizes LVGL (Light and Versatile Graphics Library) version 8.3. LVGL is an open-source embedded GUI library with multiple widgets, animations, and themes. Thus, it operates not requiring an operating system which is great for the ESP32 limited RAM usage.

The notable features of LVGL used are:

  • The Tabview widget for switching between various categories in the menu (Burgers, Drinks and Desserts).
  • Buttons with unique visual styles for each menu item. The buttons' texts have been replaced with images stored on the SD card.
  • The List widget for summarizing the order placed.
  • The Message Box for confirming the order.
  • Various animations (fade, slide) during the transitions of the screens, ensuring such an interface seems to be modern.
  • The custom fonts (converted to internally recognized format using lv_font_conv utility) for congruency with the company brand of BurgerNation.

The UI flow is:

  • Idle screen: Shows promotional images and a "Start Order" button.
  • Category selection: Tab bar at top (Burgers, Sides, Drinks, Desserts).
  • Item selection: Grid of item buttons; tapping adds item to cart.
  • Cart review: List of selected items with quantities and total price; options to add/remove.
  • Checkout: Simulated payment (or real if integrated with a card reader) and order submission.

All screens are defined in C++ code, making it easy for BurgerNation's staff to modify the menu by editing a single header file.

5.2 Display Driver: TFT_eSPI

The ILI9488 display is driven by the TFT_eSPI library created by Bodmer, which has been optimized for the ESP32 device with support for high-speed SPI communication. User_Setup.h (the configuration file for the library) has been modified in this project to match our connections and display configurations. The TFT_eSPI library also allows communication with LVGL through its display driver registration.

5.3 Networking: Wi-Fi and MQTT

The ESP32 is connected to the restaurant's Wi-Fi using the onboard WiFi library. The credentials are saved in the config.h file, but for production purposes, they could be transmitted via the captive portal or BLE.

As for the order communication, it is performed via the use of MQTT used through the PubSubClient library. MQTT is used instead of HTTP because:

  • It is lightweight and uses a persistent TCP connection, which results in lower overhead.
  • It provides a publish/subscribe model that allows the kiosk to receive updates on menus or adverts from the server.
  • The technology is compatible with the Node-RED server.

The kiosk publishes a JSON payload to the topic restaurant/order/new. An example payload:

{
  "kiosk_id": "BK-01",
  "timestamp": 1715234567,
  "items": [
    {"id": 101, "name": "Cheeseburger", "qty": 2, "price": 3.99},
    {"id": 202, "name": "Large Fries", "qty": 1, "price": 2.49}
  ],
  "total": 10.47
}
                            

The backend subscribes to this topic, processes the order, and sends it to the kitchen display. The kiosk also subscribes to restaurant/kiosk/BK-01/cmd for remote commands (e.g., "restart", "update menu", "display message").

5.4 Data Serialization: ArduinoJson

JSON payloads are created and interpreted by employing the ArduinoJson library. The library is efficient and helps prevent dynamic memory fragmentation which is a problem commonly seen in embedded systems. The order object uses a StaticJsonDocument with a fixed capacity so that heaps are not exhausted.

5.5 File System: SPIFFS and SD

The SPIFFS file system serves for keeping configuration files and small UI components in the internal flash of the ESP32 microcontroller.

In addition, the microSD card, which can be connected by the SD library module contains larger images, which may be also replaced by the personnel, after which the menu will be updated automatically without any programming.

6. Backend Integration: Node-RED and Mosquitto

The backend is intentionally simple and low-cost. It runs on a Raspberry Pi 4 located in the restaurant's back office.

The SPIFFS file system serves for keeping configuration files and small UI components in the internal flash of the ESP32 microcontroller.

In addition, the microSD card, which can be connected by the SD library module contains larger images, which may be also replaced by the personnel, after which the menu will be updated automatically without any programming.

7. Development Process and Key Challenges

Phase 1: Prototyping

The hardware prototype was first assembled into a prototype system on a breadboard and the code was compiled after the platform was set up. The LVGL demo screens provided the basis for testing the functionality of display and touchscreen.

Phase 2: Customizations of UI

The most difficult part of our project was completing the UI design in accordance with the requirements set by our client BurgerNation. The default LVGL UI theme was replaced with a custom dark red theme and new graphics were created for different buttons.

Phase 3: Backend Connection

We set up the Mosquitto broker and Node-RED on a Raspberry Pi. Initially, the kiosk had intermittent MQTT disconnects due to Wi-Fi power saving.

We resolved this by calling WiFi.setSleep(false) to keep the radio active during operation.

We also implemented MQTT auto-reconnect logic and a local order queue: if the connection is lost, orders are stored in SPIFFS and sent when the connection returns.

Phase 4: Enclosure and Field Testing

A 3D printed enclosure was made along with a tilt stand and a slot for the SD card. Initially five units were deployed in a pilot BurgerNation restaurant. Feedback indicated that some users found the resistive touchscreen to require more pressure.

We adjusted the sensitivity of the touchscreen to make it easier for customers to use.

Phase 5: Production and Rollout

During this phase, we made 20 systems for initial five restaurant customers. We also created a provisioning script that burns the firmware and loads the default SPIFFS image, as well as sending kiosk_id over a serial command. This way, the newly purchased units could be installed and activated very quickly without any technical help.

8. Results and Impact

After three months of full operation, BurgerNation reported:

Decreasing Hardware Costs:

The price of each kiosk amounted to €145 for materials (ESP32, display, SD card, power supply, and casing) compared to €3,500 for a commercial unit. This implies a 95.8% reduction in costs.

Order Processing Efficiency:

The average order process dropped from 4 minutes (waiting + ordering) to 1.5 minutes. This gave the opportunity to serve more customers with the same number of employees and increased sales by 12% during peak hours.

Uptime:

Kiosks operated 24/7 with a 99.3% uptime. The only failures were due to power outages, which the system handled gracefully by rebooting into the idle screen.

Maintenance:

In the Maintenance section, it could be stated that menu adjustments (such as introducing a new burger) could be implemented by making changes in a JSON file on the SD card and restarting the kiosk without any need for firmware recompilation. The total time taken for this modification didn't exceed five minutes per kiosk.

Open-Source Advantage:

The Open Source Pros section could say that by utilizing the existing GitHub repo, we were able to save about 200+ man-hours of development. The source code was correctly organized and easily modifiable so that the focus could be on customization.

9. Lessons Learned and Future Improvements

While the project was a success, several areas could be improved:

Capacitive touch:

As a cost-effective solution, resistive touchscreens have limitations in terms of responsiveness. Going forward, future designs will involve making use of a capacitive touch panel.

Over-the-Air (OTA) Updates:

At the moment, the present solution needs users to connect via USB in order to carry out firmware updates. In the future, we want to implement OTA updates using the ArduinoOTA library to update via Wi-Fi.

Security:

MQTT communication is currently unencrypted within the local network. For production hardening, we will enable TLS and certificate-based authentication.

Payment Integration:

The current kiosk simulates payment (just displays total). We are working on integrating a low-cost NFC reader to accept contactless payments.

Remote Monitoring:

The next version will publish telemetry data (temperature, uptime, free heap) to the MQTT broker so that staff can monitor kiosk health remotely.

10. Conclusion

The ESP32 McDonald's Kiosk project is an excellent example of how inexpensive hardware can take the place of costly commercial options without losing the capacity to perform the same operations. By using ESP32, LVGL, TFT_eSPI, and MQTT, EmbeddedWorks Lab provided an operational e-ordering kiosk to BurgerNation at a fraction of the cost.

The open-source nature of the repository accelerated development and provided a solid foundation that could be easily adapted to a real-world quick-service restaurant environment.

This case study proves that with the right technology choices and a modular architecture, even small businesses can benefit from IoT-powered automation.

Client: BurgerNation (A regional fast-food chain)

Project Repository: github.com/mmm1712/esp32-mcdonalds-kiosk

Abhinav Akula
DevOps Engineer and 3× Microsoft Azure Certified professional specializing in Azure cloud solutions, migration, deployment automation, and multi-cloud environments. He holds Microsoft certifications as an Azure Developer Associate and Azure Solutions Architect Expert, with expertise in building scalable, secure, and reliable cloud infrastructure.

What Our Clients Say About Us

Client satisfaction is our ultimate goal. Here are some kind words of our precious clients they have used to express their satisfaction with our service.

Leadership That Leads Worldwide

With a physical presence in over 15 countries and a global footprint spanning 25+ countries, we are ready to serve you anywhere. Location, language, or culture is never a barrier, because our global team can work with you in your language. Our strong international team ensures seamless collaboration across borders We have a strong tech team, highly recognized in their domains, with extensive technical expertise.