How to Test and Debug Your Final-Year Project Before Submission

Test your final-year project module by module first, then as a complete system under normal and failure conditions. Before submission, verify the power supply, wiring, sensors, communication links, firmware, software, database or cloud connection, and how the project responds to unexpected inputs — not just whether the prototype turns on. This guide gives engineering and diploma students a practical testing and debugging process for IoT, embedded, hardware and software projects, with diagnostic tools, worked examples, common last-week failures and a final validation checklist.

Written by Ved Gunjal15 min readPublished
For Final-year engineering and diploma students working on hardware, IoT, embedded or software projects who want to verify their prototype is stable and demo-ready before submission. Topics: Testing, Debugging, ESP32, Arduino, IoT, Embedded Systems, Firmware
Engineering students testing and debugging an ESP32-based final-year IoT project using a laptop, multimeter, sensors and circuit prototype.
In this guide

How to Test and Debug Your Final-Year Project Before Submission

Short answer

A final-year project should be tested module by module first, then as a complete system under normal and failure conditions. Before submission, verify the power supply, wiring, sensors, communication links, firmware, software, database or cloud connection, and the project's response to unexpected inputs instead of simply checking whether the prototype turns on.

This guide gives engineering and diploma students a practical testing and debugging process for IoT, embedded, hardware and software projects, including diagnostic tools, worked examples, common last-week failures and a final validation checklist.

Why Testing Your Final-Year Project Matters

A project that worked yesterday can suddenly fail during a demonstration because of something as simple as:

  • A loose jumper wire
  • A discharged battery
  • Wrong Wi-Fi credentials
  • A sensor connector inserted incorrectly
  • An API or server being unavailable
  • A changed COM port
  • Incorrect voltage supplied to a module
  • A software dependency failing
  • An unhandled input causing the application to crash

The biggest mistake students make is testing only the project's successful workflow. For example, suppose you built an ESP32-based smart irrigation system. You may have tested: Soil becomes dry → pump turns on. But have you tested:

  • What happens if the soil sensor is disconnected?
  • What happens if Wi-Fi is unavailable?
  • What happens if the water tank is empty?
  • What happens if the ESP32 restarts?
  • What happens if the cloud dashboard cannot be reached?
  • What happens if the sensor reports an impossible value?

Good testing tries to deliberately find these weaknesses before your evaluator finds them accidentally.

Pre-Testing Checklist: Prepare Before You Start Debugging

Do not immediately start changing code whenever something stops working. First establish a known-good testing environment.

1. Save a Working Version of Your Project

Before making changes:

  • Create a backup of the source code.
  • Save the currently working firmware.
  • Export the database if applicable.
  • Save cloud/API configuration details.
  • Take photographs of correct wiring.
  • Keep copies of important libraries and dependencies.
  • Record the board and library versions being used.

If possible, use Git so that you can return to an earlier working version. This is especially important during the final week, when a "small improvement" can unexpectedly break a working prototype.

2. Prepare Basic Debugging Tools

For most student hardware projects, keep these ready:

  • Digital multimeter
  • Screwdriver set
  • Jumper wires
  • Breadboard
  • Spare USB cable
  • Spare sensor or module when possible
  • Laptop charger
  • Project power adapter
  • Insulation tape or heat-shrink
  • Soldering iron for permanent connections
  • Serial Monitor or terminal software

Advanced projects may also benefit from an oscilloscope or logic analyser, but most college-level debugging can be completed using a multimeter, serial logging and systematic isolation.

3. Document the Expected Behaviour

Write down what each module is supposed to do. For example:

| Module | Input | Expected Output |
|---|---|
| DHT sensor | Room environment | Valid temperature and humidity |
| ESP32 | Sensor readings | Process and transmit data |
| Wi-Fi | SSID + password | Network connection |
| MQTT/HTTP | ESP32 data | Data reaches server |
| Dashboard | Server data | Updated values displayed |
| Relay | Control signal | Load switches ON/OFF |

