S17: MyAutoHealth

From Embedded Systems Learning Academy
Revision as of 00:16, 20 May 2017 by Proj user12 (talk | contribs) (Software Design)

Jump to: navigation, search

Grading Criteria

  • How well is Software & Hardware Design described?
  • How well can this report be used to reproduce this project?
  • Code Quality
  • Overall Report Quality:
    • Software Block Diagrams
    • Hardware Block Diagrams
      Schematic Quality
    • Quality of technical challenges and solutions adopted.

MyAutoHealth

Real-time vehicle diagnostics.

Abstract

Wear and tear or aging of parts of an automobile may cause a malfunction which may lead to accidents, loss of life and property. Being able to pinpoint the issue in the automobile could be harder than actually fixing one. Most modern vehicles, just like a computer, have a central processing unit called the Engine Control Unit (ECU) which oversees all operations. This project aims to use an external OBD 2 module to communicate with the ECU using UART and display the status of all critical vehicle parameters to the user. This will enable the user to monitor the engine’s internal functioning. The module will suggest measures to improve driving efficiency and avoid damage. The module will also be used to analyze the driving habits of people, especially school bus drivers or those taking a driving test.

Objectives & Introduction

An OBD 2 module was used to communicate with the ECU of an automobile to read engine critical parameters. An LPC 1768 was used as the master for communication. The LPC node was powered using FreeRTOS. The master needed to issue a set of standard AT-commands to the OBD port. The LPC microcontroller doesn’t have the ability to communicate directly with an OBD port. Therefore, an intermediary communicator was used to facilitate smooth communication between the devices. The communicator was a UART to OBD fully-duplex converter. An OBD 2 port communicates with an ECU using CAN protocol. Therefore, in response to commands, an OBD terminal reads critical engine parameters like temperature, rpm, combustion efficiency, etc. from the ECU. The LPC master sent a byte of data to the OBD and in response to this command, the OBD terminal used CAN protocol to trans-receive a byte of data from the ECU. This byte was sent to the LPC. The master would then poll its registers to ensure that a valid byte is transmitted and received. Knowing the values of critical parameters can help a driver avert an engine seizure or prevent unforeseen accidents. The critical engine parameters were displayed on a LCD screen. The LPC master communicated with the LCD screen using I2C serial communication protocol. Care was taken to ensure that operating system queues were implemented efficiently to ensure that only after valid data was received from the OBD was it displayed on the LCD screen. An accelerometer was used for bump detection. A dedicated task was created to read z-axis values and analyze this data. Signal processing techniques were employed to make a decision whether a bump was detected or not. The z-axis values were normalized and the autocorrelation of the sequence was taken. The time domain autocorrelation function was transformed to its frequency domain equivalent. This result of this operation was the Power Spectrum Density of the signal. A thorough analysis of the spectrum was done to identify the signal. A decision was taken based on its pattern.

Team Members & Responsibilities

  • Manan Mehta
    • Interface Accelerometer and use appropriate algorithms to measure road dumps.
  • Pushpender Singh
    • Soldering and connecting OBD II Uart components.
    • Interfacing the serial port.
    • Acquiring OBD reading from the vehicle.
    • Translating received data to Graphs/meters.
  • Sameer Saran
    • Worked on LED display
  • Sanman Pradhan
    • Design a PCB to accommodate the various hardware components.
    • Schematic is being designed using EaglePCB.
    • The power supply circuit, designed to be the main power source, peripherals such as the LCD will be housed on the PCB.
    • Assist with interfacing and programming of the temperature sensor.
  • Shashank Iyer
    • Acquiring a temperature sensor that can operate in the full range of temperature swing that an average engine fluctuates between.
    • Using a sturdy standoff to ensure it is able to read values accurately from the air around the engine.
    • Supplying power to the sensor from the SJ1 board.
    • Processing sensor outputs through the onboard ADC to make them processor readable.
    • Creating a task that polls the value from the sensor at intervals of 10 ms and pushes it to a queue.
    • Creating a second task that waits for the queue data and displays it.
    • If the temperature exceeds safe limits, a software interrupt is triggered and decides whether to alert the driver or cut the ignition.

Schedule

Week# Date Task Action
1 03/21 Research Project design and Finalize concept Completed
2 03/28 Purchasing BOM and Assign Tasks Completed
3 04/04 Developing C code to read Accelerometer readings Completed
4 04/11 Interfacing OBD II sensor with SJ one board Completed
5 04/18 Developing C code to retrieve data from Vehicle and PCB design
6 04/25 Integrating OBD and Sensor code into tasks and PCB design In-progress
7 05/02 Testing and debugging
8 05/09 PCB Assembly and Testing Assembly- Completed, testing - In progress
9 05/16 Ready for Demo

Parts List & Cost

Give a simple list of the cost of your project broken down by components. Do not write long stories here.

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.

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

This feature was added to enable monitoring a driver’s behavior. This could be widely used by schools to keep an eye on their drivers. An accelerometer was used to detect bumps. The accelerometer in the SJOne board was used to detect bumps in the vehicle travel path. The bump detection feature will also assist in mapping the driver's pattern and manner of driving. Depending upon the unevenness of the travel path, the LCD will display "No Bumps" or "Bump Detected". Accelerometer's z-axis value is read every 100 ms by creating a task.

The process to detect a bump broadly involved four steps:

1.Identifying a threshold value for the sensor beyond which bump detection is valid.

2.Reading values from the accelerometer sensor.

3.Using signal processing to obtain its Power Spectrum Density.

4.Analyzing the power spectrum of the signal.

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.

Project 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.