Difference between revisions of "F16: AutoNav"

From Embedded Systems Learning Academy
Jump to: navigation, search
(Hardware Design)
(Design & Implementation)
Line 224: Line 224:
 
== Design & Implementation ==
 
== Design & Implementation ==
 
The design section can go over your hardware and software design.  Organize this section using sub-sections that go over your design and implementation.
 
The design section can go over your hardware and software design.  Organize this section using sub-sections that go over your design and implementation.
 +
 +
DBC File:
 +
 +
Below the Project DBC File
 +
<pre>
 +
VERSION ""
 +
 +
NS_ :
 +
BA_
 +
BA_DEF_
 +
BA_DEF_DEF_
 +
BA_DEF_DEF_REL_
 +
BA_DEF_REL_
 +
BA_DEF_SGTYPE_
 +
BA_REL_
 +
BA_SGTYPE_
 +
BO_TX_BU_
 +
BU_BO_REL_
 +
BU_EV_REL_
 +
BU_SG_REL_
 +
CAT_
 +
CAT_DEF_
 +
CM_
 +
ENVVAR_DATA_
 +
EV_DATA_
 +
FILTER
 +
NS_DESC_
 +
SGTYPE_
 +
SGTYPE_VAL_
 +
SG_MUL_VAL_
 +
SIGTYPE_VALTYPE_
 +
SIG_GROUP_
 +
SIG_TYPE_REF_
 +
SIG_VALTYPE_
 +
VAL_
 +
VAL_TABLE_
 +
 +
BS_:
 +
 +
BU_: DRIVER BLUETOOTH SENSOR MOTOR GEO
 +
 +
BO_ 100 KILL_SWITCH: 1 DRIVER
 +
SG_ killSwitch : 0|1@1+ (1,0) [0|0] "Stop=1" MOTOR
 +
 +
BO_ 110 STOP_CMD: 1 BLUETOOTH
 +
SG_ BLUETOOTH_STOP_CMD_signal : 0|1@1+ (1,0) [0|0] "Stop=1" DRIVER
 +
 +
BO_ 120 MOTOR_SYNC: 1 MOTOR
 +
SG_ Motor_Sync : 0|1@1+ (1,0) [0|0] "MotorSync=1" DRIVER
 +
 +
BO_ 130 GEO_SYNC: 1 GEO
 +
SG_ Geo_sync_cmd : 0|1@1+ (1,0) [0|0] "GeoSync=1" DRIVER
 +
 
 +
BO_ 140 BLUETOOTH_SYNC_CMD: 1 BLUETOOTH
 +
SG_ BLUETOOTH_SYNC_CMD_signal : 0|1@1+ (1,0) [0|0] "BluetoothSync=1" DRIVER
 +
 
 +
BO_ 150 SENSOR_SYNC: 1 SENSOR
 +
SG_ Sensor_Sync : 0|1@1+ (1,0) [0|0] "SensorSync=1" DRIVER,MOTOR,BLUETOOTH
 +
 +
BO_ 160 ERROR_COMM_DRIVER: 1 DRIVER
 +
SG_ Sync_Miss_Info : 0|8@1+ (1,0) [0|0] "ErrorMsgType" MOTOR
 +
 +
BO_ 170 DRIVER_SYNC_ACK: 1 DRIVER
 +
SG_ Sync_Miss_Info : 0|1@1+ (1,0) [0|0] "DriverSync=1" MOTOR,BLUETOOTH,SENSOR,GEO
 +
 +
BO_ 180 MOTOR_CONTROL: 2 DRIVER
 +
SG_ steer : 0|8@1+ (1,0) [0|0] "DirectionType" MOTOR   
 +
SG_ speed : 8|8@1+ (1,0) [0|0] "SpeedType" MOTOR 
 +
 
 +
BO_ 181 MOTOR_RPS: 2 MOTOR
 +
SG_ Rps_Sensor : 0|8@1+ (1,0) [0|0] "RotationsPerSecondENum" DRIVER,BLUETOOTH
 +
SG_ Rps_Value : 8|8@1+ (1,0) [0|0] "RotationsPerSecondValue" BLUETOOTH,DRIVER
 +
 +
BO_ 190 SENSOR_SONAR: 5 SENSOR
 +
SG_ Sensor_Sonar_Front : 0|8@1+ (1,0) [0|0] "FrontDistance" DRIVER,MOTOR,BLUETOOTH
 +
SG_ Sensor_Sonar_FrontRight : 8|8@1+ (1,0) [0|0] "FRightDistance" DRIVER,MOTOR,BLUETOOTH
 +
