Muteesa I Royal University logo

Muteesa I Royal University

UnverifiedUnverified
Private · DayMasaka City, Masaka
All news

Muteesa I Royal University ·

SmartPath: A Low-Cost Edge AI and IoT-Based Vehicle-Actuated

SmartPath: A Low-Cost Edge AI and IoT-Based Vehicle-Actuated

MRUJ

About

Author guidelines

Peer review & ethics

Editorial Board

Issues

Submit a manuscript

Home

Research

Journal

Issues

Volume 1, Issue 1 [November 2026]

Article

SmartPath: A Low-Cost Edge AI and IoT-Based Vehicle-Actuated Traffic Signal Control System with Real-Time Web Monitoring for Urban Intersections in Developing Cities: A Case Study of Masaka City, Uganda

Muteesa I Royal University Journal

Volume 1, Issue 1 [November 2026]

eISSN: ---   DOI: https://doi.org/10.64855/mruj.2026.1.1.002

Nyombi Shafic *

Muteesa I Royal University, Faculty of Science, Technology, Engineering, Art and Design, Department of Engineering, Kampala, Uganda nyombis23@mru.ac.ug

Balinda Roland Mujungu

Muteesa I Royal University, Faculty of Science, Technology, Engineering, Art and Design, Department of Engineering, Kampala, Uganda rmbalinda@mru.ac.ug

Kavule Josephat

Muteesa I Royal University, Faculty of Science, Technology, Engineering, Art and Design, Department of Engineering, Kampala, Uganda kavulej24@mru.ac.ug

Kukundakwe Fortunate

Muteesa I Royal University, Faculty of Science, Technology, Engineering, Art and Design, Department of Engineering, Kampala, Uganda kukundafortune2017@gmail.com

Katongole Emmanuel

Lecturer, Muteesa I Royal University, Faculty of Science, Technology, Engineering, Art and Design, Department of Engineering, Kampala, Uganda katongolee25@mru.ac.ug

Muhwezi Patric

Muteesa I Royal University, Faculty of Science, Technology, Engineering, Art and Design, Department of Engineering, Kampala, Uganda patricmuhwezi@gmail.com

* Corresponding author: nyombis23@mru.ac.ug

Download PDF (17 pages) Read online

How to cite this article

Nyombi et.al. (2026). SmartPath: A Low-Cost Edge AI and IoT-Based Vehicle-Actuated Traffic Signal Control System with Real-Time Web Monitoring for Urban Intersections in Developing Cities: A Case Study of Masaka City, Uganda. Muteesa I Royal University Journal, Vol. 1 (1) DOI: https://doi.org/10.64855/mruj.2026.1.1.002

Copy citation

Abstract

Uncontrolled intersections and fixed-time signals cause avoidable delays and crashes in rapidly urbanising cities, and commuters lack real-time congestion information. This project aimed to design and evaluate SmartPath, a low-cost, solar-powered, IoT-based traffic-signal controller with web monitoring for the Broadway Road–Edward Avenue T-intersection in Masaka City, Uganda. An ESP32-CAM runs a convolutional neural network trained on Edge Impulse to classify cars and motorcycles. An ESP32 uses the detections for vehicle-actuated control that skips empty phases and ends each green when the queue clears, within a Webster plan derived from a twelve-hour manual count. A web application refreshes every two seconds, and the solar subsystem is sized for 48 hours of autonomy. The classifier reached 84.2% accuracy, and the prototype electronics cost UGX 335,000 (about USD 89). In a 30-replication simulation, SmartPath cut average delay by 34% at peak demand and by 61–76% at lower demand relative to the Webster peak plan, and by 25–37% relative to a re-timed plan. These gains depend on reliable detection. SmartPath is a practical, affordable option for secondary cities, pending field trials.

Keywords: Vehicle-actuated traffic control edge AI ESP32-CAM Internet of Things Masaka City

Introduction and Background

Efficient road transportation supports nations' economic and social development by facilitating the movement of people, goods, and services (Uganda Police Force, 2026). However, in rapidly urbanizing developing countries, vehicle ownership continues to grow faster than investment in transport infrastructure, leading to chronic congestion and higher rates of intersection accidents. The World Health Organization identifies road-traffic injuries as a leading cause of death worldwide, particularly among young adults. Meanwhile, the Uganda Police Force’s Annual Traffic and Crime Statistics Report attributes approximately fifteen deaths per day to road crashes nationwide (Uganda Police Force, 2026).

Masaka City, Uganda, exemplifies these challenges. Its major intersections, notably the junction of Broadway Road and Edward Avenue, lack traffic-control management and do not adapt to real-time demand fluctuations.

Advances in low-cost embedded systems and edge artificial intelligence (AI) have made vision-based traffic control feasible in resource-constrained settings. This project presents the design, implementation, and simulation-based evaluation of SmartPath, a solar-powered traffic signal control and web monitoring system built around the ESP32 and ESP32-CAM microcontroller platforms. SmartPath detects vehicles using an on-device convolutional neural network (CNN) and uses these detections to implement vehicle-actuated control within a Webster timing envelope.

Problem Statement

