
Gerald
USA
Asked
— Edited
I got a problem when I got my distance sensor.
Is there any tutorials that teach how to connect the distance sensor in EV4?
I got a problem when I got my distance sensor.
Is there any tutorials that teach how to connect the distance sensor in EV4?
I bought roli, and it has an ultrasonic with it when it came. I also bought several ultrasonic sensors which work fine in arduino uno. But when I test the roli ultrasonic distance sensor to the arduino uno, it didn't work in both 3.3v and 5v.
And I test both sensors to the ev4, none of them work.
I'm wander whether the triger pin and echo pin should connect to the analog or digital?
Trigger on port 0 and echo on port 1 for example.
Red and black can be off of port 0 passing through a voltage regulator for 5 volts.
Then in ARC specify port 0 as trigger and port 1 as echo.
These are all digital.
What kind of regulator do I need? When I got roli, it did have a small circuit within the cable, I guess that's the regulator, right?
And where can I buy regulator, because I may install multiple sensors to ev4 for my project.
It will have two black wires going into it and 2 wires coming out. These wires will be black and red both going into and out of the circuit.
What I did is connect trigger pin to port 23, echo pin to port 22, and connect ground and vcc pins to port 21, but ARC can't show any distance but 255.
Here are the images of my settings.
And I'm sure this ultrasonic distance sensor works because I test it in arduino successfully.
I'm not sure which step is wrong!
Alan
As well as what Alan has already mentioned, another thing to check is if you wired up the regulator correctly, by that I mean EZ-B to "V IN" and "V OUT" to sensor. If it's reversed, that could damage the regulator and possably the sensor also. Check the sensor with the Arduino again and see if it's still working.
Try connecting the ground and VCC to the same pin as your trigger.
For example: Vcc, Ground and Trigger - Port22 and Echo to Port 23. (You can any 2 ports) That's how I have mine set up and they work great.
I think the problem is the original ultrasonic distance sensor that roli comes whit is broken. Because I believe I must tested it before when I first got roli, and it didn't wokr. Also, I test it in my arduino, it doesn't work neither.
Anyway, I finally figure it out, thank you for your help.