SG_ Sensor_Sonar_FrontLeft : 16|8@1+ (1,0) [0|0] "FLeftDistance" DRIVER,MOTOR,BLUETOOTH
 +
SG_ Sensor_Sonar_Back : 24|8@1+ (1,0) [0|0] "BackDistance" DRIVER,MOTOR,BLUETOOTH
 +
 +
BO_ 200 GEO_SEND_LOCATION: 8 GEO
 +
SG_ Geo_latitude : 0|27@1+ (0.000001,0) [0|0] "latitude" DRIVER,BLUETOOTH,MOTOR
 +
SG_ Geo_longitude : 27|27@1+ (0.000001,0) [0|0] "longitude" DRIVER,BLUETOOTH,MOTOR
 +
 +
BO_ 210 GEO_SEND_HD_BR: 8 GEO
 +
SG_ Geo_heading : 0|29@1+ (0.000001,0) [0|360] "" DRIVER,MOTOR
 +
SG_ Geo_bearing : 29|29@1+ (0.000001,0) [0|360] "" DRIVER,MOTOR
 +
 +
BO_ 220 NAVIGATION_WAYPOINT: 2 BLUETOOTH
 +
SG_ Bluetooth_CurrWaypoint : 0|5@1+ (1,0) [0|0] "CurrentWaypointNumber" DRIVER,GEO
 +
SG_ Bluetooth_NumWaypoint : 5|5@1+ (1,0) [0|0] "NumberOfWaypoints" DRIVER,GEO
 +
 +
BO_ 250 LATITUDE_LONGITUDE: 8 BLUETOOTH
 +
SG_ Bluetooth_latitude : 0|32@1+ (0.000001,-90.000000) [-90|90] "latitude" DRIVER,GEO
 +
SG_ Bluetooth_longitude : 32|32@1+ (0.000001,-180.000000) [-180|180] "longitude" DRIVER,GEO
 +
 +
BO_ 230 START_CMD: 1 BLUETOOTH
 +
SG_ BLUETOOTH_START_CMD_signal : 0|8@1+ (1,0) [0|0] "" DRIVER
 +
 +
BO_ 240 SENSOR_BATTERY: 8 SENSOR
 +
SG_ Sensor_Battery_Voltage : 0|8@1+ (0.1,0) [0|0] "Volts" DRIVER,MOTOR,BLUETOOTH
 +
SG_ Sensor_Battery_SOC : 8|10@1+ (0.1,0) [0|0] "Percent" DRIVER,MOTOR,BLUETOOTH
 +
SG_ Sensor_Light : 18|10@1+ (0.1,0) [0|0] "LightPercentValue" DRIVER,MOTOR,BLUETOOTH
 +
SG_ Sensor_Tilt_X : 28|12@1+ (0.1,0) [0|0] "TiltValueX" DRIVER,MOTOR,BLUETOOTH
 +
SG_ Sensor_Tilt_Y : 40|12@1+ (0.1,0) [0|0] "TiltValueY" DRIVER,MOTOR,BLUETOOTH
 +
 +
BO_ 500 DRIVER_TEST: 1 DRIVER
 +
SG_ Driver_Test_Msg : 0|8@1+ (1,0) [0|0] "" MOTOR,GEO,SENSOR,BLUETOOTH
 +
 +
BO_ 600 MOTOR_TEST: 1 MOTOR
 +
SG_ Motor_Test_Msg : 0|8@1+ (1,0) [0|0] "" DRIVER,GEO,SENSOR,BLUETOOTH
 +
 +
BO_ 700 SENSOR_TEST: 1 SENSOR
 +
SG_ Sensor_Test_Msg : 0|8@1+ (1,0) [0|0] "" DRIVER,MOTOR,GEO,BLUETOOTH
 +
 +
BO_ 800 GEO_TEST: 1 GEO
 +
SG_ Geo_Test_Msg : 0|8@1+ (1,0) [0|0] "" DRIVER,MOTOR,SENSOR,BLUETOOTH
 +
 +
BO_ 900 BLUETOOTH_TEST: 1 BLUETOOTH
 +
SG_ Bluetooth_Test_Msg : 0|8@1+ (1,0) [0|0] "" DRIVER,MOTOR,GEO,SENSOR
 +
 +
CM_ BU_ DRIVER "The DRIVER controller driving the car";
 +
CM_ BU_ MOTOR "The motor controller of the car";
 +
CM_ BU_ SENSOR "The sensor controller of the car";
 +
