Does your project require high-precision, cutting-edge distance, speed, motion, and/or gesture sensing? We're not talking ultrasonic, or even infrared here, but 60GHz radar! Say hello to our tiny, pulsed radar friend the Acconeer A111!
The A111 is a single-chip solution for pulsed coherent radar (PCR) -- it comes complete with antennae and an SPI interface capable of speeds of up to 50MHz. Applications for PCR include distance-sensing, gesture, motion, and speed detection. The sensor can monitor one-or-more objects at distances of up to two meters.
Our breakout board for the A111 includes a 1.8V regulator, voltage-level translation, and it breaks out all pins of the pulsed radar sensor to both 0.1-inch and Raspberry Pi-friendly headers.
To use the A111 you'll need either an ARMv7 or an ARM Cortex-M4 -- the closed-source SDK currently only supports these architectures. This tutorial will explain how to use the radar sensor with a Raspberry Pi -- a platform based on an architecture supported by the A111's SDK.
The A111 Breakout includes a 20-pin, 2x10 female header, which should mate to Raspberry Pi's of any generation. If you'd rather manually wire the A111 to your Raspberry Pi, male headers and about 9 male-to-female wires should do the trick.
You will need a soldering iron, solder, and general soldering accessories.
Raspbian and SPI
This tutorial assumes you've already set up a Raspberry Pi with Raspbian. For help installing the Debian-based OS on your Pi, check out the docs on Raspberrypi.org. Or -- better yet! -- check out our Headless Raspberry Pi Setup tutorial.
You'll also need to enable SPI on your Pi. For help with that, check out our SPI on Pi tutorial.
The A111 Pulsed Radar Breakout is designed to sit directly on top of a Raspberry Pi. It doesn't span all 40 (2x20) pins of a Raspberry Pi B+ (or later), but the 26-pin -- 2x13 -- header should be compatible with any Pi.
Solder the 2x13 header so the female side is facing away from the greenish-black A111 IC. Then connect the shield to a Raspberry Pi ensuring that the "Pi Display" text on the breakout matches up with the display header on your Pi. The sensor should be facing up after plugging it in.
Or, if you'd like to manually wire the breakout up to a Pi, here is the pin-out we'll use through the rest of this tutorial:
Breakout Pin | Raspberry Pi Pin Name | RasPi Pin Number |
---|---|---|
CS | SPI0 CS0 | 24 |
SCLK | SPI0 SCLK | 23 |
MISO | SPI0 MISO | 21 |
MOSI | SPI0 MOSI | 19 |
INT | GPIO25 | 22 |
EN | GPIO27 | 13 |
VCCIO | 3.3V | 1,17 |
GND | GND | 6, 14, 20, etc. |
VIN | 5V | 2, 4 |
The software development kit (SDK) for the A111 is, unfortunately, locked behind a closed source blob that currently only supports Cortex-M4 and ARMv7 platforms. To download the SDK, visit Acconeer's "Products" page.
Towards the bottom, under the "A1 Software Development Kit" header is a link to GET SOFTWARE**. Read through the license, agree, and then request the A1 SDK for Linux ARMv7 software.
After supplying your email address, you should receive a download link email nearly instantaneously.
Once downloaded, you'll probably need to transfer the ZIP'ed SDK over to your Pi. To achieve this, we recommend SCP. If you're on Windows, WinSCP works very well for transferring files from one device to another.
If you're on a Mac or Linux machine, with SCP available, you can use a command like the below to copy the ZIP file over:
language:bash
scp acconeer_evk_service_linux_armv7l_xc111_r4a_xr111-3_r1c_a111_r2c_v1_3_5.zip 192.168.0.100:~
Once uploaded, you can use the terminal to unzip the SDK using the following commands (included are commands to install unzip):
language:bash
unzip acconeer_evk_service_linux_armv7l_xc111_r4a_xr111-3_r1c_a111_r2c_v1_3_5.zip -d a111
Then cd
to the "a111/evk_service/..." directory to prepare to build the example software.
The A111 SDK includes source code, archived libraries, include files, and documentation for using the A111 pulsed radar sensor. Here's a quick overview of what's included with the SDK:
The SparkFun A111 Breakout's default pins will not work with those of the SDK's examples. To build and run an example with this board, we have an example board definition, make scripts, and example applications. Click the button below to download these files from the GitHub repo:
If you copy this ZIP file to your home directory, this command will unzip it to the right directory (assuming your SDK was unzipped to: "~/a111/evk_service_linux_armv7l_xc111_r4a_xr111-3_r1c_a111_r2c".
language:bash
unzip sparkx-a111-source.zip -d a111/evk_service_linux_armv7l_xc111_r4a_xr111-3_r1c_a111_r2c
The SparkX ZIP includes these files, which should be extracted to their matching SDK directories:
Once downloaded, these files should be extracted to the like spot in the original ZIP file.
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
.
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
)
Once compiled you can run the example application (from the top-level SDK folder) by typing:
./out/sparkx_detector_distance
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.
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)
In addition to the distance detector, the SDK includes a few extra examples. To execute these files, run them from the out directory:
If you need any reference material surrounding our A111 Breakout Board, check out this documentation:
For help building bigger, better applications around the A111, refer to Acconeer's SDK documentation, including:
Need some inspiration for your next project? Check out some of these tutorials for ideas:
learn.sparkfun.com | CC BY-SA 3.0 | SparkFun Electronics | Niwot, Colorado