United Kingdom
Asked — Edited

Unable To Use Motion Sensor


I have just received my first EZ-Robot order and it was great to see how fast it was to get the camera up and running. Unfortuantely, my ultrasonic sensor does not appear to be working.

It looks like I have the same problem as here: https://synthiam.com/Community/Questions/6087&page=3

I can see the LED is on in the in-line voltage regulator and I've metered the digital control pins with a meter and see that I can set the values [ set (D10,on) for example), so it looks like the EZ-B is fine.

Can you help with confirming the green and white wire connections (which is signal and which is read) or let me know of anything else that I could be wrong? (The exchange department mentioned I needed to post here before going further)

Thank you, Dan


Upgrade to ARC Pro

Join the ARC Pro community and gain access to a wealth of resources and support, ensuring your robot's success.


Hmmm, you can't use the sensor with this "set (D10,on)"?... You will need to remove that and just open the Ultrasonic distance control to test the sensor... the one that shows the value of the sensor... Assuming it is hooked up correctly if it shows a constant value like 255 it may be not working...


@danb, Try this;

In this example the Trigger is connected to Port D0 and the Ping is connected D1 If it detects something within 65mm servo D22 should move to Postion 13

$proxclose = 65 # Change for minimum distance

# sensor check
$proxsense = GetPing(D0,D1)

IF($proxsense < $proxclose)
#move servo

You might have switch the Trigger and Ping wires around.

United Kingdom

To answer your question about confirming the wire colours Dan, the white wire is trigger and the green is echo so you will need to use two digital ports. Try connecting the sensor to the EZ-B as follows...

  1. Ground = Black wire to D10 black pin (regulator)
  2. Power = Red wire to D10 red pin (regulator)
  3. Trigger = white wire to D10 White pin
  4. Echo = green wire to D11 White pin

Click here and scroll down to the "Six-Distance sensor" project which is second from the bottom and download it. Adjust the digital ports in the ARC project to what you have your ping sensor connected to (in your case, D10 and D11 for echo).


I have the same problem. One of my sensors is stuck on 255 as well. I know that it must be the sensor as I have others that work fine. I hope I can return it,


These sensors are very sensitive to over-voltage. If you used it without a voltage regulator it is certainly ruined. Even if you used it correctly, they do sometimes burn out. They are also dirt cheap. I think you can get them on eBay (without the EZ-B voltage regulator or plastic case, which you can re use) or local electronic distributors for under $3. Search for HC-SR04.

I keep a couple of spares and would send you one but the postage from the US to Australia is far more than the part is worth.



Dear Alan

Thanks for the offer - in fact I think this just shows how remarkable the forum is for this kind of help to be given. In fact I bought 4 and 3 of them are working fine so I have more than enough. Happily they come with the voltage regulator already wired in so there should be no problem with the voltage.

This is not the problem with the faulty sensor but do they only work on certain connections to the EZ-B? I can't get any of my ultrasonic sensors to work on D23 and D22 but they spring into life on D7 and D8. I can't see that this is likely to be right but I think it is worth asking.

Also I notice that sometimes servos and motors on the roli don't work until you play with the controls and then all is good again. Is this normal?

I am having fun and certainly much more fun that work !

Cheers from sunny Sydney



I haven't heard about them not working on a specific port. I'll have free time Thursday and will try it out on those ports.

Very rarely I have the issue where Roli is unresponsive until restart him. Usually when the battery is starting to get low but before the low battery alert goes off.



Mind you I could not get the servo that works with the motion sensor working on these high port numbers either so perhaps there is a problem with my EZ-B ... I am sure that I will identify if the problems are real over the next few weeks. Happily I have two EZ-Bs so I am sure that I can narrow things down.


Hi @Zebrastripes


Also I notice that sometimes servos and motors on the roli don't work until you play with the controls and then all is good again. Is this normal?

If you use the Roli with the ARC Example Project you'll notice that there is an initialization script that activates the H-bridge. If you start from scratch and don't include this kind of script you'll have to move the PWM sliders at least once to activate the H-Bridge functions.


Thanks Jeremie - that solves one of my problems because this is exactly what I have experienced ... many thanks!



I can't get any of my ultrasonic sensors to work on D23 and D22 but they spring into life on D7 and D8.

I thought this was looked at by @DJ a little while back but yeah I've verified that the only 2 ports the ultrasonic doesn't work on are D22 and D23. I'm sure this is on his list of things to do already but it's a good reminder. Thanks @ZebraStripes for the heads up!


Thanks for confirming so quickly .. this is just something we can work around once we are in the know ... cheers, Chris

United Kingdom

Thank you for all your help. Unfortunately, my sensor still does not work., but everything else does.

I have some SRF08 sensors around, but they'd require doing a different control since they are strictly I2C driven.

United Kingdom

It looks like the problem is the in-line 5v regulator that came with the ez-bit is defective. Despite the red LED coming on, the output is a constant 0. Hooking the power up to another 5v power supply and my ultrasonic sensor is working fine!


good to hear - but very strange. Because the LED is powered by the output of the voltage regulator. Glad to hear you got it working on another supply. In the meantime, the wire must be damaged and not connected on the in-line 5v regulator (either the red or black wire). Because the LED gets its power from the +5 volt side, not the input side. This is because the input side is a varying voltage which we can't predict.


you can connect it the wrong way.

User-inserted image