Giter VIP home page Giter VIP logo

adaptive-cruise-control's Introduction

ADAPTIVE-CRUISE-CONTROL

๐Ÿ‘๐Ÿป GENG8030: MATLAB - Project [SEMESTER II]


Matlab code

ACC Circuit View


Flowchart

image


Algorithm: ACC

1.	Initialize the Arduino board and Ultrasonic Sensor.
2.	Initialize the LCD display and clear its content.
3.	Print project name and group number on the first two lines of the LCD display.
4.	Pause execution for 5 seconds to display the information.
5.	Clear the LCD display.
6.	Print team members' names on the LCD display.
7.	Pause execution for 5 seconds to display the information.
8.	Declare and initialize variables for various inputs and modes:
    -	speed: current vehicle speed
    -	increase_speed: input from the increase speed button
    -	decrease_speed: input from the decrease speed button
    -	cancel: input from the cancel button
    -	set_speed: input from the set speed button
    -	adaptive_cruise_speed: input from the adaptive cruise control button
    -	distance: distance measured by the ultrasonic sensor
    -	mode: variable to indicate the current mode of operation (0 = Normal Mode, 1 = Cruise Control Mode, 2 = Adaptive Cruise Control Mode)
9.	Enter an infinite loop to continuously monitor and update the vehicle speed.
    -	Read inputs from the analog pins on the Arduino board for the various buttons and the ultrasonic sensor.
    -	Determine the mode of operation based on button inputs:
    -	If the cancel button is pressed (voltage value >= 4), set mode to 0 (Normal Mode).
    -	If the set speed button is pressed (voltage value >= 4), set mode to 1 (Cruise Control Mode).
    -	If the adaptive cruise control button is pressed (voltage value >= 4), set mode to 2 (Adaptive Cruise Control Mode) and store the current speed in 'constant'.

10.	Implement different behaviors based on the current mode:
    -	Normal Mode:
    -	Increase speed if the increase speed button is pressed.
    -	Decrease speed if the decrease speed button is pressed.
    -	Gradually decrease speed if no button is pressed.
    -	Ensure speed doesn't go below 0.
    -	Display the current speed on the LCD display with the label "Vehicle Speed: ".

    -	Cruise Control Mode:
    -	Increase speed if the increase speed button is pressed.
    -	Decrease speed if the decrease speed button is pressed.
    -	Ensure speed doesn't go below 0.
    -	Display the current speed on the LCD display with the label "Cruise mode: ".
    
    -	Adaptive Cruise Control Mode:
    -	Clear the LCD display and display a blinking effect.
    -	Reinitialize the LCD display.
    -	Activate the vehicle's motor (D13) and deactivate the brake (D12).
    -	Adjust speed based on the distance measured by the ultrasonic sensor:
    -	If the distance is less than 0.3 units, decrease the speed.
    -	If the distance is greater than or equal to 0.3 units, increase the speed.
    -	Ensure the speed doesn't exceed the constant value (stored previously).
    -	Ensure speed doesn't go below 0.
    -	Display the current speed on the LCD display with the label "Adap_Cruise_mode".

11.	End of the infinite loop.

Working Model

A. Circuit Connections

Circuit Connections

B. Welcome Message

Welcome message

C. Group Number & Names

Group Number   Names

D. Circuit at initial (zero speed)

Circuit at initial (zero speed)

E. Circuit in Cruise Mode (non-zero speed)

Circuit in Cruise Mode (non-zero speed)

F. Circuit in Cruise Mode (zero speed)

Circuit in Cruise Mode (zero speed)

G. Circuit in Adaptive Cruise Control Mode (no object in front of the ultrasonic sensor)

Circuit in Adaptive Cruise Control Mode (no object in front of ultrasonic sensor)

H. Circuit in Adaptive Cruise Control Mode (an object in front of the ultrasonic sensor)

Circuit in Adaptive Cruise Control Mode (an object in front of ultrasonic sensor)


๐Ÿ‘‰๐Ÿป Presented as a part of the 2nd Semester Project @ University of Windsor ๐Ÿ‘ˆ๐Ÿป

๐Ÿ‘ท Project Authors: Amey Thakur, Nandeshwar Royal and Brano Barshmen (Batch of 2024)

โœŒ๐Ÿป Back To Engineering โœŒ๐Ÿป

adaptive-cruise-control's People

Contributors

amey-thakur avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.