How to Design a Digital Queue Management Hub for Matatu Terminals Using ESPNow Local Communication

Abstract

The SmartMatatu Queue Hub is an offline digital queue management system designed to improve fairness, efficiency, and transparency at matatu terminals. The system uses multiple ESP32 microcontrollers communicating through ESP-NOW, a low-power peer-to-peer wireless protocol that does not require internet access. Drivers register their arrival by pressing a button at designated queue nodes. The queue information is transmitted to a master controller, which displays the loading order on an LCD screen. The system eliminates queue disputes, reduces passenger waiting time, and operates without recurring communication costs.


Introduction

Matatu transport is a major component of public transportation in Kenya. Most terminals still rely on manual queue management, where conductors or drivers determine loading order. This approach often leads to disagreements, queue jumping, inefficiency, and loss of time.

Digital queue management systems exist in airports, hospitals, and banks, but most require internet connectivity, cloud services, or expensive infrastructure.

This project proposes a low-cost, decentralized, and internet-independent queue management system using ESP-NOW communication between ESP32 devices.

https://images.openai.com/static-rsc-4/yNa80HdWh9J9zM0vHyF0zfeahPyDQCXkVmYPoVmpgKIYa1YCAtEe-kaqfFnmVsgFoSgDhp7iecCdp7Cn-fwjmMw2jaclfgHuX9JxWFEI_5egP4cypJAXa82Zfeotg6Krq8euoXNZwtsYh4VqCg-N2qOngdNeJ5FjsQjOvQrA8ajwE6z-vAyE04P1Sh3XadH-?purpose=fullsize
https://images.openai.com/static-rsc-4/C-IjablqWRjcIkd42j7k8vJHIwLbeH_vWIysG84BrTcaflG-2O1RAb2M-IeZiIWjHgXJEX5oehIFAEnPnE5ZBZkhgU_7DFd9fWyVLHuVgmiYqrmb8Q393zXtc-2lBLZAAho4n3jqDsko6T_4pMttRoFJX4wLUZxXRGPAb9jc88bKYxeKJrNiYW2dvhjtEN3_?purpose=fullsize
https://images.openai.com/static-rsc-4/KGc6W4UbWvlV2pSWQmqnxXr3VtlshDncu3LnsDuxoqP2oNKHTHUFRSWrL5aodRzwgGeAwK9NIIrUIoHG-FU0ZZryDZa2ORxoYw0ADaeT-MOo1OCH8V9rCencAbRhpvEgxU017oUdKtrPhp9Ct4RfaYwWigM1ZXePenNPYOAFDLaCudlPskLzyQhz_Dzyqj2h?purpose=fullsize

4


Statement of the Problem

Current queue management practices at matatu terminals face several challenges:

  • Lack of transparency in vehicle loading order
  • Frequent disputes among drivers and conductors
  • Long passenger waiting times
  • Dependence on manual supervision
  • Inability to maintain accurate records
  • High operational costs for internet-based solutions

There is a need for a low-cost, reliable, and offline queue management system that can automate loading order without requiring internet access.


Objectives

General Objective

To design and develop an offline digital queue management hub for matatu terminals using ESP-NOW communication.

Specific Objectives

  • To create a wireless queue registration system using ESP32 modules.
  • To display the loading sequence on a central LCD screen.
  • To eliminate queue manipulation and disputes.
  • To reduce waiting time for passengers and drivers.
  • To operate without internet connectivity or mobile data.

Materials and Equipment

ComponentQuantity
ESP32 Development Board4–10
Push Buttons4–10
20×4 I²C LCD Display1
Buzzer1
Breadboards2
Jumper WiresSeveral
Rechargeable Battery Pack1
Solar Panel (Optional)1
Arduino IDE Software1
USB CablesAs required

System Design

The system consists of multiple queue nodes and one master node.

Each queue node contains:

  • ESP32 microcontroller
  • Push button
  • Unique node identification number

The master node contains:

  • ESP32 microcontroller
  • LCD display
  • Queue database
  • Notification buzzer

When a driver presses a button, the node sends its identification data to the master controller through ESP-NOW.