CM_ BU_ GEO "The geo controller of the car";
 +
CM_ BU_ BLUETOOTH "The bridge controller of the car";
 +
CM_ BO_ 100 "Sync message used to synchronize the controllers";
 +
 +
BA_DEF_ "BusType" STRING ;
 +
BA_DEF_ BO_ "GenMsgCycleTime" INT 0 0;
 +
BA_DEF_ SG_ "FieldType" STRING ;
 +
 +
BA_DEF_DEF_ "BusType" "CAN";
 +
BA_DEF_DEF_ "FieldType" "";
 +
BA_DEF_DEF_ "GenMsgCycleTime" 0;
 +
 +
BA_ "GenMsgCycleTime" BO_ 500 10;
 +
BA_ "FieldType" SG_ 180 steer "steer";
 +
BA_ "FieldType" SG_ 180 speed "speed";
 +
BA_ "FieldType" SG_ 181 Rps_Sensor "Rps_Sensor";
 +
BA_ "FieldType" SG_ 190 Sensor_Sonar_Front "Sensor_Sonar_Front";
 +
BA_ "FieldType" SG_ 190 Sensor_Sonar_FrontRight "Sensor_Sonar_FrontRight";
 +
BA_ "FieldType" SG_ 190 Sensor_Sonar_FrontLeft "Sensor_Sonar_FrontLeft";
 +
BA_ "FieldType" SG_ 190 Sensor_Sonar_Back "Sensor_Sonar_Back";
 +
 +
VAL_ 190 Sensor_Sonar_Front 3 "far_f" 2 "mid_f" 1 "near_f" 0 "danger_f" ;
 +
VAL_ 190 Sensor_Sonar_FrontRight 2 "far_fr" 1 "mid_fr" 0 "near_fr" ;
 +
VAL_ 190 Sensor_Sonar_FrontLeft 2 "far_fl" 1 "mid_fl" 0 "near_fl" ;
 +
VAL_ 190 Sensor_Sonar_Back 2 "far_b" 1 "mid_b" 0 "near_b" ;
 +
VAL_ 180 steer 4 "right" 3 "sright" 2 "sleft" 1 "left" 0 "straight" ;
 +
VAL_ 180 speed 4 "brake" 3 "reverse" 2 "normal" 1 "slow" 0 "stop" ;
 +
VAL_ 181 Rps_Sensor 2 "high" 1 "equal" 0 "low" ;
 +
</pre>
  
 
== Sensor Controller ==
 
== Sensor Controller ==

Revision as of 04:29, 17 December 2016

Project Title

  • Autonomous RC Car

Abstract

The self-driving RC car navigates autonomously from a source point to destination avoiding obstacles. It consists of five micro-controllers namely Motor & I/O, Sensor, Geo, Communication Bridge & Android and Master performing specific tasks.

  • Motor & I/O Controller - This controller takes care of driving and steering with the help of motors and displaying the status of car on the LCD.
  • Sensor Controller - Obstacle detection and avoidance will be taken care by this controller.
  • Geo Controller - Orientation(heading and bearing)and navigation of the car on a specified path will be determined by this controller.
  • Communication Bridge & Android Controller - Co-ordinates for navigation are provided by this controller using an android application communicating with Bluetooth.
  • Master Controller - This collects the data from rest of the controllers and guides the car.

These five controllers are connected to five SJ One boards. Communication between all the five controllers is established using CAN bus.

Objectives & Introduction

Show list of your objectives. This section includes the high level details of your project. You can write about the various sensors or peripherals you used to get your project completed.

Team Members & Responsibilities

Sensor Controller:

  • Vishwanath Balakuntla Ramesh

Motor & I/O Controller:

Bluetooth (Communication Bridge) & Android Controller:

  • Sucharitha
  • Karthikeya Rao G V

Geographical Controller:

  • Arpita Ramanath
  • Veena Manasa Kanakamalla

Master Controller:

Schedule

Consolidated Team Schedule

SI No. Start Date End Date Task Status Actual Completion Date
1 09/13/2016 09/27/2016
  • *Motor - Research and order RC car and additional batteries
  • *Sensor - Researching and understanding various sensor requirements for a self driving vehicle.
  • Shortlisting the sensors suitable for our application.
  • *GPS - Research and order GPS and Compass module.
  • *Bluetooth - Learning and Getting familiarized with Android SDK, Java, Bluetooth API and Google Maps API.
  • *Master - Understanding the working of CAN Communication and research on obstacle avoidance and navigational algorithm.
