In my use case, I have to detect things about 3-4 meters. I don't need to be accurate, +-2 or 3cm is enough. The EV3-G and most other places have a max distance of 255cm, which I understand that it is a protocol limitation.

But is there a software solution, e.g. controlling send/receive with software and calculate on the main brick? Best if it is in the form of EV3-G custom blocks.

1 Answer 1


It is not a protocol limitation. It is a sensor limitation. There is a microcontroller on the LEGO EV3 Ultrasonic sensor that cannot be updated so there is no way to measure more than that. So to measure more than 255cm, a 3rd party sensor is needed, e.g. https://mindsensors.com.

  • Well can I manually tell the sensor to send a pulse?
    – he77789
    Oct 28, 2019 at 10:55
  • I'm not sure what you mean, but there is an "Advanced" mode of the sensor that takes a single reading instead of measuring continuously. This mode is intended to prevent multiple ultrasonic sensors from interfering with each other. Oct 28, 2019 at 15:43
  • As distancing is just measuring the time between the emitted pulse and reflected pulse, can we use the main EV3 brick to emulate the on board weaker chip?
    – he77789
    Oct 28, 2019 at 23:49
  • No, that is not possible. Oct 29, 2019 at 1:06
  • @he77789 According to the EV3 Hardware Development Kit, the ultrasonic sensor has a small 8-bit controller inside which communicates over UART with the EV3. This is probably where the limitation of 255cm comes from: 8-bits cannot represent numbers larger than 255. And since the controller is physically between the EV3 and the sensor hardware, the EV3 can't ping the sensor manually.
    – MindS1
    Oct 29, 2019 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.