Based on the design of the popular HC-SR04, SGBotic Ultimate SR04 RGB Ultrasonic Sensor offers some interesting features in addition to the solid performance of the classic HC-SR04. This sensor improves on the classic by adding a microcontroller to process the information gathered by the ultrasonic transducers, upgrades the regular transducers pair to one with embedded RGB LED, and uses I2C to interface to the host controller for distance measurement and controlling the colour of the LEDs. .
By processing the distance measurement on board using a dedicated microcontroller, the Ultimate SR04 RGB Ultrasonic Sensor free up the host controller resources from keeping track of the trigger / echo timing, and improves the range accuracy. Measured distance is presented in centi-meter and micro-second.
The I2C address of the Ultimate SR04 RGB Ultrasonic Sensor can be changed by user program, allowing multiple units of the sensors to be placed on a single I2C bus. The light intensity and colour of the RGB illuminate transducers can also be set by user program using the same I2C connection. An onboard 2.54mm pitch 2x4 pin header allows the sensor to be plugged into a solderless breadboard as well as daisy-chain to other units.
To allow a quick measurement for multiple units on a single I2C bus, the Ultimate SR04 RGB Ultrasonic Sensor uses separate command to start the measurement and read back the result. Instead of triggering and waiting for the data to be ready for each unit, user can trigger the units consecutively and start reading back the result of all units after a short delay.
The physical dimension of this sensor is kept close to the classic HC-SR04 to ensure that it fixes most, if not all, of the existing mounting brackets. We have also enlarged the four mounting holes to 2mm diameter.
Like the classic HC-SR04, the sensing distance of Ultimate SR04 RGB is from 2cm to 400cm (4-meters).
Note: This module supports default Arduino I2C speed (100KHz). It does not support 400KHz I2C.
- Supply voltage: 3 to 5VDC
- Sensing range: 2cm to 4 meters
- Operating current: ~20mA
- Distance measurement in cm and micro-second
- I2C address setting from 0x08 to 0x71, default: 0x60
- RGB illuminate transducers
- 2.54mm pitch header, breadboard friendly, no soldering required
- 45 x 20 x 15.8 mm
- Weight 8.5g
- User guide
- Arduino library (with examples) (Arduino Atmega board, ESP32, ESP8266)
- Tutorial - Arduino
- Tutorial - Microbit
- Micro:bit MakeCode extensions (github)
- Micro:bit microPython examples (github)
- Raspberry Pi Python examples (github)