The CJMCU-530 is a breakout module featuring the VL53L0X by ST Microelectronics which is a laser-ranging sensor for distances of up to 200cm. The module works without problems with the ESP8266 which makes it an interesting option for your next IoT project.
This module has much more features than what I will describe here. I will just show how to connect the module to your ESP8266, which library to install and how to run your first measurements within minutes.
- Use four wires to connect the following pins:
- GND with GND
- VCC with V3V
- SLC with D5
- SDA with D6
- Open your Arduino IDE and install the following library from Sketch > Include Library > Manage Libraries: VL53L0X by Polulu
- Select from File > Examples > VL53L0X > Single the Example sketch and change the following line
- Compile your sketch, upload it to the ESP8266 and open the serial console. If everything went well you should see now the millimeters of distance measured by the laser-ranging sensor.
At first my measurements were really inaccurate and I was disappointed that the values were always off by about 20mm! Then I searched the web and found out that often the sensor is covered by a protection. Remove this protection to get very precise measurements
After removing the protection the measurements were really good. I just tested values below 30cm and the were within 1mm accuracy. This might be a good option for a robotics project to apply SLAM.
Where to buy?
The CJMCU-530 is a affordable and accurate laser-based range sensor. The break-out board offers many features (which I haven’t tested yet) but it is always promising to have more features to test after the initial run. Compatibility with the ESP8266 is good and you just need to change one line in the sample code to get it running with our preferred WiFi chip.