Completed 09/26/2016
2 09/27/2016 10/11/2016
  • *Motor - Understand and implement PWM concepts to drive brushless DC motor and servo motor of the RC car. Set PWM frequency range for varying duty cycle.
  • *Sensor - Reading datasheets of shortlisted sensors, Understand pros and cons of each sensor. Make an Order.
  • *GPS - Get familiar with data sheets of both modules. Identify relevant pins and understand the module schematics (GPS and IMU).
  • *Bluetooth - Buttons and text insertion on the app. Ex: switch on and off Bluetooth, getting longitude latitude values on the phone Placement of route markers on Google maps between source and destination.
  • *Master - Developing the required control messages to be used in CAN Bus for communication between different controllers.
Completed 10/11/2016
3 10/12/2016 10/18/2016
  • *Motor - Interfacing Brushless DC Motor & Servo Motors to SJ one board - implement duty cycles using provided PWM library. Use terminal commands to test basic functionality like drive straight, turn left or right.
  • *Sensor - Write sample code for sensors and experiment with sensor output(filtering).
  • *GPS - Interface GPS and Compass modules to SJOne board using UART. Test functionality of each module.
  • *Bluetooth - Establishment of communication between Bluetooth and the phone application by sending and receiving the values Routing markers display on google maps for a straight line between source and destination.
  • *Master - Establishing CAN communication between master controller, sensor controller and Bluetooth controller with addition of handling MIA in all the controllers.
Completed 10/20/2016
4 10/19/2016 10/30/2016
  • *Motor - Implement CAN bus communication - setup CAN Msg ID acceptance filters, integration with sensor data and Master Controller.Develop basic obstacle avoidance algorithm. Testing of obstacle avoidance algorithm in real time.
  • *Sensor - DBC file implementation to establish CAN communication with Master controller.
  • Collaborate with Motor I/O team to achieve basic obstacle avoidance.
  • *GPS - Calibrate GPS and Compass modules. Write code to parse raw Compass and GPS readings. Test calibration of the modules.
  • *Bluetooth - Interfacing Bluetooth module to SJ One board through UART and sending and receiving data between them.
  • *Master - Master Controller should acquire obstacle range sensor data from sensor controller, control commands from Bluetooth controller.
Completed 11/01/2016
5 10/31/2016 11/08/2016
  • *Motor - LCD interfacing to display messages from required controllers. DBC File Implementation and integrating data structures generated from auto gen code.
  • *Sensor - Identify and implement a mechanism to avoid sensors from interfering with each other.
  • Add multiple sensors to the car and work on synchronization between them to achieve more precise obstacle avoidance.
  • *GPS - Establish CAN communication from Geo controller to Master controller. Send CAN messages of latitude, longitude, heading and bearing from Geo controller to master to set destination.
  • *Bluetooth - Receive commands from SJ One to android application and test if right data is being sent.
  • *Master - Master controller should send directional control messages to motor controller to control the car to its desired path. Implement and test a simple obstacle avoidance algorithm on to the Master controller.
Completed 11/12/2016
6 11/09/2016 11/27/2016
  • *Motor - RPM sensor interfacing to develop Motor Feedback Control loop. Up/down hill driving testing in real world.
  • *Sensor- Design and implement the circuit and software for Car's battery voltage monitoring and determining the State of charge(SOC).
  • Design and implement the software to read light sensor values and Tilt (angle of the car) sensor values.
  • *GPS - Test destination setting, navigation and synchronization with Master controller and Android app.
  • *Bluetooth - Testing the routing path and the basic testing of the application.
  • *Master - Master controller has to acquire coordinates from Geo controller to be used for navigational algorithm. Also get heading, bearing and speed information from Geo-controller.
Completed 11/29/2016
7 11/27/2016 12/15/2016
  • *Motor - Integration with RC Car controllers as one system. Testing, debugging and optimization.
  • *Sensor - Integration testing with Master Controller and other boards.
  • Optimize the code, Finalize the operation (validate correctness) & Documentation.
  • *GPS - Integrate Geo controller with the entire system. Test and debug code.
  • *Bluetooth - Integration Testing and Final testing after integration of all the modules on the car.
  • *Master - Implement and test navigational algorithm. Integrate navigation and avoidance algorithm and perform final testing.
In Progress

Parts List & Cost