https://images.openai.com/static-rsc-4/eDJmsJXzq0-foV2tmpRgF_nUqNhv13XXKG7O-vmDO5PG33cPKRU1gjf5U_h0h9ModM2h5i2YNg1BylB_DLSro1zcu7XIzh2Rw2gc3np2KUT1upG5Hpexz6RvLxwGRK5i1-xmLoHcErYXl7AlbRwXP5zmbBqlpiBZuEbUD-D7YxcENdGGx5e9IH_AArVN2Gip?purpose=fullsize
https://images.openai.com/static-rsc-4/p9N_mW5O4mun3FMPBYPBOOd5LLluM9KXnOj5qksNjUqOf9Qnw0-tZxkBVWy8TOZIsPGBkFC3CyziBu7QNuHlG6L5rOftfQoJqU_6bMYIwBr28Uqj5ro07iDmMINZ4WJqjadPFuSIPyRC_vFN0S803q5JpHXFPsFCOBQc1-RZGQLXb9s57VSfHHHHjpmCpOiu?purpose=fullsize
https://images.openai.com/static-rsc-4/oBN2TZxOyv87eKBxe5aJM3nLB-0P7PctU5foPjLElV3aphuEIVmpNsSMBWxY31mCEKCIvtEhihoBCqJZSRrO5jUuH8sOFxQ0V1_g3ZClHYf39MGz53lR5SC-BMYe_YHfJ9-w064VkRkFE4dioLFKYWnQXueOahEWF4EdYDZM4ZWYGxv0lSrwxOT-ZIuJXxFu?purpose=fullsize

4

System Block Diagram

Queue Node 1 ─┐
Queue Node 2 ─┼──► ESP-NOW Network ───► Master ESP32 ───► LCD Display
Queue Node 3 ─┘ │
└──► Buzzer

Methodology

Step 1: Configure the Queue Nodes

  • Program each ESP32 with a unique identification number.
  • Connect a push button to each ESP32.
  • Configure ESP-NOW communication.

Step 2: Configure the Master Node

  • Initialize ESP-NOW receiver mode.
  • Connect the LCD display.
  • Create a First-In-First-Out (FIFO) queue algorithm.

Step 3: Establish Communication

  • Register the MAC addresses of all queue nodes.
  • Test data transmission between nodes.

Step 4: Develop the Queue Logic

When a driver presses a button:

  1. The queue node sends a registration request.
  2. The master node receives the request.
  3. The queue position is assigned automatically.
  4. The LCD display updates.
  5. The buzzer alerts the next vehicle when loading begins.

Procedure

  1. Assemble all hardware components on a breadboard.
  2. Connect each push button to its corresponding ESP32.
  3. Wire the LCD display to the master ESP32.
  4. Install the ESP32 board package in Arduino IDE.
  5. Upload the sender code to each queue node.
  6. Upload the receiver code to the master node.
  7. Power all ESP32 devices.
  8. Press a queue button to simulate vehicle arrival.
  9. Observe the queue order on the LCD display.
  10. Record system response time and accuracy.
https://images.openai.com/static-rsc-4/KwGk7RUp85x1l2Ezn2eMJ29-Z7Hf7DXyAT7TtPuwe7ZX0cMpllpxVzG8-8TzCqUkEzyKk2CIc93RAKLBJyUSVpqEcXckeUFpM1GcoUJyYSbtu7ol1V9F-3mxLEM4Uidl9I2riojMoxeOrxDmlS3l-ghKEpp1a6o4bN_ctZ3icpWQI8XS5v3Pc_uaT0qqMU-B?purpose=fullsize
https://images.openai.com/static-rsc-4/5WAnW6DCgAqiYLi6mcALXR_sIdV2eh0k5lLZyzjn6VcgU0t7pufDBS43MYykWpjU-CoHDdp8zJRYDGRWo0RWOlq4t0gHsAhGzrFkMgSuiYIySTCdNM9DEd2OnzNQHet6DWKHfjHlVVxbP5R9a06qRnHiSpRu82Vvl1znUGMyzDYGrev7AzzdsCHRV6mOCBc2?purpose=fullsize
https://images.openai.com/static-rsc-4/Toc0iG2uhSnupbmHz1anmhbEQ4pmF9LohCNXXF8Gj41cfGJsS1QqSeSUMbgSU0aRuQwMEfRuXiSQ-XNTMuHYvPIHD069l-rxrOIc9tlrZ8EA2nVUyuy4IycPJQsn0XaYHVkAKo2tDlBuu3pH8hVP9F9NMgUrgpGjO3K19RGOdvVgeU4KuKzIwALVdbHGdVbi?purpose=fullsize