Once expected behaviour is defined, debugging becomes much easier because you can identify which stage stopped behaving correctly.

Hardware Testing: Test From Power to Output

When debugging an electronics project, follow the signal path logically. A useful order is: Power → Controller → Sensor/Input → Processing → Communication → Output/Actuator. Avoid randomly replacing components.

1. Check the Power Supply First

Power problems often look like software problems. Before touching the code, measure:

  • Input supply voltage
  • Controller supply voltage
  • Sensor supply voltage
  • Voltage while motors or relays are operating
  • Battery voltage under load

Look for symptoms such as:

  • ESP32 randomly restarting
  • Arduino resetting when a motor starts
  • Raspberry Pi becoming unstable
  • Sensors producing inconsistent readings
  • Wi-Fi disconnecting when relays activate

These can indicate voltage drops, insufficient current capability or electrical noise.

Check Voltage Compatibility

Different boards and sensors may operate at different logic voltages. For example, Raspberry Pi GPIO uses 3.3 V logic, so connecting inappropriate higher-voltage signals directly to GPIO can damage the board. Refer to the official Raspberry Pi hardware documentation when designing or troubleshooting GPIO connections. Whenever uncertain, check the controller and sensor datasheets instead of assuming that every module is 5 V compatible.

2. Inspect Wiring Systematically

Visually inspect every connection. Check for:

  • VCC connected to the correct voltage
  • Common ground between connected modules
  • TX connected to RX for UART devices
  • Correct SDA and SCL pins for I2C
  • Correct SPI pins
  • Loose Dupont cables
  • Incorrect breadboard rows
  • Damaged jumper wires
  • Reversed connectors
  • Cold solder joints
  • Accidental short circuits

A wire can look connected while having poor internal contact. If a module behaves unpredictably, replace the jumper wire before assuming that the module itself is defective.

Create a Wiring Reference

Before submission, create either:

  • A labelled circuit diagram, or
  • A clear photograph showing every major connection.

This makes emergency repairs much faster.

3. Test Sensors Individually

Do not debug five connected sensors simultaneously. Disconnect unnecessary modules and test one sensor using a minimal program. For example: Sensor → ESP32 → Serial Monitor, instead of: Sensor → ESP32 → Wi-Fi → Cloud → Database → Dashboard. First confirm that the raw sensor reading is correct. Only after that should you add filtering, cloud communication and dashboard processing. For Arduino-based boards, the Arduino IDE documentation includes tools such as Serial Monitor that are useful for inspecting values while a program is running.

4. Verify Communication Protocols

Protocol What to check
I2C For I2C sensors, check: SDA pin, SCL pin, supply voltage, device address, pull-up configuration, and whether two devices are using conflicting addresses. Running an I2C scanner is often one of the fastest ways to determine whether the controller can actually see the device.
UART For UART communication, verify: TX → RX, RX → TX, common ground, correct baud rate, correct voltage levels. If one device sends data at 115200 baud while the receiver expects 9600, the Serial Monitor may display unreadable characters or nothing useful.
SPI Check: MOSI, MISO, SCK, Chip Select, correct device configuration. When multiple SPI devices are present, incorrect chip-select handling can create confusing intermittent failures.

Software and Firmware Testing

Once the hardware is proven to work individually, begin testing the software.

1. Perform Unit Checks

A unit check tests a small function independently. Suppose your project includes this logic: readSensor(), calculateAverage(), checkThreshold(), sendToCloud(), activateRelay(). Instead of testing everything simultaneously, verify each function separately:

  • Does readSensor() return a realistic value?
  • Does calculateAverage() calculate correctly?
  • Does checkThreshold() trigger at the expected point?
  • Does sendToCloud() return a success response?
  • Does activateRelay() actually switch the output?

This dramatically reduces the possible location of a fault.

2. Add Debug Logs

Do not debug invisible software. Print important states such as:

SYSTEM STARTED
Sensor initialized
Temperature: 31.2
Wi-Fi connecting...
Wi-Fi connected
Sending data...
HTTP response: 200
Relay ON

If the program stops after "Wi-Fi connected / Sending data...", you immediately know which section to investigate. ESP32 projects using ESP-IDF can use Espressif's logging and monitoring tools (see the official ESP-IDF Monitor documentation). Do not leave hundreds of unnecessary debug messages in your final demonstration build, but maintain enough logging to diagnose problems quickly.

3. Run Integration Tests

After individual modules work, connect them gradually:

  • Test 1: ESP32 + temperature sensor
  • Test 2: ESP32 + temperature sensor + OLED
  • Test 3: ESP32 + temperature sensor + OLED + Wi-Fi
  • Test 4: ESP32 + sensor + OLED + Wi-Fi + cloud
  • Test 5: Complete system including relay or actuator

If Test 3 works but Test 4 fails, you now have a much smaller area to investigate.

4. Test Edge Cases

An edge case is an unusual condition that your project may still encounter.

System Edge cases to test
Attendance system unknown student, duplicate attendance, camera disconnected, database unavailable, empty student ID, two recognition attempts close together.
IoT monitoring system sensor disconnected, Wi-Fi lost, server unavailable, invalid sensor value, ESP32 restarted, internet restored after disconnection.
Web application empty form, incorrect password, extremely long input, duplicate registration, invalid characters, slow network, missing API response.

A strong final-year prototype should fail predictably and safely, rather than freezing or producing random behaviour.

Debugging Tools for Hardware, Software and IoT Projects

| Tool or Technique | Hardware | Software/Firmware | IoT/Cloud | Best Use |
|---|---|
| Visual inspection | Excellent | Low | Low | Loose wires, reversed connections, damaged parts |
| Multimeter | Excellent | None | None | Voltage, continuity, shorts and power faults |
| Serial Monitor | Good | Excellent | Good | Sensor values, program states and errors |
| Serial Plotter | Good | Good | Low | Visualising changing sensor readings |
| I2C scanner | Excellent | Good | None | Finding I2C devices and addresses |
| Logic analyser | Excellent | Good | None | UART, SPI and I2C signal debugging |
| Print/log statements | None | Excellent | Excellent | Tracking execution and data flow |
| Browser developer tools | None | Excellent | Excellent | Frontend/API/network errors |
| API client such as Postman | None | Good | Excellent | Testing HTTP APIs independently |
| ping / network tests | Low | Low | Excellent | Checking network availability |
| Database console | None | Good | Excellent | Verifying whether records reached storage |
| Git/version control | Low | Excellent | Good | Recovering from broken code changes |
| Known test inputs | Good | Excellent | Excellent | Reproducing a failure consistently |

The goal is not to use every debugging tool. Use the simplest tool that can answer your current question.

Worked Example 1: Sensor Gives Wrong Readings on Arduino or ESP32

Suppose a temperature sensor should show approximately 25–35°C, but your project displays values such as 0, -127, 255, NaN. Do not immediately rewrite the entire program.

Step 1: Check Power

Measure the voltage between VCC and GND at the sensor. If the sensor is not receiving the expected supply voltage, fix that before changing software.

Step 2: Check Wiring

Verify: VCC → Correct supply, GND → GND, DATA → Correct GPIO. Check the actual sensor pinout — similar-looking modules can have different pin arrangements.

Step 3: Remove Other Modules

Temporarily disconnect: relay, display, motors, cloud code, other sensors. Run only: Sensor → ESP32 → Serial Monitor.

Step 4: Print Raw Values

Avoid immediately applying calibration formulas. Print the raw reading first. If the raw reading is already incorrect, the problem is likely related to: hardware, sensor configuration, library, GPIO selection, or timing. If raw data is correct but the displayed value is wrong, investigate your conversion or processing code.