Item# Part Description Vendor Qty Cost
1 RC Car RChobby Explosion 1 $190
2 RC Car Battery Amazon 1 $27.29
3 CAN Transceiver Texas Instruments 15 Free
4 M-F,F-F,M-M Jumper Wires Amazon 120 7.97
5 Printed Circuit Boards Amazon 1 $9.72
6 Ultrasonic Parallax Ping Sensor Fry's Electronics 3 $98.85
7 9 DOF Razor IMU module SparkFun 1 $74.95
8 Bluetooth Module Amazon 1 $9.99
9 GPS Sensor Adafruit 1 $44.38
10 Black/White line detection sensor - RPM sensor Amazon 1 $10.10
11 SJOne Boards From Preet 5 $400
12 LCD 4D systems 1 $111

DBC File Implementation

Design & Implementation

The design section can go over your hardware and software design. Organize this section using sub-sections that go over your design and implementation.

DBC File:

Below the Project DBC File

VERSION ""

NS_ :
	BA_
	BA_DEF_
	BA_DEF_DEF_
	BA_DEF_DEF_REL_
	BA_DEF_REL_
	BA_DEF_SGTYPE_
	BA_REL_
	BA_SGTYPE_
	BO_TX_BU_
	BU_BO_REL_
	BU_EV_REL_
	BU_SG_REL_
	CAT_
	CAT_DEF_
	CM_
	ENVVAR_DATA_
	EV_DATA_
	FILTER
	NS_DESC_
	SGTYPE_
	SGTYPE_VAL_
	SG_MUL_VAL_
	SIGTYPE_VALTYPE_
	SIG_GROUP_
	SIG_TYPE_REF_
	SIG_VALTYPE_
	VAL_
	VAL_TABLE_
	
BS_:
 
BU_: DRIVER BLUETOOTH SENSOR MOTOR GEO

BO_ 100 KILL_SWITCH: 1 DRIVER
 SG_ killSwitch : 0|1@1+ (1,0) [0|0] "Stop=1" MOTOR

BO_ 110 STOP_CMD: 1 BLUETOOTH
 SG_ BLUETOOTH_STOP_CMD_signal : 0|1@1+ (1,0) [0|0] "Stop=1" DRIVER

BO_ 120 MOTOR_SYNC: 1 MOTOR
 SG_ Motor_Sync : 0|1@1+ (1,0) [0|0] "MotorSync=1" DRIVER

BO_ 130 GEO_SYNC: 1 GEO
 SG_ Geo_sync_cmd : 0|1@1+ (1,0) [0|0] "GeoSync=1" DRIVER
  
BO_ 140 BLUETOOTH_SYNC_CMD: 1 BLUETOOTH
 SG_ BLUETOOTH_SYNC_CMD_signal : 0|1@1+ (1,0) [0|0] "BluetoothSync=1" DRIVER
  
BO_ 150 SENSOR_SYNC: 1 SENSOR
 SG_ Sensor_Sync : 0|1@1+ (1,0) [0|0] "SensorSync=1" DRIVER,MOTOR,BLUETOOTH
 
BO_ 160 ERROR_COMM_DRIVER: 1 DRIVER
 SG_ Sync_Miss_Info : 0|8@1+ (1,0) [0|0] "ErrorMsgType" MOTOR
 
BO_ 170 DRIVER_SYNC_ACK: 1 DRIVER
 SG_ Sync_Miss_Info : 0|1@1+ (1,0) [0|0] "DriverSync=1" MOTOR,BLUETOOTH,SENSOR,GEO
 
BO_ 180 MOTOR_CONTROL: 2 DRIVER
 SG_ steer : 0|8@1+ (1,0) [0|0] "DirectionType" MOTOR    
 SG_ speed : 8|8@1+ (1,0) [0|0] "SpeedType" MOTOR  
  
BO_ 181 MOTOR_RPS: 2 MOTOR
 SG_ Rps_Sensor : 0|8@1+ (1,0) [0|0] "RotationsPerSecondENum" DRIVER,BLUETOOTH
 SG_ Rps_Value : 8|8@1+ (1,0) [0|0] "RotationsPerSecondValue" BLUETOOTH,DRIVER

BO_ 190 SENSOR_SONAR: 5 SENSOR
 SG_ Sensor_Sonar_Front : 0|8@1+ (1,0) [0|0] "FrontDistance" DRIVER,MOTOR,BLUETOOTH
 SG_ Sensor_Sonar_FrontRight : 8|8@1+ (1,0) [0|0] "FRightDistance" DRIVER,MOTOR,BLUETOOTH
 SG_ Sensor_Sonar_FrontLeft : 16|8@1+ (1,0) [0|0] "FLeftDistance" DRIVER,MOTOR,BLUETOOTH
 SG_ Sensor_Sonar_Back : 24|8@1+ (1,0) [0|0] "BackDistance" DRIVER,MOTOR,BLUETOOTH
 