The Broadway Road–Edward Avenue junction does not adjust to real-time traffic demand. As a result, low-volume approaches face unnecessary delays, while high-volume approaches experience excessive queues, and commuters cannot check live congestion before setting out. Established adaptive systems rely on loop detectors and central computers, making them costly for secondary cities. Meanwhile, reported low-cost systems have generally been compared only with fixed-time baselines and lack solar autonomy or a commuter interface. This creates a need for a low-cost, solar-powered controller that adapts to measured demand within limits established by field data.

Aim and Objectives

The aim of the project was to design, prototype, and evaluate a low-cost, solar-powered, vehicle-actuated traffic-signal controller with real-time web monitoring for the Broadway Road–Edward Avenue T-intersection in Masaka City. The specific objectives were to:

derive a field-calibrated signal-timing plan for the junction from a twelve-hour manual traffic count and Webster’s method, which also sets the maximum green of the actuated controller;

develop an edge-deployed CNN vehicle classifier (cars and motorcycles) on Edge Impulse, quantized for on-device inference on the ESP32-CAM;

design a vehicle-actuated control logic that skips empty phases and ends each green when the queue clears, bounded by the Webster plan;

size a solar-powered subsystem for 48 hours of autonomous operation, suited to environments with unreliable grid supply;

build a low-cost prototype integrating vehicle detection, camera-based vehicle-actuated control and a live web dashboard refreshed every two seconds; and

evaluate SmartPath in a reproducible simulation with random arrivals and confidence intervals, comparing it with fixed-time, re-timed, and density-rule control, and testing its sensitivity to missed detections, false alarms, and the camera reporting interval.

Significance of the Project

Technically, the project shows that vehicle detection and signal actuation can run on microcontroller-class hardware without cloud connectivity, and that actuated control can be kept within field-calibrated timing limits. Economically, the prototype electronics cost about USD 89, compared with inductive-loop or radar-based systems that require substantial civil works. Environmentally, shorter delays and queues imply less time spent idling at the junction, although fuel use and emissions were not measured. Socially, the live dashboard lets commuters choose routes before and during a journey, and better-managed junctions address a national road-safety problem; the safety benefit itself has not been quantified.

Related literature and existing solutions

Traffic management traditionally relies on manual control by traffic officers or on fixed-time signal controllers operating on predetermined cycles derived from classical methods such as Webster’s optimum-cycle-length formulation (Webster & Cobbe, 1966; Webster, 1958). Fixed-time plans are simple and low-cost, but they are tuned for a single demand level: low-volume approaches receive unnecessary green time, while congested approaches experience excessive delay when demand departs from the design value. Standard practice therefore uses several time-of-day plans or vehicle-actuated operation, in which detectors extend or terminate green time according to measured demand (Transportation Research Board, 2016).

Adaptive control systems such as SCOOT (Hunt et al., 1982) and SCATS (Sims & Dobinson, 1980) continuously measure demand and adjust splits, cycle length, and offsets; later, real-time optimisation architectures extended this idea (Mirchandani & Head, 2001). Papageorgiou et al. (2003) and Wei et al. (2019) review control strategies and learning-based methods. These systems rely on loop detectors and central computers, which are costly for secondary cities. Pardeshi et al. (2026) demonstrated an ESP32-based density-prioritization algorithm that reduced average vehicle waiting time compared with fixed-cycle signals. Such low-cost systems typically comprise a sensing subsystem, a signal-control subsystem, and a decision algorithm, an architecture adopted in the present work.

Camera-based vision offers lower installation costs, wider coverage, and the ability to classify vehicle types compared with inductive-loop or ultrasonic sensors. Shelke et al. (2024) showed that adaptive signal systems using real-time vehicle-density estimation from video improve intersection performance relative to static timing plans. Raza et al. (2025) combined YOLO-based edge detection with adaptive control to reduce delay compared with fixed-time systems. Frameworks such as Edge Impulse and TensorFlow Lite Micro (David et al., 2021) enable lightweight CNNs, quantized to 8-bit integers (Jacob et al., 2018), to run directly on microcontroller-class hardware such as the ESP32-CAM, eliminating the need for cloud connectivity and reducing latency and operating costs.

Intelligent Transportation Systems (ITS) integrate communication, computing, and transportation infrastructure to improve safety and efficiency through adaptive signal control, incident detection, route guidance, and smart parking. The Internet of Things (IoT) is a foundational enabler of ITS, allowing distributed, low-power devices to sense, transmit, and act on traffic data in real time (Atzori et al., 2010). Low-cost microcontrollers such as the ESP32 make IoT-based traffic infrastructure economically viable for municipalities with constrained budgets. Web-based monitoring platforms extend the benefits of sensing infrastructure to end users by displaying live congestion levels. Antarina and Gunanto (2026) demonstrated an ESP32-CAM-based automatic traffic-light prototype, showing that this hardware can support camera-driven signal control.

In Uganda, Balikuddembe et al. (2017) and Walekhwa et al. (2022) confirm that road-traffic crashes remain a persistent national challenge driven by human error, poor traffic management, and road-environment factors. To the authors’ knowledge, deployed adaptive, vision-based traffic control remains rare outside the capital, and Masaka City continues to rely on manual control.

