Abstract
Many individuals who are blind or visually impaired use canes to navigate their surroundings, using their sense of touch to detect obstacles. What if you could create an electronic cane that emits an audible warning before coming into contact with an object? This project allows you to do just that by incorporating an ultrasonic distance sensor and a buzzer to alert the user of approaching obstacles. You can customize the cane by adding additional features or altering the design, such as using a vibration motor instead of a buzzer. The possibilities for customization are endless!
Summary
Previous experience with Arduino is recommended before you try this project. See our How to Use an Arduino page.
A kit is available from our partner Home Science Tools®. See the Materials section for details.
No issues
If you have never used an Arduino before, please go through at least the first few tutorials on our How to Use an Arduino page before attempting this project.
Objective
Design and build an electronic cane that emits a beeping noise when the user approaches an obstacle.
Introduction
Check out this video from the Broadcom Foundation showing projects by Damini Jordan and Johan Santana from the Renaissance Youth Center in Bronx, New York:
People who are blind or visually impaired can use a variety of assistive technologies to help them navigate the world. For example, they can use braille to read physically printed text, and screen reader software that reads text on a computer screen out loud. Many of them use white canes to detect obstacles when walking, by sweeping the cane back and forth in front of them as they walk (Figure 1). The canes are white to help other people nearby (like pedestrians and drivers) identify that the user is visually impaired and use appropriate caution. The main color of the cane and the significance of any additional colors, like red bands signaling that the user is also hard of hearing, can differ from country to country.

Figure 1. A woman crossing the street using a white cane.
Some people use smart canes or electronic walking sticks that have additional features. For example, a stick might connect to an app on your phone and have built-in microphones and speakers to work with voice commands. Some sticks contain an ultrasonic distance sensor to detect obstacles. An ultrasonic sensor emits a burst of ultrasonic sound and measures how long it takes the sound wave to reflect back to the sensor - just like a bat uses sonar to echolocate objects. The stick can then provide some sort of feedback to the user - like a beep or vibration - to alert them of the obstacle. Depending on the orientation of the sensor, it can detect different obstacles or scenarios. For example:
- A forward-facing sensor will detect obstacles in front of the user before the stick makes physical contact with them.
- An upward-facing sensor can detect obstacles above ground level (such as a protruding shelf, table, tree branch, etc.) that would not normally be detected by the cane's tip.
- A downward-facing sensor can detect the absence of a nearby surface or a sudden increase in distance - such as a hole in the ground, the top of a flight of stairs, or the edge of a curb when stepping off a sidewalk.
In this project, you will need to decide how many ultrasonic distance sensors to use and what direction(s) they will face. You will also need to decide how to provide feedback to the user - using a buzzer, vibration motor, or something else. The instructions in the procedure will show you how to build a walking stick with a single ultrasonic sensor and a buzzer that beeps faster as an obstacle gets closer, but what you build is up to you. Check out the following video to learn more about ultrasonic distance sensors, and our How to Use an Arduino page for tutorials on other parts like buzzers and motors.
Terms and Concepts
- Blind
- Visually impaired
- Assitive technology
- White cane
- Smart cane
- Electronic walking stick
- Ultrasonic distance sensor
- Sonar
- Echolocate
Questions
- What are some ways that blind or visually impaired people can navigate safely when walking around?
- Search online for "smart cane" and "electronic walking stick" etc. What are some features of canes/sticks that you can buy online?
- What features do you want to include in your cane/stick?
Bibliography
- Finio, B. (n.d.). How to Use an Arduino. Science Buddies. Retrieved April 25th, 2024.
- Science Buddies Staff (n.d.). Engineering Design Process. Science Buddies. Retrieved April 25th, 2024.
Materials and Equipment 
Recommended Project Supplies
This is an engineering design project. The exact materials you will need depend on what you decide to build. The list below is for the circuit shown in the procedure with one ultrasonic sensor and one buzzer. You may wish to add multiple ultrasonic sensors or other outputs like a vibration motor.
-
Electronics Kit for Arduino, available from our partner Home Science Tools®.
The kit includes the following parts that you need for this project:
- Arduino-compatible microcontroller board
- Note: This project will work with the Arduino UNO R3, UNO R4 Minima, UNO R4 WiFi, and compatible third-party boards.
- USB cable
- Breadboard
- Jumper wires
- 9V battery
- 9V battery snap connector
- HC-SR04 ultrasonic distance sensor
- Arduino-compatible microcontroller board
- Active buzzer. The example code in this project is for an active buzzer that produces a single tone. If you want to use the Arduino tone() function to produce sounds with different pitches, you can use a passive buzzer instead. See our buzzer tutorial video to learn about the differences between the two types.
- 22 AWG solid-core wire
- Mini breadboard
- 5.5x2.1mm barrel jack connector with switch
- Wooden dowel, walking stick, cane, etc. to modify
- Materials to attach things to your dowel, such as zip ties, electrical tape, double-sided foam tape, duct tape, a hot glue gun, etc.
- Scissors
- Wire strippers
Disclaimer: Science Buddies participates in affiliate programs with Home Science Tools®, Amazon.com, Carolina Biological, and Jameco Electronics. Proceeds from the affiliate programs help support Science Buddies, a 501(c)(3) public charity, and keep our resources free for everyone. Our top priority is student learning. If you have any comments (positive or negative) related to purchases you've made for science projects from recommendations on our site, please let us know. Write to us at [email protected].
Experimental Procedure