BO_ 200 GEO_SEND_LOCATION: 8 GEO
 SG_ Geo_latitude : 0|27@1+ (0.000001,0) [0|0] "latitude" DRIVER,BLUETOOTH,MOTOR
 SG_ Geo_longitude : 27|27@1+ (0.000001,0) [0|0] "longitude" DRIVER,BLUETOOTH,MOTOR

BO_ 210 GEO_SEND_HD_BR: 8 GEO
 SG_ Geo_heading : 0|29@1+ (0.000001,0) [0|360] "" DRIVER,MOTOR
 SG_ Geo_bearing : 29|29@1+ (0.000001,0) [0|360] "" DRIVER,MOTOR

BO_ 220 NAVIGATION_WAYPOINT: 2 BLUETOOTH
 SG_ Bluetooth_CurrWaypoint : 0|5@1+ (1,0) [0|0] "CurrentWaypointNumber" DRIVER,GEO
 SG_ Bluetooth_NumWaypoint : 5|5@1+ (1,0) [0|0] "NumberOfWaypoints" DRIVER,GEO

BO_ 250 LATITUDE_LONGITUDE: 8 BLUETOOTH
 SG_ Bluetooth_latitude : 0|32@1+ (0.000001,-90.000000) [-90|90] "latitude" DRIVER,GEO
 SG_ Bluetooth_longitude : 32|32@1+ (0.000001,-180.000000) [-180|180] "longitude" DRIVER,GEO

BO_ 230 START_CMD: 1 BLUETOOTH
 SG_ BLUETOOTH_START_CMD_signal : 0|8@1+ (1,0) [0|0] "" DRIVER
 
BO_ 240 SENSOR_BATTERY: 8 SENSOR 
 SG_ Sensor_Battery_Voltage : 0|8@1+ (0.1,0) [0|0] "Volts" DRIVER,MOTOR,BLUETOOTH
 SG_ Sensor_Battery_SOC : 8|10@1+ (0.1,0) [0|0] "Percent" DRIVER,MOTOR,BLUETOOTH
 SG_ Sensor_Light : 18|10@1+ (0.1,0) [0|0] "LightPercentValue" DRIVER,MOTOR,BLUETOOTH
 SG_ Sensor_Tilt_X : 28|12@1+ (0.1,0) [0|0] "TiltValueX" DRIVER,MOTOR,BLUETOOTH
 SG_ Sensor_Tilt_Y : 40|12@1+ (0.1,0) [0|0] "TiltValueY" DRIVER,MOTOR,BLUETOOTH
 
BO_ 500 DRIVER_TEST: 1 DRIVER
 SG_ Driver_Test_Msg : 0|8@1+ (1,0) [0|0] "" MOTOR,GEO,SENSOR,BLUETOOTH

BO_ 600 MOTOR_TEST: 1 MOTOR
 SG_ Motor_Test_Msg : 0|8@1+ (1,0) [0|0] "" DRIVER,GEO,SENSOR,BLUETOOTH
 
BO_ 700 SENSOR_TEST: 1 SENSOR
 SG_ Sensor_Test_Msg : 0|8@1+ (1,0) [0|0] "" DRIVER,MOTOR,GEO,BLUETOOTH
 
BO_ 800 GEO_TEST: 1 GEO
 SG_ Geo_Test_Msg : 0|8@1+ (1,0) [0|0] "" DRIVER,MOTOR,SENSOR,BLUETOOTH
 
BO_ 900 BLUETOOTH_TEST: 1 BLUETOOTH
 SG_ Bluetooth_Test_Msg : 0|8@1+ (1,0) [0|0] "" DRIVER,MOTOR,GEO,SENSOR
 
CM_ BU_ DRIVER "The DRIVER controller driving the car";
CM_ BU_ MOTOR "The motor controller of the car";
CM_ BU_ SENSOR "The sensor controller of the car";
CM_ BU_ GEO "The geo controller of the car";
CM_ BU_ BLUETOOTH "The bridge controller of the car";
CM_ BO_ 100 "Sync message used to synchronize the controllers";

BA_DEF_ "BusType" STRING ;
BA_DEF_ BO_ "GenMsgCycleTime" INT 0 0;
BA_DEF_ SG_ "FieldType" STRING ;

