Restaurant IoT – Connected Customer Experience and Management

by alboo in Circuits > Assistive Tech

33 Views, 0 Favorites, 0 Comments

Restaurant IoT – Connected Customer Experience and Management

PHOTO-2025-03-27-15-34-51.jpg

This project is an innovative IoT solution designed to improve management and customer experience in a restaurant.

The goal is to connect multiple sensors and actuators to an ESP32, enabling real-time interactions via the Blynk app. The features include detecting service requests (cleaning or manager call), rating service quality using an LED display, and monitoring the environment (temperature and humidity) with automatic actions (sound alerts, triggering webhooks).


Supplies

Required Materials

  1. ESP32 Microcontroller
  2. Analog Joystick (to trigger events via movement)
  3. Proximity Sensor (with TRIG and ECHO pins for detecting customer presence)
  4. DHT22 Sensor (for measuring temperature and humidity)
  5. WS2812 LED Strip (two strips: one for rating display, one for menu selection)
  6. Speaker (for audio alerts)
  7. Indicator LED for Order Ready
  8. Wires, Connectors, and a Breadboard
  9. Appropriate Power Supply for the ESP32 and the LEDs
  10. Enclosure / Custom Casing for a neat integration of the components

Software and Tools

  1. Arduino IDE (to program the ESP32)
  2. Blynk Account and Mobile App (for the IoT interface)
  3. Make.com (for hardware automation)
  4. Google Sheets (to log events)
  5. Arduino Libraries:
  6. WiFi and BlynkSimpleEsp32
  7. FastLED
  8. HTTPClient
  9. DHT sensor library

Environment Setup

1.Install Arduino IDE

Download and install the Arduino IDE from the official website.

2.Add ESP32 Support

Follow the procedure to add ESP32 board support in the Arduino IDE (using the board manager).

3.Install the Required Libraries

In the IDE, install the following libraries using the library manager:

  1. Blynk
  2. FastLED
  3. HTTPClient
  4. DHT (DHT sensor library)

4.Create a Blynk Account and install the mobile application.

Set up your new project using the template and retrieve your BLYNK_AUTH_TOKEN, BLYNK_TEMPLATE_ID and BLYNK_TEMPLATE_NAME.

Hardware Assembly and Connections

PHOTO-2025-03-27-15-34-51.jpg

1.Connect the ESP32

Plug your ESP32 into your computer via the USB-C cable.

2.Analog Joystick

  1. Connect the joystick's X output to pin 34 of the ESP32.

3.Rating LED Strip

  1. Connect the LED strip (WS2812) to pin 27.
  2. Configure the number of LEDs (here, 12).

4.Menu Selection LED Strip

  1. Connect the second LED strip to pin 23 (with the same number of LEDs).

5.Proximity Sensor

  1. Connect the TRIG pin to pin 12.
  2. Connect the ECHO pin to pin 13.

6.Speaker

  1. Connect the speaker to pin 19.

7.Order Ready Indicator LED

  1. Connect this LED to pin 17.

8.DHT22 Sensor (Temperature and Humidity)

  1. Connect the data pin to pin 21.
  2. Ensure you connect the power and ground as specified for the sensor.

Double-check all connections before powering up the system.


Programming the ESP32

  1. Integrate the Source Code

Use the code provided below which integrates several functionalities:

  1. Joystick detection to send Blynk events (cleaning or manager call).
  2. Service rating display via the LED strip.
  3. Proximity detection to signal the arrival of a customer.
  4. DHT22 sensor reading to measure temperature and humidity, with webhook triggers when critical thresholds are exceeded.
  5. Menu selection with both visual and audio feedback.

2.Upload the Code

  1. Copy the complete code into the Arduino IDE.
  2. Ensure that your WiFi credentials (SSID and password) are correctly set.
  3. Compile and upload the code to the ESP32.


Configuring and Customizing the Blynk App

IMG_1510.png
IMG_1511.png
IMG_1516.png
IMG_1517.png
IMG_1513.png
IMG_1512.png
IMG_1514.png
791b95b1-c05d-4e9a-a77b-d1312e0524df.jpeg
ef20191c-8f5b-4d14-8fb9-080eddbed426.jpeg

1.Create the Dashboard

  1. In the Blynk app, create a new project and configure the widgets by assigning the virtual pins used:
  2. V0 for the “Order Ready” state.
  3. V1 for service rating.
  4. V2 for event notifications (cleaning or manager call).
  5. V3 and V4 to display temperature and humidity.
  6. V5 for reset signaling.
  7. V6 for menu selection.
  8. V7 for the distance measured by the proximity sensor.


2.Customize the Dashboard

  1. Organize the widgets to provide a clear and intuitive interface for real-time monitoring.


Integration With Make.com for Automation

IMG_1479.PNG
IMG_1480.PNG
PHOTO-2025-03-27-15-34-28.jpg

To further enhance the system, we have integrated Make.com to automate the handling of proximity sensor events:

Event Trigger

When the proximity sensor detects a customer entering the restaurant (i.e., when the measured distance is below a certain threshold), the ESP32 sends an HTTP GET request to a Make.com webhook.


Make.com Automation:

The webhook triggers a scenario in Make.com that:

Logs the Event:

Records the event in a Google Sheet with the current timestamp, a message stating "new client arrived", and the exact date and hour of entry.


Sends a Telegram Notification:

Immediately sends a Telegram message to the restaurant, stating "a new client arrived at the restaurant".


This automation ensures that every client entry is documented and that the restaurant is notified in real time.


Webhook Integration With IFTTT for Spotify Automation

IMG_1507.png
IMG_1508.png

To automate music playback, we have integrated IFTTT with a webhook trigger:


Event Trigger


When an external system (e.g., a script or smart device) wants to add a song to the Spotify queue, it sends an HTTP GET request to an IFTTT webhook.


IFTTT Automation:


The webhook triggers an IFTTT scenario that:

• Adds a Track to the Spotify Queue:

The specified song is automatically queued in the current Spotify session.

• Ensures Seamless Playback:

The system enables real-time music selection without manual intervention, ideal for smart home or automated DJ setups.


This integration allows dynamic control over music playback based on external triggers.

Connecting Everything Together!

PHOTO-2025-03-27-15-34-51 (1).jpg

Testing and Deployment

1.Functionality Verification

  1. Test each feature individually:


  1. Ensure that the joystick triggers the correct events and that these events are properly logged on Blynk.
  2. Verify that the LED strips respond as expected for both service rating and menu selection.
  3. Google Sheets and sends a Telegram notification.

2.Debugging

  1. Monitor the Serial Monitor for any errors or anomalies.
  2. Adjust thresholds and delays (for example, the joystick delay) as needed.


3.Integration in the Restaurant

  1. Once all tests are successful, install the system in a real environment.
  2. Mount the designed enclosure securely, ensuring that sensors, speaker, and LEDs are properly positioned.
  3. Decorate the enclosure with the restaurant’s logo and include a QR code linking to the app for additional information.


Conclusion

Your "Restaurant IoT" system is now operational, offering a comprehensive solution for managing customer interactions in a restaurant. Using Blynk, the ESP32 communicates in real time with your mobile app, ensuring precise and interactive monitoring. Additionally, the integration with Make.com automates the logging of customer arrivals in Google Sheets and sends instant Telegram notifications to the restaurant. Feel free to share your experience, enhancements, or ideas with the community!

Happy building and enjoy your meal!