canbus logger final a

Download CANBus Logger Final A

Post on 07-Apr-2018

220 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • 8/3/2019 CANBus Logger Final A

    1/32

    CAN-Bus LoggerFinal A Presentation

    Jan. 14, 2010

    Elad BarzilayIdan Cohen-Gindi

    Supervisor: Boaz Mizrahi

  • 8/3/2019 CANBus Logger Final A

    2/32

    Abstract

    The goal of this project is to produce A Real-

    time Data Logging system which connects to a

    vehicles CAN-Bus, An External GPS deviceand Analog sensors, for reach data storage and

    analysis.

  • 8/3/2019 CANBus Logger Final A

    3/32

    Necessity & Overview

    In the vehicle industry, the most common protocol is the CAN- Control Area Networkprotocol on a central communication

    Bus.

    OBD - self diagnostic and reporting capability, which allowsaccess to the vehicles bus and access to variable information

    of all sub systems of the vehicle.

    The OBD standard is very informative, giving a wide range of

    information such as: Engine temperature, RPM, fuel systemstatus, car speed, and many analog sensors data.

    The device will operate as a data logger of such information,integrating it with various supporting data from the sensors,

    for complete overview of the vehicles operation.

  • 8/3/2019 CANBus Logger Final A

    4/32

    Necessity & Overview

    The device will be compact, user friendly and portable, thusmaking it more suitable for personal and public usecontrary

    to the rigid, professional OBD scan tools available on the

    market today.

    The device will posses advanced functions such as:

    Advanced diagnostic.

    Real time monitoring of the vehicles operation.

    Access and control of other control units on the vehicle.

    The device will be able to support various applications andwill allow analysis on board a PC.

  • 8/3/2019 CANBus Logger Final A

    5/32

    CAN Protocol - Reminder

    CAN is a message based serial communication protocol efficiently supports real-time control and very high level of

    reliability and security.

    Designed for communication between several ElectronicControl Units (ECU's). Widely spread and accepted standard in industrial systems,

    mainly in automotive systems.

    Properties:

    Prioritized Multi-Master & Multi-Cast Message Routing

    Arbitration - CSMA/CD

    Strong Error Detection and Fault Confinement

  • 8/3/2019 CANBus Logger Final A

    6/32

  • 8/3/2019 CANBus Logger Final A

    7/32

    Objectives

    Preliminary Design Block Diagram Design Concepts Architecture & Platform

    Detailed Design Main Components Electrical Design Pin to Pin Integration & Platform Adjustments Mechanical Design

    Layout & Manufacturing Software\Firmware

    overview & outline

  • 8/3/2019 CANBus Logger Final A

    8/32

    Block Diagram

    Processing

    UnitData Link

    LayerPhysical

    Layer

    CAN Module

    Physical Layer : Maintaining CAN

    electrical requirements

    Protecting the device

    Data Link Layer-

    Protocol implementation

    Basic message filtering

    Processing Unit :

    Manage CAN applications

    Control peripheral devices

    User interface

  • 8/3/2019 CANBus Logger Final A

    9/32

    Block Diagram

    CANModule

    MCU

    AnalogDevices

    On-Board User InterfaceLCD & Key-Pad

    FlashMemory

    CAN Busnetwork

    PC

  • 8/3/2019 CANBus Logger Final A

    10/32

    Design Concepts

    Complete board design

    Evaluation Board

    CAN-to-USB

    Pigi-board

  • 8/3/2019 CANBus Logger Final A

    11/32

    Design Concepts

    Complete board design

    Evaluation Board

    CAN-to-USB

    Pigi-board

    Main considerations:

    Producing a complete

    product Simple design, re-use,

    given time frame.

    Versatile project, touching various

    fields of design.

  • 8/3/2019 CANBus Logger Final A

    12/32

    Architecture & Platform

    The chosen Pigi-board concept requires a strong platform for

    power and processing.

    we explored two devices to base our CAN project uponPCD

    and POWER BENCH.

  • 8/3/2019 CANBus Logger Final A

    13/32

    Architecture & Platform

    We chose to use the PCD, mainly because of its higher level of

    readiness.

    in addition, it holds many analog sensors, useful for various applications.

    the Power-Bench has better processing abilities, but its also much larger

    and a bit of an over-kill for our needs.

  • 8/3/2019 CANBus Logger Final A

    14/32

    Objectives

    Preliminary Design Block Diagram Design Concepts Architecture & Platform

    Detailed Design Main Components Electrical Design Pin to Pin Integration & Platform Adjustments Mechanical Design

    Layout & Manufacturing Software\Firmware

    overview & outline

  • 8/3/2019 CANBus Logger Final A

    15/32

    CAN Module Components

    CAN Module

    CANH

    CANL

    RX

    TX

    MCP2551Transceiver

    MCP2515Controller

    SPI

    To

    MCU

    CAN ControllerMCP2515

    Implementing the CAN protocol engine

    Receiving and transmitting buffers.

    Filtering and masking capabilities for

    message analyses and acceptance.

    Error detection and handling and bit

    timing.

    CAN TransceiverMCP2551

    Transform the TX,RX lines to CAN_H ,

    CAN_L required for the connector

    to the bus.

    Supports 1 Mb/s operation

    Suitable for 12V and 24V systems

    fault-tolerant & high buffering protection

  • 8/3/2019 CANBus Logger Final A

    16/32

    Electrical Design

    canctrl_osc1

    canctrl_canxr_RX_r

    J1

    ESQT-102-03-G-S-401

    12

    J2

    ESQT-102-03-G-S-401

    1

    2

    J4

    ESQT-102-03-G-S-401

    12

    J5

    ESQT-102-03-G-S-401

    12

    VCC_3p3

    VCC_5p0

    can_mcu_intn

    mcu_can_spi_clk

    mcu_can_spi_dincan_mcu_spi_dout

    mcu_can_spi_csn

    VCC_3p3

    can_rx0bfn

    VCC_3p3

    VCC_3p3

    VCC_5p0

    mcu_can_spi_csn

    can_mcu_intn

    canxr_canh

    canctrl_canxr_TX

    canxr _rs

    can_mcu_sof

    canctrl_rst

    canctrl_rst_r

    can_rx1bfn_dcan_rx1bfn

    canxr_canl

    can_mcu_spi_doutmcu_can_spi_din

    TX0RTSn

    canctrl_canxr_RX

    U1

    MCP2515-I/SO

    TXCAN1

    RXCAN2

    CLKOUT/SOF3

    TX0RTS4

    TX1RTS5

    TX2RTS6

    OSC27

    OSC18

    VSS9

    VDD18

    RESET17

    CS16

    SO15

    SI14

    SCK13

    INT12

    RX0BF11

    RX1BF10

    C4

    100nF 16V 10%

    R3 300

    TP3

    1

    R11

    0

    D3

    LED

    D2

    LED

    R4

    300

    J3

    HEADER-3

    123

    R7 4.7k

    R2

    4.7

    k

    R6

    4.7

    k

    C5

    1uF 6.3V 10%

    TP4

    1

    C1

    100nF 16V 10%

    MCP2551-I/SN

    U2

    TXD1

    V_SS2

    V_DD3

    RXD4

    Rs8

    CANH7

    CANL6

    V_REF5

    TX1RTSn

    Y124MHz

    R8

    300

    R1

    4.7

    k

    C3 15pF 50V 5%

    TP1

    1

    R10

    470

    R5

    300

    C2 15pF 50V 5%

    mcu_can_spi_clk

    R9120

    TP5

    1

    TP2

    1

    TX2RTSn

    D1LED

    VCC_3p3

    canctrl_osc2

  • 8/3/2019 CANBus Logger Final A

    17/32

    Pinout Description

    Voltage supply 3.3 Volt for the

    operation of the MCP2515 CANcontroller.

    5 Volt for theoperation of the MCP2551 CAN

    transceiver. Gnd

    SPI Interface SPI Data In SPI Data In SPI Clock SPI CSn

    CAN Communication

    MCP2515 Interrupt

    request for attention from theMCU.

    Connectors on-boardthe PCD board:

    Connectors on-boardthe CAN board:

  • 8/3/2019 CANBus Logger Final A

    18/32

    Integration & Platform

    Adjustments Add/Remove HW and fix problems spotted during the first debug:

    1. Completing the ECOs list.

    2. Adding new memory to the new PCB version.

    3. Finishing Supporting Firmware.

    Making suitable Adjustments for the CAN Module integration:4. Adding needed connectors to the PCD board.

    5. Mapping required nets to the CAN module.

    6. Integrating connectors and all ECO's (already mapped).

    7. Manufacturing the revised board. Bring up and power up of the new Board:

    8. Creating bring up software.

    9. Mechanical design (CAN board, PCD external case).

  • 8/3/2019 CANBus Logger Final A

    19/32

    Integration & Assembly

    Because of shortage of free I/O ports on the microprocessor we are using only

    the most essential ports of the CAN controller.

    CAN module CS line is mapped to exciting aux debug led line, thus operation

    of the module using the bus is indicated by the led.

    SPI BUS - both connection of the CAN module and the MicroSD memory

    card are mapped to the MCUs SPI module pinout using bus mode.

    MCU PIN 53: mcu_aux_led3

    R127

    300

    VCC_3p3

    D3

    LED

    debug_led_pwr

    mcu_can_csn

  • 8/3/2019 CANBus Logger Final A

    20/32

    Integration & Assembly

    Overloading the CAN module interrupt line upon the existing interrupt linefrom the TMP sensoraccepted method of gathering INT signals.

    The SD memory card CS line is mapped as well to the INT bus , thusrequiring adding of pull-up resistor and setting the line configuration as shownhere:

    This configuration requires that the arbitration of the INTs and the operationof the SD card will be handled in software.

    Usage of the CAN module will be done mostly in pollin