Design Your Walking Stick
It may be tempting to just jump right in and start building something, but the engineering design process involves some careful planning and research before you build a prototype. See our engineering design process guide for more details, but here is an overview of some things you should consider for this project:
- What problem are you trying to solve? Specifically, as discussed in the introduction, what obstacles are you trying to detect?
- What features are available on existing smart/electronic canes or walking sticks? What type(s) of sensor(s) do they use?
- What features do you want to include in your design?
- Especially if you are using multiple sensors to detect obstacles in different directions, how will you alert the user? For example, could you use different beeping or vibration patterns to indicate obstacles in different locations?
Prototype The Circuit
You should build and test your circuit on a breadboard before you mount everything to a stick. Figures 2 and 3 show one possible breadboard layout and circuit diagram for a circuit with a single ultrasonic sensor and buzzer. You will need to modify the circuit for additional sensors or outputs. You can access a Tinkercad Circuits simulation of the circuit here.
Important: depending on where you bought your breadboard, the left/right orientation of the power (+) and ground (-) buses may be reversed.
- Connect the ultrasonic sensor
- GND pin to GND
- ECHO pin to Arduino pin 7
- TRIG pin to Arduino pin 6
- VCC pin to 5V
- Connect the buzzer
- Negative (-) pin to GND
- Positive (+) pin to Arduino pin 8
- Connect power and ground (remember that left-right orientation may be switched from what you see in Figure 2)
- Arduino 5V pin to power (+) bus
- Arduino GND pin to ground (-) bus


Test the Code
If your circuit is identical to Figures 2 and 3, you can download our example code. You will need to modify the code if you add more sensors or outputs.
- Upload the code to your Arduino.
- Hold your hand in front of the ultrasonic sensor and slowly move it back and forth. Listen to how the buzzer responds.
- If the buzzer does not work, double-check that you have all of the connections correct and that no wires are loose.
- Experiment with changing the
threshold,buzzerDelayMin, andbuzzerDelayMaxvariables in the code. How do they let you change the buzzer's behavior? - Once you have the code working the way you want it, you are ready to mount your circuit on the walking stick.
Build the Walking Stick
You can decide how to mount your circuit to your walking stick. How you do this will depend on the materials you have available and the criteria for your project - are you just building a prototype for demonstration at a science fair, or do you want something more durable for long-term use? Figures 4, 5, and 6 show an example, but how you build your stick is up to you.
- Mount the Arduino and breadboard to the top of the stick (near the "handle") using tape. This keeps the heavier weight closer to the user's hand and easier to manage.
- Power the Arduino with a 9V battery in line with a barrel jack connector that has a built-in switch. This lets you easily turn the stick on and off without needing to unplug the battery.
- You can hot glue a mini breadboard to the bottom of the stick to make it easier to mount the ultrasonic sensor. Be careful with the orientation of the rows/columns in your mini breadboard. Make sure you do not put the ultrasonic sensor's pins all in the same set of holes where they will be short-circuited together.
- You will need to cut longer pieces of jumper wire to run between the ultrasonic sensor and the main breadboard.



Test the Walking Stick
Once you have the prototype built, it is time for some real-world testing! Remember that the engineering design process is iterative. It is OK if your design does not work perfectly on the first try - you can always change it and make improvements.
- Test it yourself to make sure the ultrasonic sensor and buzzer are still working properly.
- If it does not work, double-check that all your connections to the ultrasonic sensor are secure and that the ultrasonic sensor pins are not short-circuited together in the mini breadboard. If you are not sure, you can try rotating the sensor by 90 degrees in the breadboard to test this.
- Detecting obstacles with the stick is different from waving your hand in front of the sensor. Revisit the
thresholdandbuzzerDelayMin/Maxvariables, adjusting them if needed. What values provide the best overall combination of adequate warning without unnecessary beeping? - If possible, ask blind or visually impaired people to test your stick for you. Ask for their feedback. Can you incorporate it into an improved version of your design?
See the Variations section for more ideas about other features you could add to your project.
Ask an Expert
Global Goals
The United Nations Sustainable Development Goals (UNSDGs) are a blueprint to achieve a better and more sustainable future for all.
Variations
- Can you miniaturize the circuit using a smaller Arduino and breadboard to make the stick lighter and more compact?
- Can you solder all of the connections using a protoboard instead of a solderless breadboard? This will help make the design more permanent so the wires do not accidentally rip out during use.
- Can you think of other ways to make the stick more practical and durable for everyday use? What about waterproofing it for use in the rain?
- Can you add a water sensor to the tip of the stick to detect puddles?
- Can you power the Arduino with a rechargeable battery instead of a disposable 9V battery?
- For an advanced project, can you add a camera to the stick and use artificial intelligence and computer vision for object recognition? This will require something more powerful than an Arduino for processing.
Careers
If you like this project, you might enjoy exploring these related careers:
Contact Us
Our kits are developed in partnership with Home Science Tools®. If you have purchased a kit for this project, Home Science Tools® is pleased to answer any questions.In your email, please follow these instructions:
- Include your Home Science Tools® order number.
- Please describe how you need help as thoroughly as possible:
Examples
Good Question I'm trying to do Experimental Procedure step #5, "Scrape the insulation from the wire. . ." How do I know when I've scraped enough?
Good Question I'm at Experimental Procedure step #7, "Move the magnet back and forth . . ." and the LED is not lighting up.
Bad Question I don't understand the instructions. Help!
Good Question I am purchasing my materials. Can I substitute a 1N34 diode for the 1N25 diode called for in the material list?
Bad Question Can I use a different part?
Contact Support