Research gap: Table 1 and the literature confirm the technical viability of adaptive, vision-based, IoT-enabled traffic control, but low-cost implementations are largely evaluated only against fixed-time baselines, without comparison to retimed plans, solar autonomy, or a commuter interface. Secondary cities in developing countries, such as Masaka, lack low-cost, solar-powered, field-validated adaptive traffic solutions. SmartPath addresses this gap by combining edge-AI vehicle detection, actuated control bounded by field-measured Webster timing, solar autonomy, and live web dissemination.

Table 1. Literature comparison

Study

Location

Detection

Controller

Edge AI

Solar

Web

Cost

Pardeshi et al. (2026).

n/r

Density

ESP32

n/r

Raza et al. (2025).

n/r

YOLO

Adaptive

Yes

n/r

Antarina & Gunanto (2026).

n/r

ESP32-CAM

Signal

Limited

n/r

SmartPath (this work)

Masaka

CNN

Actuated

Yes

Yes

Yes

UGX 335,000

Note. n/r = not reported in the cited work. Web = live web monitoring.

Methodology and system design

Materials, Components and Equipment

The prototype uses three ESP32 controllers, one ESP32-CAM module, three sets of traffic-light LED modules, a MiFi router for local Wi-Fi and internet backhaul, and a regulated 5 V solar-powered supply, along with jumper wires, breadboards, 9 V batteries, and a 3.3 V/5 V breadboard power supply. The solar subsystem consists of a 400 W panel, a 250 Ah LiFePO4 battery bank, and a 50 A MPPT charge controller (Section 3.4). We trained the vehicle-detection model on the Edge Impulse platform; wrote the controller and camera firmware for the Arduino environment; developed the web application in HTML, CSS, and JavaScript; and built the simulation in Python. Table 2 lists the prototype electronics and their costs; it excludes the solar panel, battery, MPPT controller, poles, and cabinets.

Table 2. Prototype bill of materials

Item

Qty

Unit (UGX)

Total (UGX)

ESP32 controller

50,000

150,000

ESP32-CAM module

40,000

40,000

Traffic-light LED modules

3 sets

5,000

15,000

Jumper wires/breadboards

20,000

9 V batteries

5,000

20,000

3.3 V/5 V breadboard supply

20,000

40,000

Other expenses

50,000

Total

335,000

System/Project Design

SmartPath has five components (Figure 1): (1) an ESP32-CAM vehicle-detection unit; (2) an ESP32 traffic-light controller; (3) three traffic-light units, one per approach; (4) a MiFi router providing local Wi-Fi and internet backhaul; and (5) a regulated 5 V power supply powered by solar energy. The ESP32-CAM continuously captures images of the intersection and runs an on-device CNN to classify vehicles. The detections are transmitted over Wi-Fi to the ESP32 controller, which implements the signal-control logic of Section 3.4, drives the three traffic-light units via relay/driver circuitry, and forwards status data to the web platform via the MiFi router. Figure 2 shows the control system, and Figure 3 presents an artist’s impression of the installed system.

Figure 1. SmartPath system architecture.

Figure 2. SmartPath control system.

Figure 3. Artist impression of the SmartPath project.

Design and Development Process

Study area and data collection: The study site is the T-intersection of Broadway Road and Edward Avenue in Masaka City, with two-way traffic on Broadway Road and a single merging approach from Edward Avenue. A twelve-hour manual traffic count captured inflow from each approach. The survey identified two peak periods, 08:00–09:00 and 17:00–18:00, coinciding with commuting patterns. Peak-hour approach flows were 700 veh/h for TL1 (Masaka→Nyendo), 600 veh/h for TL2 (Nyendo→Masaka), and 300 veh/h for TL3 (Edward Avenue), for a total of 1,600 veh/h, with Broadway Road carrying the highest volume. These data were used to confirm the need for adaptive control and to parameterize the Webster model in Section 3.4. Long-term historical traffic datasets for Masaka City were unavailable, so we used field observations instead.

Vehicle-detection model: A CNN (Figure 5) was trained on the Edge Impulse platform to classify two vehicle categories, cars and motorcycles; the Edge Impulse workflow is shown in Figure 4. A dataset of 500 images per class was collected with the ESP32-CAM under varied viewing angles, distances, and lighting conditions and labeled in Edge Impulse Studio. The network was trained for 50 epochs with a batch size of 32 and a learning rate of 5×10 -4 . The model was then optimized for the ESP32-CAM by (i) reducing the input image resolution, (ii) 8-bit integer quantization of the weights (Jacob et al., 2018), (iii) selecting a lightweight architecture, and (iv) profiling memory and latency on the device, before export as an Arduino library for on-device inference. From the detections, the controller derives, for each approach, whether at least one vehicle is waiting and how many; the first feeds the actuated logic, and the count is also sent to the dashboard.

Figure 4. Image detection process.

Figure 5. Image detection artificial neural network.

