<p>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. <a href="https://mindsensors.com" rel="nofollow noreferrer">https://mindsensors.com</a>.</p>

CC BY-SA 4.0
2019-10-28T10:55:28.473Z
Well can I manually tell the sensor to send a pulse?
he77789
CC BY-SA 4.0
2019-10-28T15:43:23.750Z
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.
David Lechner
CC BY-SA 4.0
2019-10-28T23:49:51.157Z
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
CC BY-SA 4.0
2019-10-29T01:06:04.547Z
No, that is not possible.
David Lechner
CC BY-SA 4.0
2019-10-29T16:04:58.250Z
@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
CC BY-SA 4.0
2019-10-30T23:40:15.163Z
Well there is a "listen" mode. This means the controller can have multiple modes. Is there a list of commands or something similar to check if you can tell the controller to send a pulse?
he77789
CC BY-SA 4.0
2019-10-31T15:45:20.100Z
http://docs.ev3dev.org/projects/lego-linux-drivers/en/ev3dev-stretch/sensor_data.html#lego-ev3-us
David Lechner
CC BY-SA 4.0
2019-10-27T19:30:41.810Z
2019-10-27T19:30:41.810Z
David Lechner
<p>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.</p>

<p>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.</p>

<ev3><piece-information><programming><ev3-g>
Detect distances over 255cm with EV3 ultrasonic sensor?
he77789
# Detect distances over 255cm with EV3 ultrasonic sensor?

(Asked by: username_0 on 2019-10-27)

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.

**Tags:** ev3, piece-information, programming, ev3-g


---

## 1 answers

### Answer by username_1 on 2019-10-27. Score: 3

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>.

> **Comments:**
> **username_0**: Well can I manually tell the sensor to send a pulse?  
> **username_1**: 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.  
> **username_0**: 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?  
> **username_1**: No, that is not possible.  
> **username_2**: @username_0 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.  
> **username_0**: Well there is a "listen" mode. This means the controller can have multiple modes. Is there a list of commands or something similar to check if you can tell the controller to send a pulse?  
> **username_1**: http://docs.ev3dev.org/projects/lego-linux-drivers/en/ev3dev-stretch/sensor_data.html#lego-ev3-us  

---