4


Expected Results

The system should:

  • Register vehicles within one second.
  • Maintain accurate loading order.
  • Reject duplicate registrations.
  • Operate without internet access.
  • Reduce queue disputes.
  • Improve passenger flow.

Example LCD output:

NOW LOADING: KDM 482P

QUEUE:
1. KDA 105N
2. KCT 224M
3. KDJ 901K

Data Collection

The following data should be collected during testing:

ParameterMeasurement
Response timeSeconds
Queue accuracyPercentage
Communication rangeMeters
Number of successful transmissionsCount
Duplicate registration errorsCount

Results and Discussion

Compare the manual system with the digital system using:

  • Average loading time
  • Number of disputes per day
  • Passenger waiting time
  • Operational costs

Discuss whether the system met the project objectives.


Conclusion

The SmartMatatu Queue Hub demonstrates that offline wireless communication can improve efficiency in public transport terminals. By using ESP-NOW technology, the system eliminates the need for internet connectivity while ensuring fair and transparent queue management.


Recommendations

Future improvements may include:

  • QR code vehicle registration
  • LED display boards for passengers
  • Voice announcements
  • Route analytics dashboard
  • Integration with digital payment systems
  • Solar-powered operation
https://images.openai.com/static-rsc-4/mgcNsmsvTpqOtJ0CYoLO7PHyvnXxqmTItGzeRnlqxHOvKHC-xEcQ9t63CLyrtSA-WCD5o1mjYxJmJN0NvtpUh1m6IZH_tXWbkbfbGI5yU_jVTWOMrQPlfLxzmdvCQ3UQnmE-V3i7P3eOTMXbGulY-Ge1icki_IeL5zC-H2UxsFAd4S3uelzTH-NCqw8lXLyk?purpose=fullsize
https://images.openai.com/static-rsc-4/SzbA0_ZDtOIYcz-i_YXcULbHuYBvuzkttuF0_HsIztSoJ_xyN6QfvK7BNSORoQqSlSjkz1DsE8SlFfxGsQ-GsmXDfyb5m0UuekhwzVWCSkp-8bHjPVxjV-piXFRLnJJoRoneJ7-yDP2u36TqvrwgrcxJ9CDSBHZe-mb1hbeGKlyXfTD1PbES6mD_PDOpO6UB?purpose=fullsize
https://images.openai.com/static-rsc-4/fR6HCgqKV18nz9Vijs2Aute7ZZwV-KhJg6J_3O6jMHG1lysET9zP84qM7hIAxHYHKBjGcoL1yXLs3GEkcaqgcR1-yxiG7lvZnwp7yxCEjuqBjSgVOHDe3-JCgtqIZYZPeNsbCO4Yv3aaAu6G9mx37IGo1Sx6Ik3wh0mQQVnl3zLx3LEIWvocvlN3oIwYfvdA?purpose=fullsize

4


  • mbeva

    Dominic Mbeva is a science teacher, experienced researcher, innovator, and creative technologist with expertise in STEM education, digital media, and scientific research. As a Kenya Science and Engineering Fair (KSEF) advisor and projects manager, he mentors young scientists, guiding them in developing award-winning innovations. He is also an IC Technorat, leading advancements in science and technology. Beyond education, Dominic is a skilled photographer and video editor, using visual storytelling to make science more engaging. His philosophy, “If you take care of minutes, hours will take care of themselves,” reflects his belief in consistent effort, strategic thinking, and innovation to drive success in both research and creativity.

    Related Posts

    How to Construct an Automated Black Soldier Fly Larvae Bioreactor with Active Ammonia Scrubbing

    Introduction Rapid urbanization and population growth have led to increased generation of organic waste from households, markets, schools, and food processing facilities. Improper disposal of biodegradable waste contributes to greenhouse…

    Read more

    How to Design a Thermo-Electric Stove Charger Using Seebeck Generator Modules and Waste Cooking Heat

    Introduction Access to reliable electricity remains a challenge for many households that rely on charcoal and firewood stoves for daily cooking. Mobile phones have become essential tools for communication, mobile…

    Read more

    Leave a Reply

    Your email address will not be published. Required fields are marked *