Software and web application: The software comprises three cooperating parts: (1) vehicle-detection software on the ESP32-CAM (image acquisition, inference, and transmission of counts); (2) signal-control software on the ESP32 (detection reception, timing computation, light actuation, and status upload); and (3) a web subsystem that renders live traffic status. The ESP32-CAM acts as an HTTP client, periodically sending vehicle counts and a timestamp to the controller over Wi-Fi. The commuter-facing web application was developed in HTML, CSS, and JavaScript (Figure 6) and is accessible from any internet-enabled smartphone, tablet, or computer via the MiFi router. Client-side JavaScript polls the controller every two seconds and renders per-approach congestion status using a color-coded legend (low/medium/high), enabling commuters to make routing decisions before or during a journey.

Figure 6. Website front page.

Prototype construction: Because the prototype was built at table scale, it represents the junction with three LED traffic-light units driven by the ESP32 controller (Figure 7).

Figure 7. Prototype of the SmartPath project.

Design Calculations, Modeling or Simulation

Signal-timing baseline (Webster’s method): Webster’s method (Webster, 1958) was used to derive the static timing baseline, which computes an optimum cycle length from total lost time and the sum of critical flow ratios. The field flows of 700, 600 and 300 veh/h for TL1, TL2 and TL3, with an assumed saturation flow of 1,800 veh/h per lane, give flow ratios y 1 = 0.389, y 2 = 0.333 and y 3 = 0.167, and Y = Σy i = 0.889. With a 3 s yellow and 1 s all-red interval in each of the three phases, the total lost time is L = 12 s. Webster’s optimum cycle length is

C 0 = (1.5L + 5) / (1 − Y) ≈ 207 s (1)

giving an effective green time G = C 0 − L = 195 s, divided among the phases in proportion to their flow ratios, g i = (y i /Y)·G. The red time of each approach is the cycle length minus its green and yellow times (Table 3). The 207 s cycle is longer than the 90–120 s normally used in practice because Y = 0.889 leaves little spare capacity; it is used here exactly as the formula gives it. In SmartPath, these greens are not fixed: they become the maximum greens of the actuated controller.

Table 3. Webster-derived signal timing plan

Approach

Light

Green (s)

Yellow (s)

Red (s)

Masaka → Nyendo

TL1

119

Nyendo → Masaka

TL2

131

Edward Avenue

TL3

167

Solar power subsystem sizing. To sustain operation for 48 hours without solar charging (two fully overcast days), we assessed the traffic-light unit, control unit, and router load at a baseline of 840 Wh/day. Including a 25% design margin for system losses:

E design = 840 × 1.25 = 1050 Wh/day (2)

Using a local peak-sun-hour value of 5.5 h for Masaka City, the minimum photovoltaic rating is

P PV = 1050 / 5.5 ≈ 191 W (3)

A 50% recovery margin was applied so that the array can recharge the battery promptly after cloudy periods, giving about 287 W; a standard 400 W panel was selected. For a 12 V LiFePO4 bank at 80% depth of discharge with two days of autonomy,

C bat = (1050 × 2) / (12 × 0.8) ≈ 218.75 Ah (4)

So a 250 Ah battery was selected. The charge-controller current was computed from the panel rating and system voltage (I = 400/12 ≈ 33.3 A), and a 25% safety margin raised the design current to about 41.7 A, leading to a 12 V, 50 A MPPT controller. Table 4 summarizes the specification. The 48-hour autonomy is a design target; it has not yet been verified experimentally.

Table 4. Final solar power subsystem design

Component

Specification

Solar panel

12 V, 400 W

Battery bank

12 V, 250 Ah LiFePO4

Charge controller

12 V, 50 A MPPT

Vehicle-actuated control logic: Figure 8 shows the flow chart of the prototype controller. SmartPath extends this skip-if-empty logic to full vehicle-actuated control. Approaches are served in the fixed order TL1, TL2, TL3. Before each phase, the controller checks the latest camera report: if no vehicle is waiting, the phase is skipped. Otherwise, the approach receives a minimum green; the green then extends as long as vehicles are seen and ends when no vehicle is seen for a gap of 3 s or when the maximum green is reached. The maximum green of each approach is its Webster green of Table 3 (85, 73 and 37 s), so the controller can never give an approach more green than the field-calibrated plan. Yellow (3 s) and all-red (1 s) are unchanged. The parameters are listed in Table 5.

Figure 8. Flow chart of the SmartPath prototype controller for one approach (skip-if-empty logic extended by the actuated logic described in the text).

Table 5. Parameters of the actuated controller

Parameter

Value

Camera report interval

2 s

Minimum green

8 s

Gap before green ends

3 s (6 s, robust)

Maximum green (TL1/TL2/TL3)

85 / 73 / 37 s

Skip a phase with no vehicle

yes (2 frames, robust)

Yellow / all-red

3 s / 1 s

Note. “Robust” is the more conservative setting examined in Section 4.6.

Simulation model: Because we built the prototype at table scale and could not run a field trial, we compared the controllers in a discrete-time queue simulation of the same T-intersection with a one-second time step. The model is a Python program (smartpath_sim.py, supplied as supplementary material and archived on Zenodo; nyombiSHAFIK, 2026) that follows the Webster model above. Vehicles arrive at each approach as a Poisson process, queue, and discharge at the saturation flow of 1,800 veh/h (0.5 veh/s) while the approach has a green. Each green has a 2 s start-up loss, and discharge continues for 2 s into the 3 s yellow, so the effective lost time is 4 s per phase, matching L = 12 s above. Each run lasts 3,600 s from an empty junction. Every scenario was replicated 30 times, with all controllers seeing the same arrivals in each replication (common random numbers). Results are reported as means with 95% confidence intervals (Student’s t). A microscopic study in SUMO (Lopez et al., 2018) is planned .

