Rotatory Mindstorms EV3 Sonar

Is it possible to rotate the radar over its own axis much like a real radar? Well, I was asked this a few days ago and I though it was a nice question and a interesting building.

rotating-ev3-ultrasonic-radar

So, yes, it is possible, and above you can see the finished creation. The overall idea is to place the whole radar over a turntable and turn it to make the rotary motion.

You can see it working on the next video.

So I rewrote the program that run the sonar to draw correctly the distances. In this case it is more bold the problem of drawing what would be a circular area into a rectangle shape. As soon as I finish installing LeJOS on the EV3 brick I will write the program in Java and write the part that communicate the robot with the computer so it can be draw on the computer screen instead of the EV3 brick ( which it is pretty unreadable now as it is spinning ).

rotating-radar

The program is quite simple.

Just turn the motor on and keep reading distance and motor rotations. As soon as the radar rotates a full 360 degrees we reset the motor rotations. So the only real problem here is to know when the radar rotates 360 degrees.

rotating-ev3-ultrasonic-radar-m-motor-details

If you check the motor rotation and reset it at 360º you will find that the result is incorrect, if you see the above image, when the motor turns it moves a 12 teeth gear that it is coupled with another 12 teeth gear that it is in the same axle that a 24 teeth gear that turns a 56 teeth turntable. Still there?

rotating-ev3-ultrasonic-radar-turntable-details

So what’s the gear relation? 56:24… so to rotate a full 360 degrees on the radar we need to rotate the motor (56/24)*360 degrees.

And well… that’s pretty much all the hard stuff of this program.

You can download the code from here.
[sociallocker]
SoftwareLarge EV3 Source Code file
[/sociallocker]

Miguel says…

Well, that’s all folks. Now I am really concentrated on my upcoming LEGO LOGO Turtle or the Sumo Robot or the train diorama or or or or…

Leave a Comment