Parking Assist with SEN0395 mmWave Radar
The goal of this project is to use the capabilities of the SEN0395 mmWave Radar sensor to assist drivers in positioning a vehicle in a garage.
Novice drivers sometime have a difficulty parking a vehicle in a garage so that it is not too far in or out. One method to help a driver is to suspend an object from the garage ceiling. When the vehicle enters the garage and the object touches the window, the vehicle is correctly positioned.
Let’s use RADAR to solve the problem.
What is RADAR? RAdio Detection And Ranging is a technology that came into its own during the 1930s and 40s to assist the armed forces.
RADAR is a electronic technology that transmits electromagnetic energy (radio waves} towards objects (targets). When detected (illuminated), it uses the energy that bounces (reflected) from the object to determine distance (ranging), angle (azimuth) and speed (radial velocity) of the object relative to the transmitting site.
RADAR uses a transmitting antenna to send a narrow beam of electromagnetic energy into space. If the energy encounters an object, the reflected energy is returned and is detected by the system's receiving antenna. Typical RADAR systems do not transmit and receive at the same time. Time sharing enables the system to use the same antenna for both transmit and receive.
Radio waves and light travel in waves. The waves are measured in Hertz(Hz) a term for the number of cycles per second. One thousand hertz is referred to as a kilohertz (kHz), 1 million hertz as a megahertz (MHz), and 1 billion hertz as a gigahertz (GHz).
The faster the waves cycle, the higher the frequency. RADAR waves or frequency range from 5MHz (5,000,000 cycles per second) to 130GHZ(130,000,000,000 cycles per second). They divide the frequency range into bands.
RADAR can detect, track and recognize buried objects, aircraft, ships, automobiles or even rain. Ground penetrating RADAR is in the UHF band. Air surveillance, vessel weather detection RADAR operate in the UHF-SHF band. Vehicle detection is in the EHF band.
The Hz or cycles per second, that define radio frequencies, can be converted to an equivalent wavelength in meters ( duration of one cycle) using the following formula:
Wavelength in meters = Speed of light (Constant see note) / Frequency in Hz.
Wavelength in meters = 300,000,000/24,000,000,000=0.0125
NOTE: Typically, 3x10^8 meters/second is the approximation value of the constant used to represent the speed of light. It provides an accuracy of .07% compared to the hard to remember value of 299792458 meter/second.
The mmWave sensor employs a frequency in the EHF band of 24GHz. The wavelength of the radio waves in this band are in the order of millimetres. DFRobot product SEN0395 is 24GHz millimeter-wave ( mmWave) radar sensor.
This SEN0395 employs Frequency Modulated Continuous Wave (FMCW) and continuous wave (CW) signals, along with a separate transmitter and receiver antenna structure, for higher accuracy.
The SEN0395 transmits FMCW and CW 24 GHz radio waves to the target area. All targets that are moving, micro-moving, or extremely weak moving state in the area reflect the radio waves. The received reflected radio waves are converted into electrical signals by circuit in the sensor system. These signals are processed through the data algorithms for the target information can be solved out.
Materials that have had a high electrical conductivity or a large refractive index reflect mmWaves best. Metals are highly conductive and reflect mmWaves waves effectively.Coatings made of conductive materials such as silver or carbon can reflect mmWaves. Some dielectric materials, such as ceramics and plastic composites, can reflect mmWaves.
Now that we have some theory, let's setup the device to detect a car entering the garage so it can stop at the desired distance.
BoM (Bill of materials)
• Nano ATMega168
• SEN0395 is 24GHz millimeter-wave
• High Power Dual MOS Tube Transistor MOSFET Trigger Switch Driver Module
• LED light Strip
I configured a breadboard setup that enabled control of the SEN0395 using a Nano. The SEN0395 IO2 output was used to trigger a MOSFET driver that had an LED light strip on its output.
A 9VDC power supply powered the circuit. I connected a laptop to the Nano to facilitate changing the distance configuration during testing.
The code for this testing used the first example provided on the product wiki. The following line of code was modified:
sensor.DetRangeCfg(0, 9); //The detection range was set from 0.5 to 6meters
to reflect the distance measured.
The test facility was a garage. The breadboard was setup on a bench at a height of the car bumper.
I chalked meter measurements on the floor in order to take readings.
The vehicle started all approaches to the garage for testing from a distance of 14m. The first test started at 6m and was decreased in 1M increments. 0.5m was the final distance tested. Two samples were recorded. The approach speed was between 1-2Km. The speed was difficult to ensure at such a close distance while trying to avoid hitting anything.
I repeated a last test at 1m. This distance would position the vehicle in the ideal space from the workbench. The screen shot image shows the LED light coming on.
The second image shows where the vehicle is stopped.
The results show the SEN0395 is effective at Parking Assist. Next phase of the project is to design an enclosure to hold the unit on the wall and run cables for power and the display light.
There is a flashing red LED on the SEN0395. The flashing cannot be disabled programmatically. It is important to ensure the LED is flashing because it actually shows the device is working.
It takes a minimum of 5sec from power-up for the device to stablize and provide output. The flashing LED is a good sign to watch for. If the LED is on constantly, that is an sign the device is not functioning.
My thanks to the DFRobot marketing team for giving me this opportunity to evaluate their product.