Testing and Evaluation

Classifier: The quantized car/motorcycle classifier was evaluated on the Edge Impulse test set using accuracy, precision, and recall.

Demand scenarios: Four demand scenarios scale the surveyed approach volumes (Table 6). In the surge scenario, demand on TL1 is multiplied by 1.8 between 300 s and 480 s.

Table 6. Demand scenarios

Scenario

Demand

TL1 / TL2 / TL3 (veh/h)

Arrivals/run

1 Peak

100%

700 / 600 / 300

1605

2 Moderate

70%

490 / 420 / 210

1116

3 Off-peak

40%

280 / 240 / 120

637

4 Surge

70%

490 / 420 / 210

1143

Note. Surge: TL1 demand × 1.8 for 300–480 s.

Controllers compared: Four controllers are compared. (1) Webster peak plan : the fixed plan of Table 3 used at every demand level, which is the plan the survey supports. (2) Webster re-timed : Webster’s method applied to each scenario’s base demand with a minimum green of 8 s and a minimum cycle of 40 s, giving greens of 21/18/9 s (60 s cycle) at moderate demand and in the surge scenario, and 12/11/8 s (43 s cycle) off-peak; this is an oracle that assumes the demand is known in advance. (3) Density rule : if the level is High, the Webster green of Table 3 is kept; if it is Low, the green is shortened by 10 s, so the green never exceeds the Webster value. (4) SmartPath : the actuated logic of Section 3.4 with the parameters of Table 5. In the baseline run, the camera reports every 2 s without error.

Measures: Five measures are reported: average delay per vehicle (vehicle-seconds spent queued divided by vehicles arrived); the same measure for Broadway Road alone (TL1 and TL2); average cycle length; mean and peak number of vehicles queued across the junction; and vehicles discharged in the hour.

Detection-error tests. The baseline assumes that every vehicle waiting on an approach is reported in each 2 s camera report. A missed detection is modelled as an independent failure of a single report, and a false alarm as a spurious report from an empty approach. The robust setting uses a 6 s gap and requires two empty frames before a phase is skipped.

Results and performance evaluation

Classifier Performance

The car/motorcycle classifier achieved 84.2% accuracy, 0.73 precision, and 1.00 recall on the Edge Impulse test set (Table 7). A recall of 1.00 indicates that no vehicles in the test set were missed, which is most important for the actuated controller because a missed vehicle can end a green early or cause a phase to be skipped. A precision of 0.73 means that roughly a quarter of positive detections were false alarms; these mostly hold a green longer than necessary. Section 4.6 quantifies both effects. The quantized model fits within the ESP32-CAM’s RAM and flash budget and runs on the device without cloud connectivity, which is important at sites with unreliable networks.

Table 7. Classifier performance on the test set

Metric

Value

Accuracy

84.2%

Precision

0.73

Recall

1.00

Prototype Cost

