8
Performed by: Raz Zur Instructor: Boaz Mizrahi תתתת תתתתתתת תתתתתתת תתתתתתh speed digital systems laboratory תתתת- תתתתתתת תתתתתתתת תתתתתת תתתתתתת תתתתתת תתתתTechnion - Israel institute of technology department of Electrical Engineering תת”ת תתתתת תתתתתתDeveloping a Control Card Developing a Control Card Based on I2C Bus Based on I2C Bus תתתתת תתתת תתת"ת1

Performed by: Raz Zur Instructor: Boaz Mizrahi המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי

  • View
    228

  • Download
    4

Embed Size (px)

Citation preview

Performed by: Raz Zur

Instructor: Boaz Mizrahi

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

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

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

Technion - Israel institute of technologydepartment of Electrical Engineering

דו”ח סיכום פרויקט

Developing a Control Card Developing a Control Card Based on I2C BusBased on I2C Bus

סמסטר חורף תשס"ד1

Project’s PurposesHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

2

• Building a monitoring and control card, to be Building a monitoring and control card, to be installed in a stand-alone system. installed in a stand-alone system.

• The card will perform a few routines that The card will perform a few routines that monitor and control the system, according to the monitor and control the system, according to the output of sensors that are installed in the system. output of sensors that are installed in the system.

• The communication between the devices of the The communication between the devices of the card will be implemented using the I2C serial card will be implemented using the I2C serial communication protocol. communication protocol.

General BackgroundHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

3

•Today's world of technologyToday's world of technology requires monitoring and control. requires monitoring and control.•One of the better solutionsOne of the better solutions – building a "monitoring" system – building a "monitoring" system apart from, and parallel to the "original" system. apart from, and parallel to the "original" system.•The advantagesThe advantages – system resources, development – system resources, development and maintenance, simplicity. and maintenance, simplicity.•The ideaThe idea – maximum monitoring and control – maximum monitoring and control with minimum interference. with minimum interference.•ImplementationImplementation – with a serial protocol. – with a serial protocol.•Technological solutionTechnological solution – the I2C serial communication protocol. – the I2C serial communication protocol.

•I2CI2C - Short for Inter-IC, a type of bus designed by - Short for Inter-IC, a type of bus designed by Philips Semiconductors in the early 1980s, which is Philips Semiconductors in the early 1980s, which is used to connect integrated circuits (ICs). used to connect integrated circuits (ICs).

System Block DiagramHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

4

Serial EEPROMSerial EEPROM

II22C BUSC BUS

Micro-Micro-proce-proce-

ssorssor

LED ControlLED Control Intrusion AlertIntrusion AlertFans ControlFans ControlKey PadKey Pad LCD DisplayLCD Display

Temp. SensorTemp. Sensor

EEPROM BLOCK

CONTROL BLOCK

SENSE BLOCK

MMI BLOCK

POWER BLOCK

Hardware SpecificationHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

5

The POWER Block:Voltages supply – 12V input, lowering to 3.3V and 5V, using regulators (LM1085).Voltages supply – 12V input, lowering to 3.3V and 5V, using regulators (LM1085).Protections – diode bridge (DF005M) for protection against inverted voltage, and a fuse for Protections – diode bridge (DF005M) for protection against inverted voltage, and a fuse for protection against shortcut current.protection against shortcut current.Noise reduction – capacitors and coils circuits.Noise reduction – capacitors and coils circuits.

The CONTROL Block:Microprocessor - PIC18F252, the I2C master.Microprocessor - PIC18F252, the I2C master.4MHz oscillator – clock frequency for the microprocessor.4MHz oscillator – clock frequency for the microprocessor.Voltage translator – between 3.3V and 5V.Voltage translator – between 3.3V and 5V.MAX232 – a-synchronic communication with an outer computer.MAX232 – a-synchronic communication with an outer computer.

The SENSE Block:LM75 – a device with I2C interface, which is a temperature sensor with 0.5 °C resolution.LM75 – a device with I2C interface, which is a temperature sensor with 0.5 °C resolution.LM87 – a device with I2C interface, which includes D/A for control of the fan speed, LM87 – a device with I2C interface, which includes D/A for control of the fan speed, measurement of the fan speed, intrusion alert, entrances for far temperature sensors, and measurement of the fan speed, intrusion alert, entrances for far temperature sensors, and measurement of voltages in the card.measurement of voltages in the card.

The MMI Block:LCD screen – LK12-162, Display unit and a Keypad with I2C interface.LCD screen – LK12-162, Display unit and a Keypad with I2C interface.PCA9553 – a device with I2C interface for LEDs control.PCA9553 – a device with I2C interface for LEDs control.

The EEPROM Block:Designated memory – FM24C16U, serial EEPROM with I2C interface.Designated memory – FM24C16U, serial EEPROM with I2C interface.

Software SpecificationHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

• The I2C Protocol:Bus speed: 100KHz.Bus speed: 100KHz.Devices are addressed completely by software.Devices are addressed completely by software.8 bits oriented.8 bits oriented.The maximum allowable capacitance is 400 pF (The maximum allowable capacitance is 400 pF (about 20 to 30 devices)..

6

Software structureHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

7

Finish: exit or reset the system

Outer loop: calling to a routine according to the user's choice from the menus that appear on the display – temperature reading, card's voltages reading, fan speed, setting temperature threshold, turning off intrusion alert, or exiting.

Carrying out the routine

YESNO

Inner loop: sensing the system's data, and control accordingly

StartSystem initialization

Has a key been

pressed?

NO

Is it an exit key?YES

The Card and The SystemHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

8