Date: May 28, 2014 Category:

Dexter Radar . . . or dRadar for short. This project was put together to test the limits of the Lego NXT ultrasonic sensor.  The sensor, mounted on a motor, spins and takes data on the area surrounding it.

## Making the Radar from LEGO

[box]SOFTWARE AND TOOLS: The dRadar uses the program found here.

The software slowly spins the lego radar around 180 degrees, back and forth about 5 times.  Distance to a reflecting object is measured.  The time, rotational position, and distance is all recorded in a file on the NXT called MyFile.  The data can be imported into an MS Excel sheet.

Data is in polar coordinates, and can be converted into Cartesian using simple trigonometry.  Examples are in the spreadsheets below.

[/box] [box]PIX AND VIDEO: Some photographs are included to the right to give it a better idea of the construction. Skip the video below to see some of the testing we did, and the 2-D maps we made.

[/box]

[box]“SEEING” OBSTACLES WITH DRADAR: Below we test the dRadar to see if it can produce a map of some obstacles we set around it. This is a little more advanced than just detecting objects a vehicle or robot might run into. We want a map of what the area looks like: distances, some idea of the shape of the object.

To test this, we setup a few different configurations, with different objects, distances, and positions. We included a measuring tape so we can check the distances produced by the radar for accuracy.

[/box] [box]THE CORNER: We found a corner of our office to work in. A picture of the corner is found to the right.

In the first test, we ran the dRadar with no obstacles to see what we got back. The text data was loaded up in excel, and then we treated it with cos and sin functions to get our X,Y coordinates. These were graphed in excel. A picture of the first data is to the right.

The axis are in centimeters. You can see a very clear arc that starts at the left at exactly 250 cm from the origin (where the radar is), and sweeps around the origin at 250 cm.

On the first test, we can see one response at about X = 150 and Y = 100. Why didn’t the sensor pickup the walls in the corner? And why, when there’s nothing there, did we get the response at 150,100? The first question is probably because the sound waves hit the walls at such a high angle, they did not return to the sensor. We probably got the response at 150, 100 because, if you look at the picture, at that angle the sensor is directly orthogonal (or 90 degrees) to the sensor. Because the sensor is 90 degrees, we get a good “bounce” back from the wall, to the sensor.

[/box] [box]THE CORNER AND THE BOX: In the second test, we’ll try adding an obstacle and see what kind of return we get. The first obstacle, which should be the easiest for the radar to “see” should be a box of some sort, with a flat surface to bounce the sound waves off. The box is about 50 CM from the radar. You can click on the pictures on the right for a better view. We ran this with the same program, and imported the data into an Excel sheet. The data can be found here.

The results are shown to the right. We can see the same artifact we talked about above, where the sensor picks up a signal from the wall.

But we can also see the box. The box, at a 90 degree angle from the sensor, gives a very strong and crisp response at x = 0, y = 50. The distance is accurate: the box has been placed at about 50 CM from the sensor, directly in front of it.

We can zoom in on the box data to see it a little better, shortening the graph’s axes.

Success! The dRadar can pickup objects at accurate distances!

The axis are in centimeters. You can see a very clear arc that starts at the left at exactly 250 cm from the origin (where the radar is), and sweeps around the origin at 250 cm.

On the first test, we can see one response at about X = 150 and Y = 100. Why didn’t the sensor pickup the walls in the corner? And why, when there’s nothing there, did we get the response at 150,100? The first question is probably because the sound waves hit the walls at such a high angle, they did not return to the sensor. We probably got the response at 150, 100 because, if you look at the picture, at that angle the sensor is directly orthogonal (or 90 degrees) to the sensor. Because the sensor is 90 degrees, we get a good “bounce” back from the wall, to the sensor.

[/box] [box]THE CORNER AND THE CYLINDER: We’ll try one final test, with something a little more challenging. Let’s put a cylinder in there, to see how the sensor responds. This could be a little tougher to detect, and probably less crisp of a response, because the cylinder is not a flat object. To the right is a picture of the setup.

The data from the setup can be found here.

We can see on the right that the data came out pretty clean and the sensor had a good response to the cylinder.

A closeup of the data shows a very crisp response from the radar, despite the fact that the cylinder is round. We can see a smaller width than the box, which tells us the radar can tell between wide and thin objects.

The axis are in centimeters. You can see a very clear arc that starts at the left at exactly 250 cm from the origin (where the radar is), and sweeps around the origin at 250 cm.