Step 5: Replace One Variable at a Time

Try: another GPIO, another jumper wire, another sensor, a minimal official/library example, a different power source. Change only one thing per test — otherwise, if the project suddenly works, you will not know what actually fixed it.

Worked Example 2: ESP32 Dashboard Is Not Receiving IoT Data

Consider this architecture: Sensor → ESP32 → Wi-Fi → HTTP/MQTT → Server → Database → Web Dashboard. The sensor values appear correctly in Serial Monitor, but the website does not update. Instead of debugging the complete system, inspect each boundary.

Step 1: Confirm ESP32 Has Valid Data

Print: Temperature: 29.4, Humidity: 61. If this is correct, the sensor side is probably functioning.

Step 2: Confirm Network Connection

Print Wi-Fi connection status and the assigned IP address. If Wi-Fi fails, investigate: SSID, password, signal strength, router availability, network restrictions.

Step 3: Print the Request Being Sent

For example: POST /api/sensor with temperature=29.4, humidity=61. Confirm that the API endpoint is correct.

Step 4: Print the Server Response

You might receive 200 OK, or 401 Unauthorized / 404 Not Found / 500 Internal Server Error. Those results point to very different problems.

Step 5: Check Whether the Server Received the Request

Inspect server logs. If the server receives nothing, investigate the ESP32/network side. If the server receives the request correctly, continue to the database.

Step 6: Check the Database

Run a query or inspect the latest record. If the database contains 29.4, 61, then the ESP32, network, API and database are probably working — the problem is now likely between Database → Backend → Web Dashboard.

This technique is called fault isolation. Instead of asking "Why isn't my IoT project working?", ask "At which exact stage does valid data stop moving forward?" That question is much easier to answer.

Common Final-Week Project Failures and Quick Fixes

The week before submission is not the ideal time for major architecture changes. Focus on stability.

Project Works on USB but Fails on Battery

Possible causes: battery voltage too low, battery cannot provide enough current, wrong regulator, missing common ground, voltage drops when motors start. Quick fix: measure the supply voltage while the project is operating, not only when idle.

ESP32 Randomly Restarts

Check: power supply stability, motor or relay interference, short circuits, memory problems, watchdog resets, crash logs. Read the serial output immediately after restarting because the board may print useful diagnostic information.

Sensor Suddenly Stops Responding

Try: restarting the controller, checking VCC, checking ground, replacing the signal wire, running a minimal sensor test, checking its address/configuration, testing another sensor if available.

Motor or Relay Makes the Controller Reset

Motors, solenoids and relays can create electrical noise and sudden current demand. Check: separate or adequate power supply, motor driver, relay driver circuit, flyback protection where required, ground arrangement, supply decoupling. Do not power large motors directly from a microcontroller GPIO.

Code Upload Suddenly Stops Working

Check: correct board selected, correct COM/serial port, USB data cable, driver, another application holding the serial port, boot/reset procedure required by the board. Arduino provides official IDE and upload documentation at docs.arduino.cc.

Wi-Fi Project Works at Home but Not in College

College networks may have: login portals, restricted devices, client isolation, blocked ports, weak signal, different credentials. Quick fix: test your project using the exact network setup you plan to use during the demonstration. For many student prototypes, keeping a tested mobile hotspot available as a backup can reduce dependency on an unfamiliar campus network.

Dashboard Shows Old Values

Check: browser caching, database timestamp, API polling interval, WebSocket/MQTT connection, backend process, whether new records are actually being inserted. Display timestamps with your data during debugging so that you can distinguish fresh data from cached data.

Project Works Only After Several Restarts

Do not accept this as normal. It often indicates: initialization timing problems, floating inputs, power instability, sensor startup delay, incorrect boot sequence, network connection handling problems. Fix or document the startup sequence before submission.

Use the "One Change at a Time" Debugging Rule

