Arduino Radar with Simulink

Simulink model development and integration with Arduino Mega 2560 for short-range radar detection system management.

Mar 7, 2021

25175 views

25 respects

Components and supplies

1

Arduino Mega 2560

1

Ultrasonic Sensor - HC-SR04 (Generic)

1

Holder for Ultrasonic Sensor HC-SR04

1

SG90 Micro-servo motor

1

USB-A to B Cable

1

Perma-Proto Breadboard Half Size

Apps and platforms

1

Processing

1

MATLAB

1

Simulink

Project description

Code

Processing code

c_cpp

Copy and paste the code in Processing.

Simulink model in Matlab

scheme

Appearance of the model in the Simulink simulation tool.

Processing code

c_cpp

Copy and paste the code in Processing.

Simulink model in Matlab

scheme

Appearance of the model in the Simulink simulation tool.

Downloadable files

SCHEMATICS

Arduino Mega 2560 Sketch of connecting the components.

SCHEMATICS

SCHEMATICS

Arduino Mega 2560 Sketch of connecting the components

SCHEMATICS

SCHEMATICS

Arduino Mega 2560 Sketch of connecting the components.

SCHEMATICS

Comments

Only logged in users can leave comments

bhargav2007

2 years ago

Hello Sir, I'm getting problem with radar. As the radar is not turning and showing me angle:0, distance: 0 "In range".The sensor couldn't communicate with the serial transmit as shown below: Error evaluating 'InitFcn' callback of Arduino Serial Transmit block (mask) 'untitled/Serial Transmit'. Callback string is 'codertarget.arduinobase.conflictcheck.validateandregisterBlocks(gcbh);' Serial Port 0 used by the untitled/Serial Transmit block, is also used for External mode. Change the port number used by the block