Project in progress
Mindstorms EV3 and the VL53l01x laser distance sensor

Mindstorms EV3 and the VL53l01x laser distance sensor © GPL3+

The VL53l01x distance sensor as EV3 sensor.

  • 748 views
  • 0 comments
  • 3 respects

Components and supplies

Uploads2ftmp2f8d3ea1c6 2e62 4b41 b797 18c614b2bd432fscreenshot2019 08 1612 02 29 xfjm5mxtfv
STMicroelectronics VL53L0X
×1
11113 01
SparkFun Arduino Pro Mini 328 - 5V/16MHz
But not this one find a 328PB board for the second hardware serial port or use softwareserial
×1
W2n7xihmvtbrsn3ltjpc
LEGO MindStorms EV3 Programming Brick / Kit
×1
Electronic Circuit Experiment Board
×1

About this project

The VL53L0x is a very nice and small 2 meter measuring laser distance sensor.

So why not use it as replaced for the LEGO EV3 Ultrasonic sensor.

Take a Pro-min 5V 328P or 328PB controller connect the Pololu VL53L0x breakout board and make it an EV3 Uart sensor that measures cm or inch.

The 2 resistors 2k2 and 220 ohm are optional .

Than I made a EV3-G block for it with cm and inch compare and measure .

That's all folks.

Warning:

The Arduino code I made is for a 328PB board, if you want to use a 328P you

need the softwareserial driver and the Uartemulationsoft library from:

https://github.com/lawrie/EV3_Dexter_Industries_Sensors/tree/master/EV3_arduino

There is a bug in the Uart emulation library's, DATA32 and DATAF will not work.

I updated the hardware library. that is with the my Arduino code zip file.

If you want to use the soft version of the uart library change the code:

Code was:
void EV3UARTEmulation::send_data32(long l) {
byte bb[4];
bb[0] = l & 0xFF;
bb[1] = (l >> 8) & 0xFF;
bb[2] = (l >> 16) & 0xFF;
bb[3] = (l >> 24) & 0xFF;
send_cmd(CMD_DATA | (2 << CMD_LLL_SHIFT) | current_mode, bb, 4);
}

=====================================================

I changed it into:
void EV3UARTEmulation::send_data32(long l) {
byte bb[4];
bb[0] = l & 0xFF;
bb[1] = (l >> 8) & 0xFF;
bb[2] = (l >> 16) & 0xFF;
bb[3] = (l >> 24) & 0xFF;
send_cmd(CMD_DATA | (2 << CMD_LLL_SHIFT) | current_mode, bb, 4);
}

Do not connect the power supply's of the USB TTL to serial and the EV3 at the same time. This will destroy one of both.

Optional:

You can also use the VL53L1x laser sensor, this one measures up to 4 meters.

But you have to change the Arduino code not the EV3 block

Or connect more than one VL53Lxx sensor. Maybe a project for the next time.

Code

EV3 Distancesensor blockXML
open EV3-G software--> new project--> import block
No preview (download only).
Arduino code for EV3 VL53L0x laser distance sensorC/C++
EV3 ultra sonic sensor replacment and cheaper.
No preview (download only).

Schematics

EV3 Vl53L01x sensor schematic
Ev3 vl53l0x connections bktohyq9o7

Comments

Similar projects you might like

Autobot Using Lego NXT Motors and Sensor

Project tutorial by Mark Tashiro

  • 20,498 views
  • 6 comments
  • 27 respects

Arduino Two Ultrasonic Sensor Radar - 360 degrees Rotation

Project showcase by Team MicroLab Greece

  • 17,242 views
  • 13 comments
  • 44 respects

IR Distance Sensor

by vicente zavala

  • 10,090 views
  • 0 comments
  • 9 respects

Autonomous EV3 Color Tower Explorer

Project tutorial by Jose Cruz

  • 618 views
  • 1 comment
  • 6 respects

WW2 Tank Laser Tag Sherman & Panther

Project tutorial by Arduino “having11” Guy

  • 19,408 views
  • 1 comment
  • 60 respects

Amazing 6WD Off-Road Robot | Arduino RC Robot

Project tutorial by Jithin Sanal

  • 9,983 views
  • 0 comments
  • 54 respects
Add projectSign up / Login