Smart Cane Obstacle Detection - shalan/CSCE4301-WiKi GitHub Wiki

Project Title: Smart Cane Obstacle Detection Attachment

Name GitHub
Youssef Elhagg GH_YoussefElhagg
Mariam ElGhobary GH_MariamElGhobary
Nour Tamer GH_NourTamer

Github Repo: https://github.com/useframi1/smart-cane-obstacle-detection.git


1. The Proposal

Abstract / Elevator Pitch

Traditional white canes allow visually impaired individuals to detect ground-level obstacles through physical contact. However, they provide no warning for obstacles at chest or head height, such as tables, shelves, open cabinets, and more. A cane can also only detect the direction it is swept towards at any point in time, which means full spatial awareness requires constant manual scanning. This leaves the user's surroundings never fully covered. Such gaps make indoor navigation dangerous and stressful.

The Smart Cane Attachment is a compact, clip-on device for the upper grip of a standard white cane. Three ultrasonic sensors continuously scan for obstacles at body height in three directions (forward, left, and right) and deliver real-time feedback to warn the user. A buzzer beeps faster as a forward obstacle gets closer, while two vibration motors pulse on the left or right side of the grip to warn of lateral obstacles. The closer the obstacle, the stronger and faster the feedback.

The device complements the white cane rather than replacing it. The cane handles ground-level detection, and the attachment handles everything above. A physical button lets the user switch between buzzer-only mode (outdoor), vibration-only mode (quiet indoor spaces), and combined mode. A Bluetooth module streams live obstacle data to a caregiver's phone for supervised rehabilitation sessions.

Project Objectives & Scope

Minimum Viable Product (MVP):

  • Three ultrasonic sensors measuring distance in three directions (forward, left, right)
  • Buzzer providing audio feedback for forward obstacles, with beep rate proportional to proximity
  • Two vibration motors providing haptic feedback for left/right obstacles, with intensity proportional to proximity
  • A mode button cycling between buzzer-only, vibration-only, and combined feedback modes
  • Bluetooth module streaming live distance readings to an Android phone via a serial terminal app

Stretch Goals:

  • Tunable distance thresholds via Bluetooth commands from the phone
  • Battery voltage monitoring with low-battery warning
  • Compact 3D-printed enclosure that clips securely onto a standard white cane

2. System Architecture

2.1 High-Level Block Diagram

The system is organized into three stages:

  • Sensing: Three HC-SR04 ultrasonic sensors measure the distance to the nearest obstacle in the forward, left, and right directions. A mode button provides user input to cycle between feedback modes.
  • Processing: The STM32L432KC microcontroller reads the sensor data, calculates distances, maps each reading to a feedback intensity level, and manages the active feedback mode.
  • Feedback: A passive buzzer produces audio alerts for forward obstacles. Two coin vibration motors deliver haptic alerts for lateral obstacles. An HC-05 Bluetooth module streams distance data to a caregiver's Android phone.
  • Power: A USB power bank supplies 5 V for the ultrasonic sensors and 3.3 V (via the Nucleo board's onboard regulator) for the microcontroller, Bluetooth module, and actuator driver circuits.

2.2 Subsystem Breakdown

To be completed during implementation.


3. Hardware Design

3.1 Component Selection

To be completed during implementation.

3.2 Schematics & Wiring

To be completed during implementation.

3.3 Bill of Materials (BOM)

To be completed during implementation.

3.4 Power Budget

To be completed during implementation.


4. Software Implementation

4.1 Software Architecture

To be completed during implementation.

4.2 Flowcharts & State Machines

To be completed during implementation.

4.3 Key Algorithms

To be completed during implementation.

4.4 Development Environment

To be completed during implementation.


5. Testing, Validation & Debugging

5.1 Unit Testing

To be completed during testing phase.

5.2 Integration Testing

To be completed during testing phase.

5.3 Challenges & Solutions

To be completed throughout development.


6. Results & Demonstration

6.1 Final Prototype

To be completed at project end.

6.2 Video Demonstration

To be completed at project end.

6.3 Performance Metrics

To be completed at project end.


7. Project Management

7.1 Division of Labor

Member Responsibility
Youssef Elhagg Sensor subsystem. HC-SR04 driver development, timer input-capture configuration, staggered polling logic, distance calculation from echo pulse width.
Mariam ElGhobary Actuator subsystem. PWM configuration for buzzer and vibration motors, distance-to-feedback mapping logic, transistor driver circuits (hardware and software).
Nour Tamer Communication and control. Bluetooth communication (USART + HC-05), mode state machine (button interrupt + mode cycling logic), system integration and main loop.

7.2 Timeline

Date Milestone Deliverable
Tue, Apr 14 Team formation Team submitted.
Wed, Apr 15 Proposal presentation 5 to 7 min in-class presentation of project scope and plan.
Mon, Apr 20 Wiki/page setup This wiki page live with approved proposal content.
Wed, Apr 29 Progress demo At least one major subsystem working (e.g., sensors reading distance, or buzzer responding to proximity). Presentation + live demo.
Wed, May 6 Integration update Wiki updated with integration status, testing evidence, remaining issues.
Wed, May 13 Final demo Final presentation, full live demo, complete codebase, polished wiki.

8. Appendices & References

8.1 Source Code Repository

Link to be added.

8.2 References

To be added throughout development.