Using the A111 Pulsed Radar Sensor with a Raspberry Pi

This Tutorial is Retired!

This tutorial covers concepts or technologies that are no longer current. It's still here for you to read and enjoy, but may not be as useful as our newest tutorials.

View the updated tutorial: Getting Started with the A111 Pulsed Radar Sensor

Pages
Contributors: jimblom
Favorited Favorite 3

Build and Run the Test Sketch

Building the Board and Example Applications

Once uploaded to your Pi, executing the make file -- and it's recursive dependencies -- should build all of the examples you may use with the A111. To build all board and example files, navigate to the SDK's top-level directory and type make.

make example

Troubleshooting

If you have any trouble building the board and example files, ensure that you have gcc and make packages installed. (E.g. apt-get install make gcc)

Running the Example Applications

Once compiled you can run the example application (from the top-level SDK folder) by typing:

./out/sparkx_detector_distance

Example application run

This will run our modified distance-detector example application. This application will begin by calculating raw peak-distances, with a maximum of ten reflections. Following about 125 samples, the example will briefly estimate minimum and maximum thresholds, then continuously monitor for nearby objects until CTRL + C is pressed.

Evaluating the Example Application

The output of the example application can be a little difficult to parse. Here's an example output, and an explanation of what each of those values printed out means:

Distance detector: Reflections: 5. Seq. nr: 424. (200-700 mm): 648 mm (137), 658 mm (250), 665 mm (255), 676 mm (209), 686 mm (65)
  • Reflections: \<r> -- r is the number of reflections -- a value between 0 and 10 -- visible to the A111 sensor.
  • Seq. nr \<n> -- This number -- n -- should increment with each successive measurement.
  • (200-700m) -- This is the set measurement range of the A111 sensor.
  • \<d0> mm (\<a0>), \<d1> mm (\<a1>), ... -- dn in this example is the distance of reflection n and an is the amplitude of that reflection.

Running Other Examples

In addition to the distance detector, the SDK includes a few extra examples. To execute these files, run them from the out directory:

  • sparkx_envelope_service_example -- Reads in the envelope data, which us usually further-processed and used in distance, measurement, or other types of algorithms.
  • sparkx_envelope_iq_example -- Advanced version of the envelope service, which includes phase information for very small variations in distance.
  • sparkx_power_bins_example -- Demonstrates how to use A111 "power bins," which are still, kind of, a mystery to us...