This document describes the design and implementation of an obstacle avoidance system for quadcopters using an ultrasonic sensor. The system was designed to prevent collisions and accidents by allowing the quadcopter to detect and avoid obstacles. An ultrasonic sensor is mounted on the front of the quadcopter to detect obstacles within 4 meters and an algorithm was developed to control the quadcopter's movement based on sensor readings, overriding manual controls when needed to navigate around obstacles. The system was simulated using Webots software and could potentially be implemented on commercial drones to increase safety.