Suppose a sensor is not working. Do NOT simultaneously: replace the sensor, change GPIO, install another library, rewrite the code, change the power supply. If it begins working, you will not know why.

Instead: Test 1 → Change wire; Test 2 → Change GPIO; Test 3 → Test minimal code; Test 4 → Replace sensor. Keep a short debugging log:

| Test | Change | Result |
|---|---|
| 1 | Replaced jumper | No change |
| 2 | GPIO 5 → GPIO 18 | No change |
| 3 | Minimal sensor sketch | Still invalid |
| 4 | Replaced sensor | Working |

You now have evidence that the original sensor was likely defective.

Run a Full Demonstration Test Before Submission

After debugging individual problems, perform the project demonstration exactly as you expect to present it. Start with everything switched off, then:

  1. Connect the power supply.
  2. Start the controller.
  3. Start the server/dashboard if required.
  4. Connect to the network.
  5. Demonstrate the input.
  6. Show the processing.
  7. Show the output.
  8. Repeat the process.
  9. Restart the entire project.
  10. Demonstrate it again.

Your project should not depend on a secret sequence that only the developer knows.

If the project requires a specific startup order, document it clearly.

Perform a Long-Run Stability Test

A prototype that works for two minutes may fail after thirty minutes. If possible, run the project continuously for at least 30–60 minutes before submission.

Watch for:

  • controller restarts
  • sensor drift
  • memory problems
  • increasing response time
  • Wi-Fi disconnections
  • database errors
  • motor overheating
  • regulator overheating
  • battery discharge
  • loose mechanical components.

For projects expected to operate continuously, longer soak testing is even more useful.

Create a Demonstration Backup Plan

Before travelling to college, keep:

  • source code
  • firmware
  • circuit diagram
  • database backup
  • APK or application installer
  • required libraries
  • configuration files
  • project documentation
  • photos of correct wiring
  • short video showing the working project.

Keep copies in at least two locations — for example your laptop and cloud storage. A backup video should not replace the actual working project, but it can document that the system worked correctly if an unexpected transport or infrastructure issue occurs.

Final Pre-Submission Validation Checklist

Use this checklist shortly before your final demonstration.

  • Hardware: correct power supply in use; supply voltages measured; no exposed wires shorting; connections firmly secured; sensors produce realistic readings; motors/pumps/relays operate repeatedly; components not abnormally hot; battery has sufficient charge; spare essential cables packed.
  • Firmware: correct firmware uploaded; board starts successfully after complete power loss; debug output has no unexplained errors; invalid sensor conditions handled; Wi-Fi reconnection works if required; important thresholds tested; no unfinished experimental code enabled.
  • Software: application starts from a fresh restart; login works; forms validate incorrect input; database operations work; required APIs respond correctly; application does not depend on files available only on the developer's computer; packages and dependencies documented.
  • IoT and Cloud: device connects to the intended network; sensor data reaches the server; sensor data reaches the database; dashboard shows fresh values; timestamps correct; device handles temporary internet loss; API keys and endpoints correctly configured.
  • Demonstration: complete startup procedure tested; project works after a cold restart; demonstrated multiple times consecutively; important failure conditions tested; stability run completed; laptop, hotspot and power accessories ready; source code and documentation backed up; a short working-demo recording exists as an emergency reference.

Final Advice: Debug the System, Not the Symptom

Effective debugging is usually not about writing more code. It is about narrowing the problem until only one possible failure remains. If an IoT dashboard stops updating, separate: Sensor → Controller → Network → API → Database → Dashboard. If a hardware project stops moving, separate: Power → Controller → Driver → Motor → Mechanical system. Test each boundary independently. The closer your project gets to submission, the more important stability becomes — avoid unnecessary final-week feature additions, test the complete project from a cold startup, deliberately test failure conditions, and keep a known working version available. A final-year project does not need to be impossible to break. It should be tested well enough that you understand how it behaves, where it can fail, and how to diagnose those failures quickly.

More project guides

All guides