KD0024 kidsbits Blocks Coding Obstacle Avoidance Sensor

1. Description

kidsbits blocks coding obstacle avoidance sensor is fully compatible with kidsbits control board and Lego building blocks.
You can easily connect it to kidsbits control board for communication using an RJ11 cable without worrying about wrong connection and damage.

The kidsbits infrared obstacle avoidance sensor mainly includes an infrared transmitter and an infrared receiver.
When infrared ray launched by the transmitting tube encounters an obstacle (its reflector), the infrared ray is reflected to the receiving tube, after a comparator circuit processing, the indicator will light up.
Power on the sensor, the signal end will output HIGH level, POW LED is normally on, but SIG LED is off.
When the sensor detects a front obstacle, the signal end will output LOW level, SIG LED is turned on.

You can adjust the measured distance by rotating the potentiometer knob. The effective distance range is between 2~30cm.
They can be widely used in robot obstacle avoidance, avoidance car, line count, and black and white line tracking and many other occasions.

2. Technical Parameters

  • Interface: EASY plug
  • Operating voltage: DC 5V
  • Output signal: digital signal
  • Sensing distance: 2-30cm

3. Wiring Diagram

4. Import kidsbits library

Begin with the Mixly blocks coding, you should first import the corresponding kidsbits library for those sensor modules.
Connect the control board to your computer using a USB cable.

Then open the Mixly blocks software 0.998, set the board to UNO R3, select your correct COM port. On the upper right corner you can switch the language.

After that, click Import, import the keyes-kidsbits library. Shown below.

If import custom library successfully, you should see the sensor module library shown below.

Click on the display screen block of keyes_kidsbits, you can directly use the corresponding module.

5. Test Code

Open the code folder we provided, or you are able to directly drag the code to Mixly window.

You can click the Code to check the C language.

6. Test Result

Wire it up and upload the code success, powered on, when the sensor detects an obstacle ahead, Signal LED on the sensor and D13 indicator will turn on.

If no detecting the obstacles, both LEDs will turn off.

7. Adjust the sensitivity

  • Power on, adjust the pulse potentiometer clockwise to the end.
  • Adjust the signal potentiometer to make the SIG LED between non-bright and bright threshold.
  • Adjust the pulse potentiometer again to make the SIG LED between non-bright and bright threshold. The sensitivity is the best and the sensing distance is the longest.

8. Resources Download