NekoUltraSound Sensor

NekoUltraSound Sensor (HKBM8014A)

../_images/ultrasound2.png

This is an ultra sound distance sensor.

Specification

  • Voltage: 5V

  • Working Tempeature: -25 ~ +80°C

  • Signal Span: 30° Arc

  • Detection Range: 5~300cm (Error<1cm)

  • Interface: 4Pin Dupont Cable

Wiring Diagram

The Ultra Sound sensor must connect to 5V.

../_images/ultraSound1.jpg

Ultra Sound Sensor V2

Connect the A(RGB LED) and D(Sensor) pin of Ultra Sound Sensor V2.

../_images/ultraSoundv2_wire.png

Ultra Sound Sensor V1

Connect the Ultr pin of Ultra Sound Sensor V1.

../_images/ultraSoundv1_wire.png

MakeCode Coding Tutorial

../_images/mcbanner.png

../_images/acbanner.png

This module can be used with Microbit and Meowbit.

Microbit:

Load Robotbit Extension: https://github.com/KittenBot/pxt-robotbit

How to load extension?

Ultra Sound Sensor blocks:

../_images/ultraSound_blocks.png

Reading the distance:

../_images/ultraSound_code1.png

Sample Code Link

Controlling the RGB LED(only for V2):

../_images/ultraSound_code2.png

Sample Code Link

Demo Case:

../_images/ultraSound_code3.png

Sample Code Link

Meowbit:

Load Robotbit Extension: https://github.com/KittenBot/meow-robotbit

How to load extension?

Load NeoPixel Extension:

../_images/neopixel.png

Ultra Sound Sensor Blocks:

../_images/ultraSound_blocks.png

Reading the distance:

../_images/ultrasound_codeMeow1.png

Sample Code Link

Controlling the RGB LED(only for V2):

../_images/ultrasound_codeMeow2.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

KittenBlock Coding Tutorial

../_images/kbbanner.png

Load Robotbit extension

../_images/addRB.png

Reading the distance:

../_images/ultraSound_code4.png

Controlling the RGB LED(only for V2):

../_images/ultraSound_code5.png

Mu Editor Coding Tutorial

Reading the distance:

../_images/ultraSound_code6.png

The logic works by writing a broadcast signal then measuring the time taken for the signal to bounce back to the sensor, multiplying this time by the speed of sound gives us the distance.