BA_DEF_DEF_ "BusType" "CAN";
BA_DEF_DEF_ "FieldType" "";
BA_DEF_DEF_ "GenMsgCycleTime" 0;

BA_ "GenMsgCycleTime" BO_ 500 10;
BA_ "FieldType" SG_ 180 steer "steer";
BA_ "FieldType" SG_ 180 speed "speed";
BA_ "FieldType" SG_ 181 Rps_Sensor "Rps_Sensor";
BA_ "FieldType" SG_ 190 Sensor_Sonar_Front "Sensor_Sonar_Front";
BA_ "FieldType" SG_ 190 Sensor_Sonar_FrontRight "Sensor_Sonar_FrontRight";
BA_ "FieldType" SG_ 190 Sensor_Sonar_FrontLeft "Sensor_Sonar_FrontLeft";
BA_ "FieldType" SG_ 190 Sensor_Sonar_Back "Sensor_Sonar_Back";

VAL_ 190 Sensor_Sonar_Front 3 "far_f" 2 "mid_f" 1 "near_f" 0 "danger_f" ;
VAL_ 190 Sensor_Sonar_FrontRight 2 "far_fr" 1 "mid_fr" 0 "near_fr" ;
VAL_ 190 Sensor_Sonar_FrontLeft 2 "far_fl" 1 "mid_fl" 0 "near_fl" ;
VAL_ 190 Sensor_Sonar_Back 2 "far_b" 1 "mid_b" 0 "near_b" ;
VAL_ 180 steer 4 "right" 3 "sright" 2 "sleft" 1 "left" 0 "straight" ;
VAL_ 180 speed 4 "brake" 3 "reverse" 2 "normal" 1 "slow" 0 "stop" ;
VAL_ 181 Rps_Sensor 2 "high" 1 "equal" 0 "low" ;

Sensor Controller

Team Members:

Vishwanath Balakuntla Ramesh

Sensor Interface schedule

Hardware Design

We used 3 Parallax Ping ultrasonic distance sensors for obstacle detection and avoidance. Non-contact distance can be measured from about 2 cm (0.8 inches) to 3 meters (3.3 yards).

The PING))) sensor works by transmitting an ultrasonic burst and providing an output pulse that corresponds to the time required for the burst echo to return to the sensor. By measuring the echo pulse width, the distance to target can easily be calculated.

Three sensors were placed in front (front_left, front_center, front_right). The image below shows the wired connections between sensors and SJOne board.

Parallax ping sensor


Hardware Interface

In this section, you can describe how your hardware communicates, such as which BUSes used. You can discuss your driver implementation here, such that the Software Design section is isolated to talk about high level workings rather than inner working of your project.

Software Design

Show your software design. For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level. Do not show the details of the code. For example, do not show exact code, but you may show psuedocode and fragments of code. Keep in mind that you are showing DESIGN of your software, not the inner workings of it.


Sensor Controller Tasks
Task Name Purpose
Period Init Can bus initialization Enable LPC timer Initialize LPC timer Initialize rising edge GPIO interrupt Initialize falling edge GPIO interrupt
Periodic 1Hz Callback Check can bus off
Periodic 10Hz Callback Get and Send Sensor Data

Implementation

This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.

Motor & I/O Controller

Team Members:

Sameer Saran
Jaswanth Bhimanapalli

Hardware Design

Discuss your hardware design here. Show detailed schematics, and the interface here.

Hardware Interface

In this section, you can describe how your hardware communicates, such as which BUSes used. You can discuss your driver implementation here, such that the Software Design section is isolated to talk about high level workings rather than inner working of your project.

Software Design

Show your software design. For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level. Do not show the details of the code. For example, do not show exact code, but you may show psuedocode and fragments of code. Keep in mind that you are showing DESIGN of your software, not the inner workings of it.

Implementation

This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.

Bluetooth and Bridge(Android) Connections

Team Members:

Sucharitha Sirigreddy
Karthikeya Rao GV

This section includes high level implementation details regarding the Android app connectivity with the Bluetooth module of the RC car. It gives a overview of building the android app, communication between the Bluetooth and Android app on a mobile device, routing mechanisms during the navigation.


Hardware Design

Discuss your hardware design here. Show detailed schematics, and the interface here.

Bluetooth Controller Pin Connections

