Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

21
Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk תתתת תתתתתתת תתתתתתת תתתתתתSpeed Digital Systems Laboratory תתתת- תתתתתתת תתתתתתתת תתתתתת תתתתתתת תתתתתת תתתתechnion - Israel institute of technology epartment of Electrical Engineering Final Presentation Smart Door Controller Spring semester 2004

description

Technion - Israel institute of technology department of Electrical Engineering. הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל. המעבדה למערכות ספרתיות מהירות. High Speed Digital Systems Laboratory. Final Presentation. Smart Door Controller. Performed by: Kobbi Kfir-El - PowerPoint PPT Presentation

Transcript of Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

Page 1: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

Performed by: Kobbi Kfir-ElOhad Brandelstein

Instructor: Konstantin Sinyuk

High Speed Digital Systems Laboratoryהמעבדה למערכות ספרתיות מהירות

הטכניון - מכון טכנולוגי לישראל

הפקולטה להנדסת חשמל

Technion - Israel institute of technologydepartment of Electrical Engineering

Final Presentation

Smart Door Controller

Spring semester 2004

Page 2: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

SDC visionSDC vision

Page 3: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

SDC visionSDC vision

ServerLAN 2 CAN

CAN

Door 1Door 2Door 3

Web

Remote station

Page 4: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

Initial project goalsInitial project goals

Lab’s board validationLab’s board validation Implementations:Implementations:

CAN transportationCAN transportation SDC operating systemSDC operating system Server softwareServer software Integration of peripherals under RT Integration of peripherals under RT

demandsdemands Network behavior & performancesNetwork behavior & performances

Page 5: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

Getting startedGetting startedLab’s board validation:Lab’s board validation:

Operating all peripherals devicesOperating all peripherals devices KeypadKeypad Magnetic card readersMagnetic card readers I2C module (EPROM, Thermometer)I2C module (EPROM, Thermometer) LCD screen, Buzzer, LedsLCD screen, Buzzer, Leds USARTUSART

Operating all PIC relevant modules:Operating all PIC relevant modules: ISR (Interrupt Service Routine)ISR (Interrupt Service Routine) TimersTimers CANCAN

Page 6: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

DifficultiesDifficulties SDC card : SDC card :

Stability & Reliability : Different results in same Stability & Reliability : Different results in same program program during developmentduring development

Unable operating CAN, LCD modules Unable operating CAN, LCD modules Keypad : Needed modifications.Keypad : Needed modifications. Lab equipment : Lab equipment :

Insufficient Demo boards, Computers.Insufficient Demo boards, Computers.

CCBBAA00

DD998877

EE665544

FF332211

Page 7: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

ProgressProgress

April 04 ------------- Characterization Presentation

Getting familiar with PIC Tools Basic SDC Power Up

May 04 ------------- Half Semester Presentation

May – September -- Stuck at Basic Power Up

October -------------- New Project Goals April 05 -------------- Final Presentation

Page 8: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

Redefinition of project Redefinition of project goalsgoals

Completion of project Implementation on PICDEM2 demo

boards Create prototype of a RT access

system controller Operate CAN protocol between 2

boards Enable Magnetic card reader usage

Page 9: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

Redefinition of project Redefinition of project goalsgoals

LCDThermometer EPROEPROMM

Key pad Magnetic card

CAN

Page 10: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

SDC PrototypeSDC Prototype

Simple operating systemSimple operating system Resources management (ISR, Timers, Resources management (ISR, Timers,

EPROM)EPROM) I/O handlersI/O handlers InterfaceInterface

CAN implementationCAN implementation Master / SlaveMaster / Slave Protocol fundamentalsProtocol fundamentals

Page 11: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

SDC PrototypeSDC PrototypeOperating System ImplementationOperating System Implementation

I/O I/O devicedeviceExternal External

interruptinterrupt

Main routineMain routineChecking temperatureChecking temperature

Checking flagsChecking flags

ISRISRService InterruptService Interrupt

(priority)(priority)

Handle interrupt Handle interrupt eventevent

Flag ON Flag ON

ExecuteExecute

Flag eventFlag event

Timer/CANTimer/CAN

Internal Internal interruptinterrupt

