1. sonar:bit

1.1. Introduction


Sonar:bit is an ultrasonic module with 3-5V working voltage. It is available to be used to 3.3V or 5V micro-controller system. With only one 3-wire(GVS) cable, it can work properly. Compared to the normal 4-wire ultrasonic module, it has saved one IO port. The measurement range of sonar:bit is 4cm-400cm. It can output stable and accurate measurement data with ±1cm tolerance only. You can use this module to occasions like short-distance measurement, smart cars, robots, micro:bit and arduino teaching, etc..

../../_images/pdBREKf.jpg

1.2. Features


  • Input voltage:3V~5V

  • Enable to drive micro:bit or arduino directly.

  • Standard 3-wire GVS connecotr, which occupies 1 IO port only.

1.3. Parameter


../../_images/G7YHeuJ.png

1.4. Dimension


../../_images/h4HcvxO.jpg

1.5. Definition of Pins


../../_images/7E5ECzN.jpg

1.6. Introduction of Major Components


Transmitter

../../_images/T1xDsne.jpg

Transmitter is used to send ultrasonic signals.

Receiver

../../_images/JxNrz8Q.jpg

Receiver is for collecting ultrasonic signals.

MCU

../../_images/2CjnvfP.jpg

This is the master chip of sonar:bit.

Chip for Sending Signal

../../_images/iOW0IN3.jpg

This chip is used to drive the transmitter to send out ultrasonic signals.

Chip for Receiving Signal

../../_images/VxEZ5KQ.jpg

This chip is used to receive and process ultrasonic echo signals as well as give feedbacks to the master chip.

G-V-S Port

../../_images/N9yc6Jm.jpg

G-V-S port allows outer devices control.

1.7. Quick Start


Hardware Connection

Connect sonar:bit to P2 port on sensor:bit and connect micro:bit to your computer.Once completed, you can see the picture below:

../../_images/fvYx5lR.jpg

../../_images/wCftg3Y.jpg

Programming

Click to open Makecode online editor.

Write your program to assign the returned value of P2 to variable distance and display it on micro:bit screen.

../../_images/sbRh3HL.png

You can see the whole program from the link here: https://makecode.microbit.org/_b7JL2Yd3q3Km

Or you can download it from the page below:

Result

We can see the distance between sonar:bit and the object is displayed on micro:bit in real time. The unit is centimeter.

1.8. Document


WIKI

1.9. FAQ