Node A Source Node A Pin Node B Source Node B Pin Description
Power Supply 3.3V SJOne Board 3V3 SJOne Power
Power Supply GND SJOne Board GND SJOne Ground
CAN Transceiver CAN Tx SJOne Board P0.1 (Tx) SJOne - CAN Tx
CAN Transceiver CAN Rx SJOne Board P0.0 (Rx) SJOne - CAN Rx
Bluetooth Module TXD SJOne Board RXD3 SJOne RX3- Bluetooth module TXD
Bluetooth Module RXD SJOne Board TXD3 SJOne TX3- Bluetooth module RXD
Bluetooth Module Bluetooth module VCC(3.3V) Power Supply 3.3V Bluetooth module - Power supply 3.3V
Bluetooth Module Bluetooth module GND Power Supply GND Bluetooth module - Power supply GND

Hardware Interface

In this section, you can describe how your hardware communicates, such as which BUSes used. You can discuss your driver implementation here, such that the Software Design section is isolated to talk about high level workings rather than inner working of your project.

Software Design

Show your software design. For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level. Do not show the details of the code. For example, do not show exact code, but you may show psuedocode and fragments of code. Keep in mind that you are showing DESIGN of your software, not the inner workings of it.

Below is the representation of the bridge communication.

Bridge Controller Design

Flow Chart:

Flow Chart of the Bluetooth and Android design is as follows.

Android and Bluetooth Controller Flow Chart

Bluetooth Android Interface Commands

Android -Bluetooth Controller Communication Table

Sl.No Message ID Destination Message Name Data Sent over CAN

Implementation

This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.

Implementation Description:

Once the Car is ready, through the Android application the Bluetooth would be paired with HC-06 module on click of BTon button, which turns on the Bluetooth on the android phone and connects to Car’s HC-06 Bluetooth device. Post which, we would send a start signal from the app, which would sync and start the car. This signal is hardcoded as ‘1’, and is encoded before sending from the android. This signal when received from the Bluetooth module, would decode and read the message and later encode and pass it on over the CAN to the Master.

After this syncing, the Master would initiate other modules; post which GPS module would send the location signal over the CAN. This signal is again decoded and sent over to the Android as a line having latitude and longitude and prefixed and post-fixed with “#” and “!” , for easier identification in the Android. Location button would enable the current location of the device, which would be marked on the map, this would be enabled on click of start itself. This would also enable Bluetooth module to detect the messages over the CAN to be displayed on the app, like RPM values and GPS data. These are again encoded and sent over to Android, which would display them in respective text boxes.

Route Button on the app would be initiated once we set these and the source and destination by 2 clicks on the maps in the app and start getting the GPS location from HC-06. Route Button on click would detect the GPS location from the car and send out next way points till the destination. The Kill switch is implemented as Stop Button, which sends of “0” signal, which is received by the Bluetooth and sent over the CAN Bus to master, to stop the Motor.

Geographical Controller

Team Members:

Veena Manasa Kanakamalla
Arpita Ramanath


Hardware Design

Discuss your hardware design here. Show detailed schematics, and the interface here.

Hardware Interface

In this section, you can describe how your hardware communicates, such as which BUSes used. You can discuss your driver implementation here, such that the Software Design section is isolated to talk about high level workings rather than inner working of your project.

Software Design

Show your software design. For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level. Do not show the details of the code. For example, do not show exact code, but you may show psuedocode and fragments of code. Keep in mind that you are showing DESIGN of your software, not the inner workings of it.

Implementation

This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.

Master Controller

Team Members:

Ajai Krishna Velayutham
Goutam Madhukeshwar Hegde


Master Controller Schedule

Hardware Design

Discuss your hardware design here. Show detailed schematics, and the interface here.

Hardware Interface

In this section, you can describe how your hardware communicates, such as which BUSes used. You can discuss your driver implementation here, such that the Software Design section is isolated to talk about high level workings rather than inner working of your project.

Software Design

Show your software design. For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level. Do not show the details of the code. For example, do not show exact code, but you may show psuedocode and fragments of code. Keep in mind that you are showing DESIGN of your software, not the inner workings of it.

Implementation

This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.

Testing & Technical Challenges

Describe the challenges of your project. What advise would you give yourself or someone else if your project can be started from scratch again? Make a smooth transition to testing section and described what it took to test your project.

Include sub-sections that list out a problem and solution, such as:

My Issue #1

Discuss the issue and resolution.

Conclusion

Conclude your project here. You can recap your testing and problems. You should address the "so what" part here to indicate what you ultimately learnt from this project. How has this project increased your knowledge?

Project Video

Upload a video of your project and post the link here.

GitLab Source Code

References

Acknowledgement

Any acknowledgement that you may wish to provide can be included here.

References Used

List any references used in project.

Appendix

You can list the references you used.