Using the A111 Pulsed Radar Sensor with a Raspberry Pi

Introduction

Experimental Products: SparkX products are rapidly produced to bring you the most cutting edge technology as it becomes available. These products are tested but come with no guarantees. Live technical support is not available for SparkX products.

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.

Required Materials

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.

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.

A111 Breakout plugged into a Raspberry Pi.

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

⚡ Input Voltage and Logic Levels: This board breaks out both "VIN" and "VCCIO" pins. "VIN" should power the sensor, which can consume up to about 80mA. "VCCIO" sets the I/O voltage, which may be lower than VIN.

The Raspberry Pi pin breakouts, for example, connect VIN to 5V and VCCIO to 3.3V, as the Raspberry Pi's 3.3V bus may not be able to fully power the A111, but the Pi can only handle 3.3V I/O.

Get the SDK

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.

SCP the SDK to Your Pi

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.

Using WinSCP to drag-and-drop the SDK into the home directory of your Pi.

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:

Adding Custom Example and Board Files

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”.

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.

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

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:

Getting started guide for the Large Digit display driver board. This tutorial explains how to solder the module (backpack) onto the back of the large 7-segment LED display and run example code from an Arduino.

The TFMini is a ToF (Time of Flight) LiDAR sensor capable of measuring the distance to an object as close as 30 cm and as far as 12 meters! The TFMini allows you to integrate LiDAR into applications traditionally reserved for smaller sensors such as the SHARP GP-series infrared rangefinders.

In 2003, CU student Nate Seidle fried a power supply in his dorm room and, in lieu of a way to order easy replacements, decided to start his own company. Since then, SparkFun has been committed to sustainably helping our world achieve electronics literacy from our headquarters in Boulder, Colorado.

No matter your vision, SparkFun's products and resources are designed to make the world of electronics more accessible. In addition to over 2,000 open source components and widgets, SparkFun offers curriculum, training and online tutorials designed to help demystify the wonderful world of embedded electronics. We're here to help you start something.