Difference between revisions of "Getting Started With the Radar Sensor"

From BoSL Wiki
Jump to navigation Jump to search
Line 8: Line 8:
  
 
The ATmega328PB is the MCU which is used to interface with the sensor. Firmware can be uploaded to this MCU using the Arduino IDE.
 
The ATmega328PB is the MCU which is used to interface with the sensor. Firmware can be uploaded to this MCU using the Arduino IDE.
 +
0. Download the firmware [[File:Radar-velocity_firmware_rev1.6.2.zip]]
  
 
1. Connect the TTL pin block on the radar sensor to a USB- TTL converter. For specific wiring please refer to the table
 
1. Connect the TTL pin block on the radar sensor to a USB- TTL converter. For specific wiring please refer to the table
Line 66: Line 67:
  
 
Here is supplied firmware for a BoSL board to connect to a radar sensor and log the data to the web:  
 
Here is supplied firmware for a BoSL board to connect to a radar sensor and log the data to the web:  
[[File:BoSL radar logger.zip]]
+
[[File:BoSL_logger_radar_1.4.1.zip]]
  
 
== Flashing the STM32G071CB ==
 
== Flashing the STM32G071CB ==

Revision as of 11:10, 31 October 2022

This page will tell you how to get started with the radar sensor. For information about the development of the sensor please see Radar Velocity.

This guide is for use with the BoSL Board rev 0.4.x, and Radar velocity sensor 0.1.x.


Uploading to the ATmega328PB

The ATmega328PB is the MCU which is used to interface with the sensor. Firmware can be uploaded to this MCU using the Arduino IDE. 0. Download the firmware File:Radar-velocity firmware rev1.6.2.zip

1. Connect the TTL pin block on the radar sensor to a USB- TTL converter. For specific wiring please refer to the table

Radar Sensor Cable USB-TTL converter
WKE Half Orange -
TX Brown TX
RX Blue RX
3V3 Green 3V3
RST Orange RST
GND Half Green GND

2. Open the firmware up in the Arduino editor and select the correct port number.

3. Make sure that the BoSL AVR boards have been added to the editor if not please see https://support.arduino.cc/hc/en-us/articles/360016119519-How-to-add-boards-in-the-board-manager and follow the steps with the board manager URL https://monash-bosl.github.io/BoSL-IDE-Core/package_bosl.com.au_index.json.

4. Select the BoSL Boards -> ATmega328PB (3.3V, 8MHz)

5. Click upload

6. The firmware should now upload to the radar velocity sensor

ATmega328PB firmware adjustables

Please adjust the values of line 11 SWEEP_LENGTH and 12 SWEEP_START, to change how far away the radar sweep starts and how long the radar sweep goes for. Please ensure that this value is large enough to cover the expected range of water velocities. Note also that these distances are measured along the line of sight of the sensor.

Connecting to BoSL board

To connect the radar sensor to the BoSL board with the supplied logging code please see the table below:

Radar Sensor Cable USB-TTL converter
WKE Half Orange -
TX Brown D3
RX Blue D2
3V3 Green 3V3
RST Orange D6
GND Half Green GND

BoSL logging firmware

Here is supplied firmware for a BoSL board to connect to a radar sensor and log the data to the web: File:BoSL logger radar 1.4.1.zip

Flashing the STM32G071CB

The STM32G071CB on the XM132 is responsible for controlling the A111 radar sensor and performing digital signal processing. This should already come pre-flashed with firmware. Instructions on how to do this are coming soon... If you have access to a UART port on the STM32 and can connect this to a computer then simply using:

  py.exe -m stm32loader -p<comport> -b921600 -e -w -v <path to binary>

will flash the STM32