Ultrasound and Sound Module

Ultrasound and Sound Module (HKBM8012K)

../../_images/06_042.png

This module combines ultrasound sensor and a microphone into the same module.

The ultrasound sensor is used to measure the distance of objects, the microphone is used to measure the loudness.

../../_images/IMG_25771.GIF

../../_images/IMG_25761.GIF

Details

../../_images/06_011.png

Specifications

  • Voltage: 3V-5V

  • Dimensions: 56mm X 24mm X 16mm

  • Connector: 4Pin PH2.0

  • Ultrasound Detection Range: 4cm-200cm(Recommended)

  • Analog Return Value Range: 0-1023

Precautions

  • Ultrasound works better on items with smooth surfaces, the smooth surface should be perpendicular to the module.

  • Ultrasound emits signal in the shape of an arc, make sure there is no obstacle in the signal range.

  • The microphone only determines loudness of a sound, it can’t measure decibels. Measuring decibels require professional equipment.

Connecting the module

Connect the Ultrasound Module to Armourbit with a 4Pin cable.

../../_images/ultrasound_wire.png

MakeCode Coding Tutorial

../../_images/mcbanner.png

Powerbrick Extension: https://github.com/KittenBot/pxt-powerbrick

Loading Extensions

Ultrasound Module Blocks:

../../_images/ultrasoundblocks1.png

Measuring distance

../../_images/distance1.png

Sample Code Link

Measuring ambient noise

../../_images/soundlevel1.png

Sample Code Link

Extension Version and Updates

There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.

Makecode Extension Update

Makecode Tutorial Video

../../_images/ultrasoundtut1.png

KittenBlock Coding Tutorial

../../_images/kbbanner.png

Load Powerbrick Extension

Select Powerbrick from the hardware column.

../../_images/addextension1.png

Ultrasound Module Blocks:

../../_images/kbultrasoundblocks1.png

Measuring distance

../../_images/kbultrasounddist1.png

Sample Code Download

Measuring ambient noise

../../_images/kbultrasoundlevel1.png

Sample Code Download

FAQ

1:Why is there no reaction when I click the blocks?

Make sure you have connected the Micro:bit correctly and flash the firmware again.