Micro:bit

& Ultrasonic Sensors

Overview

How to use an ultrasonic sensor with a micro:bit:

Section 1: Ultrasonic Sensors

Section 2: Using a US-015 Ultrasonic Sensor (3V)

Section 3: Using a HC-SR04 Ultrasonic Sensor (5V)


Section 1: Ultrasonic Sensors

US-015

HS-SR04

Ultrasonic sensors come in a variety of models. Some of the most common ultrasonic sensors available are the US-015 (3V) and the HC-SR04 (5V).

Section 2: Using a US-015 Ultrasonic Sensor (3V)

Video Coming soon

The images below gives a quick overview of the wiring, code and basic concepts.

Section 3: Using a HC-SR04 Ultrasonic Sensor (5V)

The images below gives a quick overview of the wiring, code and basic concepts.

A voltage divider circuit (Basic example shown directly below) is used to ensure that excess voltage doesn't damage the micro:bit. In our diagram, you can see how the voltage divider (1k & 2k) circuit is used to reduce the voltage

Section 4: Ultrasonic Sensor Demo Rig