Have you ever wanted to give your projects the ability to sense their surroundings in a way that goes beyond cameras and sensors?
The BGT60 Radar Sensor is a fascinating tool that uses radar waves to detect distance and velocity, allowing you to create complex range profiles with ease. This project uses the CY8CKIT-062S2-AI Board from Infineon, which already includes the BGT60TR13C-Radar-Sensor. Of course this project works for other boards using the radar sensor.
The sensor enables new ways to interact with and understand the physical world, including proximity sensing and object detection. Whether you're a seasoned maker or just starting out, the BGT60 Radar Sensor is an exciting component to work with, offering a unique perspective on the world and a wealth of creative possibilities.
As we delve into the world of radar sensing with the BGT60 Radar Sensor, it's essential to understand the fundamental concepts that make this technology tick. One of the key aspects of radar sensing is the use of Fast Fourier Transform (FFT) to generate range profiles. But what exactly is FFT, and how does it relate to range profiles?
To start, FFT is an algorithm used to efficiently calculate the discrete Fourier transform of a sequence. In the context of radar sensing, FFT is used to transform the time-domain signal received by the radar sensor into a frequency-domain representation. This transformation allows us to extract valuable information about the environment, such as the distance of objects.
In a typical radar setup, we mostly only use the frequency-domain signal to analyze the input of the receiving antenna of the sensor.
This signal is generated when the radar sensor emits a chirp, a signal that changes its frequency over time. As the chirp is transmitted, it encounters objects in the environment, bounces off them, and returns to the sensor. The returned signal has undergone a slight frequency shift due to the Doppler effect, which occurs when the signal interacts with moving objects. By comparing the frequency of the original signal with that of the returned signal, the sensor can accurately determine the distance, speed, and other characteristics of the objects in its surroundings.
For this project we use a default setting of an upchirp. An upchirp is a signal which increases its frequency and restarts after a certain frequency threshold.
There's also a downchirp (frequency decreases) and a triangular chirp (frequency increases, then decreases). The use of a triangular chirp can help to mitigate the effects of Doppler shift, which can cause errors in the measurement of distance and speed. By using a triangular chirp, the sensor can effectively "cancel out" the Doppler shift, allowing for more accurate measurements.
A range profile, on the other hand, is a graphical representation of the distance of objects from the radar sensor. It's essentially a plot of the amplitude of the received signal versus the distance of the objects. By analyzing the range profile, we can gain insights into the surroundings, such as the presence of objects, their distance, and even their velocity.
When using the CY8CKIT-062S2-AI Board there is no hardware setup needed.
The Pins used by the CY8CKIT-062S2-AI Board are:
- MOSI (Master Out Slave In): P12_0
- MISO (Master In Slave Out): P12_1
- CLK (Clock): P12_2
- CS (Chip Select): P12_3
- Reset-Pin: P11_1
- IRQ-Pin (Interrupt, optional): P11_0
When using a different board be sure to connect the SPI-Interface (MOSI, MISO, CLK) to digital pins with SPI-Capabilities. The Chip-Select and Reset can be put to a regular GPIO-Pin.
The Interrupt-Pin is not necessary, but can be used to call functions after a certain condition and can be connected to a regular GPIO-Pin, as long as it can be configured as an External-Interrupt-Pin.
Install MicroPythonInstallation Guide can be found here on Hackster or on the MicroPython-Website.
Software SetupThe Software can be found here.
You can either use the given example code or create a new code-sample and import the library using mip.
The Range-Profile of the radar-sensor can be different based on the used board and bgt60-sensor. This means that to correctly detect the measured distances the threshold function should be modified if necessary.
Between the defined start and end indices, a linear function is generated to determine the threshold.
- Currently, only one of three receiver antennas is configured by the library
- This means that no angular resolution can be performed. Thus no tracking of objects or position detection can be done. However, the library is actively being improved, and users are encouraged to contribute to its development.
Check out this repo for more information on this project!
If you have any questions or suggestions don't hesitate to leave a comment below.
Comments