Flag OFF Flag OFF

Page 12: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

Solution - Hash table ( RT ) Solution - Hash table ( RT ) Hash code - last 3 digits of IDHash code - last 3 digits of ID Hash properties:Hash properties:

Insert O(1)Insert O(1) Delete O(1)Delete O(1) Search O(1)Search O(1)

Principle of search:Principle of search: First look in relevant cell, if full look in First look in relevant cell, if full look in

STACK.STACK.

SDC PrototypeSDC PrototypeData management (EPROM)Data management (EPROM)

Page 13: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

SDC PrototypeSDC PrototypeData management (EPROM)Data management (EPROM)

32750

30020

30010

100687566030000

29990

29980

29970

80

70

200521656060

100586652050

100662593040

100164982030

20

10

00085257500

9876543210ADDRESS

Stack

Cell 0 (000)Cell 0 (000)

Cell 1 (001)Cell 1 (001)

Cell 2 (002)Cell 2 (002)

Cell 999 Cell 999 (999)(999)

32Kbyt32Kbytee

Page 14: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

SDC PrototypeSDC PrototypeCAN protocol & transportationCAN protocol & transportation

Master / Slave implementationMaster / Slave implementation Master ( Server ) - knows all SDC’s Master ( Server ) - knows all SDC’s

( nodes )( nodes ) Slave ( SDC controller ) - knows only Slave ( SDC controller ) - knows only

the masterthe master Every node has unique IDEvery node has unique ID

MasterMaster

SlaveSlave SlaveSlave SlaveSlave SlaveSlave

CANCAN

Page 15: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

SDC PrototypeSDC PrototypeCAN protocol & transportationCAN protocol & transportation

Slave : Slave : Transmits to CAN bus, own ID Transmits to CAN bus, own ID Listens only to messages with it’s ID - Listens only to messages with it’s ID -

Implemented by Filters & Masks Implemented by Filters & Masks mechanism mechanism

Master : Master : Listens to CAN bus, response to all nodesListens to CAN bus, response to all nodes Transmits emergency messages to all Transmits emergency messages to all

nodes (broadcast)nodes (broadcast) Transmits to specific node Transmits to specific node

Page 16: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

SDC PrototypeSDC PrototypeCAN protocol & transportationCAN protocol & transportation

CAN message - 3 main fields CAN message - 3 main fields ArbitrationArbitration, , Control, Data.Control, Data.

Arbitration field: Arbitration field:

MaskMask Master 111100000000Master 111100000000 Slave 111111111111Slave 111111111111

MSG TypeMSG TypeNode IDNode ID

0000110000000000001111

ArbitratioArbitrationn

ControControll

DataData

Page 17: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

Lab’s board problemsLab’s board problems PIC 18f458 : wrong type PIC 18f458 : wrong type PLCC

instead of TQFP Suspected mismatch in connecting Suspected mismatch in connecting

PIC to SDC board. - result: LCD not PIC to SDC board. - result: LCD not functioning functioning

Both CAN transceivers not operatingBoth CAN transceivers not operating

PLCCPLCC TQFPTQFP

Page 18: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

Lab’s board problemsLab’s board problems

Connections - antennas, short Connections - antennas, short welding might cause unstable welding might cause unstable behaviorbehavior

Page 19: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

Finding SDC problemsFinding SDC problems

LA, DVMLA, DVM

testingtesting

SDC runningSDC running

Same programSame program

Programming Programming

module on module on

Demo BoardDemo Board

CompareCompare

Good resultsGood results

ConclusionsConclusions

Bad resultsBad results

Page 20: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

Project benefitsProject benefits (what we learned…)

Read hardware specifications Learn about MCU’s System design, implementation and

integration Basic understanding of hardware Communication protocols: I2C, CAN Lab equipment usage : DVM, Logical

Analyzer Experience: Wire-up, Welding Use the Internet as a help tool Use Wire-up prototype prior to board design

Page 21: Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk

SummerySummery Final project exceeds redefined goalsredefined goals Original design compatibility was kept Project can be defined as a reference

design for future groups Redesign must take in mind a different

MCU: Problems with multi interrupt scenario Tool supported by better debuggerTool supported by better debugger