+ All Categories
Home > Documents > By:David Cohen & Gadi Gilad Instructor: Boaz Mizrahi

By:David Cohen & Gadi Gilad Instructor: Boaz Mizrahi

Date post: 24-Feb-2016
Category:
Upload: rasia
View: 32 times
Download: 1 times
Share this document with a friend
Description:
Project Final Presentation. CAN Bus Logger. By:David Cohen & Gadi Gilad Instructor: Boaz Mizrahi. Spring 2011. Introduction. The CAN (Controller Area Network) bus is an automotive - PowerPoint PPT Presentation
Popular Tags:
20
By: David Cohen & Gadi Gilad Instructor: Boaz Mizrahi Project Final Presentation CAN Bus Logger Spring 2011
Transcript
Page 1: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

By: David Cohen & Gadi Gilad

Instructor: Boaz Mizrahi

Project Final Presentation

CAN Bus Logger

Spring 2011

Page 2: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

IntroductionThe CAN (Controller Area Network) bus is an automotive communications system developed by Robert Bosch specifically for data exchange between electronic control units, switches, sensors and actuators in vehicles. CAN is also used in industrial microcontroller networks.. It allows for data supply between measurement, control and display functions and super ordinate computers, as well as for connecting sensors, actuators and controls.

Page 3: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

The device is divided into three layers. Physical layer to connect to a CAN network, Data Link layer to manage messages to\from other CAN nodes, and a processing unit to run applications.

Processing Unit

Data Link Layer

Physical Layer

CAN Module

MCP2551MCP2515

The CAN Module

SPI

To

MCU

CANH

CANL

To

CAN Bus

RX

TX

PIC18

Page 4: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

Main Goals

Learning: reading previous projects, the CAN protocol,

datasheets and source code. Understanding the MPLAB environment. Performing a loopback test to the device,

checking and debugging the hardware.

Making a conversation between 2 devices. Car testing and operation.

Getting the vehicle data.

Page 5: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

Preforming the LoopbackSend and immediately receive a message in the same device. This operation uses only the MAC layer – it’s sending a test message from the PIC to one of transmit buffers, and getting it in one of the receive buffers.

TransmitBuffer

ReceiveBuffer

PIC

LCD Screen

Page 6: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

Conversation Between Two Devices

TransmitBuffer

ReceiveBuffer

PIC

LCD Screen

Physical Layer

TransmitBuffer

ReceiveBuffer

PIC

LCD Screen

Physical Layer

Sending a CAN message from one device and receiving it in the other device.

Page 7: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

Conversation Between Two DevicesProblems and solutions

• The MAC layer needs 3.3V to operate properly, but the physical layer needs 5V, and we didn’t know it. We fixed it in our code

• The physical layer needs an input load. After adding a resistor of 75Ω we saw on the scope that the message had been delivered from the sending device, but still not the other device.

Page 8: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

Conversation Between Two DevicesProblems and solutions (cont.)

• We noticed that there’s an open circuit on the main board of one of the devices. It prevented the communication between the PIC and the MAC. We showed this to Bruria and she fixed it. Now we could send and receive messages between the devices!

• The sensitivity of the LCD screen caused us a lot of problems – the connector got torn many times.

Page 9: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

OBD II ConnectorThe signaling method is differential because we only deal with the CAN protocol. So we ordered the used the pins number 5, 7 and 14.

Page 10: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

Getting Messages From The Vehicle

• When we first connected the device to the car we couldn’t receive messages from it.

• After connecting the scope to the OBD connector we saw that the frequency of the bits in the car (500 KHz) is different from the frequency the device was configured initially (2 MHz).

Problems and solutions

Page 11: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

Getting the Job Done… Outside

Page 12: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

Getting Messages From The VehicleProblems and solutions (cont.)

• In order to match the physical constrains, we changed the configuration registers. We needed to configure propagation delay, hold time and the time quantum (TQ).

• After the configuration the device was able to get the valid CAN messages. However, we couldn’t understand what they mean!

Page 13: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

Getting The Job Done… Inside

Page 14: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

Getting Messages From The VehicleProblems and solutions (cont.)

• In order to check the car messages, we used a different device: ELM327. This device is an industrial tool that get CAN messages. Then we saw that the messages received in it were identical to those received in our device.

Page 15: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

Getting Messages From The VehicleProblems and solutions (cont.)

• After working with the ELM327 we understood that the most simple way to work with the CAN is to send queries and get their response.

• Now, finally, we can send queries about the car condition, such as speed, throttle, engine temperature, RPM etc. and get the results on our device!!!

Page 16: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

The Device at WorkMeasuring the RPM

~2200 rpm!!!

Page 17: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

The Device at WorkMeasuring the RPM

~1700 rpm!!!

Page 18: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

The Device at WorkMeasuring the RPM

~1000 rpm!!!

Page 19: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

Notes…

Page 20: By:David Cohen & Gadi Gilad Instructor:    Boaz Mizrahi

Recommended