The prototype electronics cost UGX 335,000 (about USD 89 at roughly UGX 3,760 per (USD; Table 2). The three ESP32 controllers cost UGX 150,000 (45% of the total), and the ESP32-CAM costs UGX 40,000. The bill of materials covers the prototype electronics only. The 400 W panel, 250 Ah battery, and 50 A MPPT controller of Section 3.4, together with poles and cabinets, are not included, so the figure is a lower bound for a field installation rather than a deployment cost.

Delay

Table 8 gives the results. Relative to the Webster peak plan, SmartPath lowered average delay by 34.0% ± 2.6% at peak demand, 61.8% ± 0.9% at moderate demand, 76.0% ± 0.7% off-peak, and 61.1% ± 0.7% in the surge scenario (Figure 9). Broadway Road delay fell by a similar amount. The gain comes mainly from shorter cycles (37–155 s against 207 s), because empty phases are skipped and each green ends when the queue has cleared. The earlier density rule achieved only 1.5% ± 1.5%, 4.1% ± 1.5%, 12.7% ± 1.6%, and 6.4% ± 1.5%.

Table 8. Simulation results (mean of 30 replications; delay ± 95% CI)

Scenario

Controller

Avg delay (s/veh)

Broadway delay (s/veh)

Avg cycle (s)

Mean queue (veh)

Peak queue (veh)

Discharged (veh)

Peak

Webster peak plan

96.3 ± 4.2

88.3

207

43.0

1555

Webster re-timed

96.3 ± 4.2

88.3

207

43.0

1555

Density rule

94.7 ± 4.0

86.9

205

42.3

1554

SmartPath

63.3 ± 3.0

59.0

155

28.3

1570

Moderate

Webster peak plan

58.5 ± 0.5

53.2

207

18.1

1097

Webster re-timed

32.5 ± 2.3

24.8

10.1

1104

Density rule

56.1 ± 0.7

49.7

198

17.4

1100

SmartPath

22.3 ± 0.5

21.6

6.9

1109

Off-peak

Webster peak plan

52.2 ± 0.8

46.8

207

9.2

623

Webster re-timed

16.7 ± 0.3

16.6

2.9

634

Density rule

45.5 ± 0.6

39.8

180

8.1

629

SmartPath

12.5 ± 0.3

12.3

2.2

634

Surge

Webster peak plan

60.3 ± 0.8

55.6

207

19.2

1124

Webster re-timed

37.8 ± 1.8

31.8

12.0

1133

Density rule

56.4 ± 0.9

50.8

197

17.9

1128

SmartPath

23.4 ± 0.4

22.6

7.4

1137

Note. Bold rows are SmartPath. At peak demand, the re-timed Webster plan is identical to the peak plan.

Figure 9. Average delay per vehicle by scenario and controller (mean of 30 replications; error bars are 95% confidence intervals).

SmartPath also beat the re-timed Webster plan, which assumes demand is known in advance: its delay was 30%, 25%, and 37% lower under moderate, off-peak, and surge demand. The comparison favors SmartPath under the assumption of reliable detection, which Section 4.6 tests.

Queue Length

Mean queue follows delay, as it must when the same vehicles are served (Table 8). Table 9 and Figure 10 show the surge scenario. Every controller's queue peaks in the 5–10 min surge window, and SmartPath’s peak (12.3 vehicles) is less than half of the Webster peak plan (27.7). After the surge, SmartPath’s queue settles at about 7 vehicles, against about 18–19 for the peak plan and about 10–11 for the re-timed plan, so SmartPath’s queue stays far below the others during and after the surge.

Table 9. Total queue over time in the surge scenario (mean vehicles, 5-minute windows)

Window (min)

Plotted at (min)

Webster peak plan

Webster re-timed

Density rule

SmartPath

0-5

2.5

15.0

8.2

14.3

6.6

5-10

7.5

27.7

20.1

24.8

12.3

10-15

12.5

20.8

17.6

18.9

8.0

15-20

17.5

17.8

11.6

17.2

6.5

20-25

22.5

18.8

10.9

17.3

7.0

25-30

27.5

18.7

11.6

17.7

7.0

30-35

32.5

18.5

10.9

17.7

7.1

35-40

37.5

17.9

10.0

16.9

6.7

40-45

42.5

18.2

10.3

16.8

6.6

45-50

47.5

18.8

11.1

17.9

7.3

50-55

52.5

19.3

11.1

17.7

7.3

55-60

57.5

18.3

10.6

17.6

6.7

Note. Each cell is the mean total queue in the window over 30 replications.

Figure 10. Total queue over time in the surge scenario (5-minute window means, 30 replications).

Throughput

Demand is below capacity in every scenario, so every controller discharges most arrivals and throughput follows demand (Figure 11). SmartPath discharged 15, 12, 11, and 13 more vehicles per hour than the peak plan at peak, moderate, off-peak, and surge demand, compared with about 1,600, 1,100, 640, and 1,140 arrivals. The largest gain occurs at peak, where fewer vehicles remain in the queue at the end of the hour.

Figure 11. Vehicles discharged per hour by scenario and controller (mean of 30 replications).

Sensitivity to Detection Errors

Table 10 relaxes the assumption of error-free reports used in the baseline runs.

Table 10. SmartPath delay reduction vs the Webster peak plan (%, mean ± 95% CI)

Variant

Peak

Moderate

Off-peak

Surge

SmartPath (baseline, gap 3 s)

34.0 ± 2.6

61.8 ± 0.9

76.0 ± 0.7

61.1 ± 0.7

Ideal 1 s detection

31.0 ± 2.6

61.0 ± 0.8

75.7 ± 0.6

60.0 ± 0.8

10% false alarms

33.5 ± 2.8

61.0 ± 0.8

74.5 ± 0.6

60.1 ± 0.7

10% missed detections

-114.5 ± 15.1

53.9 ± 1.7

75.4 ± 0.6

45.6 ± 2.8

Robust setting

18.4 ± 2.6

49.1 ± 1.0

70.7 ± 0.8

48.0 ± 1.1

Robust, 10% missed

14.1 ± 3.7

50.6 ± 1.1

71.6 ± 0.8

49.8 ± 1.0

Robust, 20% missed

4.0 ± 6.0

51.3 ± 0.9

72.2 ± 0.8

50.4 ± 1.1

Note. Positive values mean lower delay than the Webster peak plan.

Reporting every second instead of every 2 s changes little (31% against 34% at peak), and false alarms cost almost nothing (74.5% against 76.0% off-peak) because they only hold a green a little longer. Missed detections are the real hazard. With the 3 s gap, a run of two missed reports ends a green early, and a single miss at the start of a phase skips it. At peak demand, 10% missed detections raised delay to 206 s, 114% worse than the peak plan, although the lower-demand scenarios kept most of their gain. The robust setting gave up part of the ideal gain (18% instead of 34% at peak) but stayed better than the peak plan with 10% and 20% missed detections at peak (14% and 4%, the latter not significant). The classifier’s recall of 1.00 on the test set is therefore a key property and must be confirmed in the field, where lighting, occlusion, and queue spillback lower it.

Discussion

Interpretation of the Results

Actuated logic outperforms the density rule: The earlier density rule shortened green by a fixed 10 s only when an approach read Low, leaving cycles of 180–205 s and delay within 13% of the peak plan at best. Actuated logic ends each green when the queue clears and skips empty phases, so cycles fell to 37–155 s and delay by 34–76%. The gain is largest at low demand, but it remains significant at its peak, where a fixed plan wastes green time whenever an approach’s queue empties before its green does.

Throughput is preserved: SmartPath discharged as many or more vehicles than the fixed plans in every scenario, so the shorter cycles are not obtained by serving fewer vehicles.

Even a re-timed fixed plan is beaten, if detection is reliable: Re-timing needs a new count and a manual change for each demand period, and SmartPath’s delay was still 25–37% lower than the re-timed plan’s at lower demand. The advantage rests on the controller seeing the vehicles it serves, so detection quality is the main risk, as Table 10 shows.

Comparison with Previous Studies and Existing Technologies

Table 11 compares SmartPath with fixed-time control and a representative ESP32-CAM prototype (Antarina & Gunanto, 2026). The last row summarizes the Section 4.3 simulation. Consistent with the density-prioritization and YOLO-based systems reviewed in Section 2.0, SmartPath reduces delay relative to fixed-time baselines and also includes comparisons with a re-timed plan, a solar-autonomy design, and a commuter dashboard.

Table 11. Qualitative comparison with related approaches

Feature

Fixed-time

ESP32-CAM (Antarina & Gunanto, 2026)

SmartPath

Adaptive to real-time demand

Partial

Yes (actuated)

Field-calibrated baseline

N/A

Not reported

Yes (Webster)

On-device (edge) AI

N/A

Limited

Yes (quantized CNN)

Live commuter web dashboard

Yes

Solar autonomy design

Not reported

Yes (48 h design)

Simulated delay vs peak plan

Reference

Not reported

34–76% lower

Achievement of Project Objectives

Objectives 1 to 5 were achieved at the prototype level: the Webster plan was derived from field counts; the CNN classifier achieved 84.2% accuracy and ran on the ESP32-CAM; the actuated logic was designed within the Webster limits; the solar subsystem was sized for 48 hours of autonomy (a design target not yet verified); and the prototype was built for about USD 89 in electronics. Objective 6 was achieved in simulation: SmartPath reduced delay and queue length while preserving throughput, and we quantified its dependence on reliable detection. We have not yet measured field performance, so we met the design and simulated performance objectives, but not yet the on-site operation objective.

Limitations

The ESP32-CAM’s limited compute and memory required model optimization, and detection accuracy may degrade under adverse lighting or weather (such as heavy rain or fog) not fully represented in the training set. Intermittent Wi-Fi connectivity during testing occasionally delayed data transmission to the web platform, and budgetary constraints limited the work to a single-intersection, small-scale prototype without a field trial. The simulation results carry further caveats:

The signal logic was tested in simulation only. No before-and-after field measurements of delay, queue length, or crashes were made, and the safety benefit is not quantified.

Detection is modelled as a per-report probability that is independent between reports. Real errors persist across frames (occlusion, glare, night), and the model assumes every approach is observed, which a single ESP32-CAM may not achieve.

Arrivals are Poisson with constant rates; turning movements, pedestrians, platooning and driver start-up behavior are simplified, and the saturation flow of 1,800 veh/h was assumed, not measured.

The model is a purpose-written Python program, not a validated microscopic simulator, and has not been calibrated against field delays.

The 2 s camera report interval is an assumption tied to the dashboard refresh rate; the prototype's inference and polling times were not measured, nor were the 48-hour solar autonomy or the dashboard latency.

Conclusion

This project designed and prototyped SmartPath, a low-cost, solar-powered, IoT-enabled traffic-signal controller and monitor for a T-intersection in Masaka City, Uganda. It combines an Edge-Impulse-trained CNN classifier on an ESP32-CAM, vehicle-actuated control bounded by a Webster plan derived from a twelve-hour field count, and a live two-second web dashboard. The classifier reached 84.2% accuracy after quantization, the solar subsystem was designed for 48 hours of autonomy, and the prototype electronics cost about USD 89.

In a simulation with random arrivals and 30 replications, SmartPath lowered average delay relative to the Webster peak plan by 34% at peak demand and by 62%, 76% and 61% at moderate, off-peak and surge demand, with equal or higher throughput. It also beat a re-timed Webster plan by 25–37% at lower demand and the earlier density-band rule throughout. These gains depend on reliable detection: missed detections can make a short-gap controller worse than a fixed plan at peak demand, and a more conservative gap and a two-frame confirmation keep most of the benefit.

Recommendations

Before installation, measure the detection recall, report interval, and latency of the prototype at the junction, because the simulated benefit depends on reliable detection.

Until the recall is confirmed in the field, use the conservative setting (6 s gap and two-frame confirmation of an empty approach) rather than the 3 s gap.

Treat the UGX 335,000 prototype cost as a lower bound and budget separately for the solar panel, battery, MPPT controller, poles, and cabinets.

Install a camera per approach, or a multi-view arrangement, so that every approach is observed reliably.

Run a before-and-after field trial that measures delay, queue length, and crashes, together with solar autonomy and dashboard latency.

Areas for further research and development

Measure detection recall, report interval, and latency on the prototype at the junction, and tune the gap and confirmation settings accordingly.

Field trials that measure delay, queue length, and crashes before and after installation, together with solar autonomy and dashboard latency.

Validating the simulator against field delays and repeating the study in SUMO with turning movements, pedestrians, and mixed traffic.

Adding a camera per approach or a multi-view fusion scheme so that all approaches are observed reliably, and persistent-error models (occlusion, glare, night).

Multi-intersection coordination, sensor fusion with radar or inductive loops for adverse weather, native mobile applications with congestion alerts, and more robust motorcycle detection, which dominates Ugandan traffic.

Acknowledgements

The authors thank their supervisor, Mr. Roland Balinda Mujungu, for his guidance throughout the project, and the Department of Electrical Engineering at Muteesa I Royal University for institutional support during the design, prototyping, and testing of the SmartPath system.

Funding

This project received no external funding.

Conflict of interest

The authors declare no conflict of interest.

References

Antarina, S., & Gunanto, S. (2026). IoT-based automatic traffic light prototype using ESP32-CAM. Bit-Tech, 8 (3), 3730–3741.

Atzori, L., Iera, A., & Morabito, G. (2010). The Internet of Things: A survey. Computer Networks, 54 (15), 2787–2805.

Balikuddembe, J. K., Ardalan, A., Khorasani-Zavareh, D., Nejati, A., & Munanura, K. S. (2017). Road traffic incidents in Uganda: A systematic review of a five-year trend. Journal of Injury and Violence Research, 9 (1), 17–25.

David, R., et al. (2021). TensorFlow Lite Micro: Embedded machine learning for TinyML systems. Proceedings of Machine Learning and Systems, 3 .

Hunt, P. B., Robertson, D. I., Bretherton, R. D., & Royle, M. C. (1982). The SCOOT on-line traffic signal optimisation technique. Traffic Engineering & Control, 23 (4), 190–192.

Jacob, B., et al. (2018). Quantization and training of neural networks for efficient integer-arithmetic-only inference. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (pp. 2704–2713).

Lopez, P. A., et al. (2018). Microscopic traffic simulation using SUMO. In Proceedings of the 21st IEEE International Conference on Intelligent Transportation Systems (pp. 2575–2582).

Mirchandani, P., & Head, L. (2001). A real-time traffic signal control system: Architecture, algorithms, and analysis. Transportation Research Part C: Emerging Technologies, 9 (6), 415–432.

nyombiSHAFIK. (2026). smartPath: Initial release [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.23300777

Papageorgiou, M., Diakaki, C., Dinopoulou, V., Kotsialos, A., & Wang, Y. (2003). Review of road traffic control strategies. Proceedings of the IEEE, 91 (12), 2043–2067.

Pardeshi, K., Bable, P., Bhalerao, M., & Desai, M. (2026). Adaptive traffic signal control system using density-based prioritization algorithm on ESP32 platform. International Journal of Engineering Research & Technology, 15 (5).

Raza, M., et al. (2025). An edge-deployed real-time adaptive traffic light control system using YOLO-based vehicle detection and density estimation. IEEE Access, 13 .

Shelke, N. A., Srivastava, S., Jain, S., & Kumar, S. (2024). Adaptive traffic signal control system for vehicle detection and traffic density estimation. In Proceedings of the IEEE International Conference on Intelligent Systems and Communication Technologies .

Sims, A. G., & Dobinson, K. W. (1980). The Sydney coordinated adaptive traffic (SCAT) system philosophy and benefits. IEEE Transactions on Vehicular Technology, 29 (2), 130–137.

Transportation Research Board. (2016). Highway capacity manual (6th ed.). National Academies Press.

Uganda Police Force. (2026). Annual crime and traffic/road safety report 2025 . Uganda Police Force.

Walekhwa, A. W., Mulolo, F., Achiro, C., Nantongo, M., Nakazibwe, B., & Musenero, M. (2022). A rapid assessment of road crashes in Uganda: Notes from the field. Dr. Sulaiman Al Habib Medical Journal, 4 , 174–181.

Webster, F. V. (1958). Traffic signal settings (Road Research Technical Paper No. 39). Road Research Laboratory.

Webster, F. V., & Cobbe, B. M. (1966). Traffic signals (Road Research Technical Paper No. 56). Road Research Laboratory.

Wei, H., Zheng, G., Gayah, V., & Li, Z. (2019). A survey on traffic signal control methods. arXiv . https://arxiv.org/abs/1904.08117

Published in

MRUJ Volume 1, Issue 1 [November 2026]

Length 17 pages

DOI 10.64855/mruj.2026.1.1.002

Access Open access

Download PDF

In this article

Abstract

Introduction and Background

Problem Statement

Significance of the Project

Methodology and system design

Results and performance evaluation

Discussion

Limitations

Conclusion

Recommendations

Acknowledgements

References

Originally published on the school's website.

More from Muteesa I Royal University

Thinking about Muteesa I Royal University?

Ask the school a question, arrange a visit or start an application.

Message the School

Muteesa I Royal University

For a detailed enquiry, use the full enquiry form