gaziantep university department of electrical and electronics engineering 1 development of...

Post on 19-Jan-2016

222 Views

Category:

Documents

5 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

Gaziantep UniversityDepartment of Electrical and Electronics Engineering

Development of Monitoring Blood Bank CenterBased PIC Microcontroller Using CAN

Communication

Prepared by : KAIWAN S. ISMAEL

International Conference on Electrical and Microelectronics Systems

2

55%41%

4%

plasma RBC platelet&WBC

Human’s blood are divided in to three main components

1. Plasma2. Red Blood Cell (RBC)3. Platelet & White Blood Cell

3

Plasma

Platelet

RBC

20◦ _ 24 ◦

-18◦ _ -24 ◦

1◦ _ 6 ◦

Each component of blood should be stored in different refrigerators because of the temperature limit’s range.

Storing Of Blood Component

4

Due to the security of locations in the blood bank hall and difficulty of monitoring of big number of refrigerator separately, this work proposes a solution to setting and monitor all the blood bank refrigerators in one location.

Refrigerators Inside Blood Bank Center

Plasma PlateletRBC

5

We designed the employed principles to monitor the blood centers by using MPLAB and C code. PIC microcontrollers are used to implement the hardware architecture of each node. The nodes that have a thermometer to read the temperatures in the blood centers, communicate with the display node through in implementing CAN bus system.

Fig. 2 CAN Bus Block DiagramFig. 1 CAN Bus Block Diagram

6

CAN Bus Introduction

Controller Area Network (CAN)Originally developed by Robert Bosch for automobile in-vehicle networkMulti-drop, Multi-master serial bus provides communication Between controllers, sensors, and actuators.Very reliable and robust, well proven technology(introduced mid 1980s)

Inexpensive

7

CAN Bus Introduction

CAN 2.0 A

- Standard format

CAN 2.0 B

- Extended format

ISO – 11898 – 2 =High Speed up to 1Mbps

ISO – 11898 – 3 =Low Speed up to 125 Kbps

8

CAN Bus Introduction

CAN Applications

AutomotiveMilitary vehicles

Industrial machinery

Medical Systems

Agricultural machinery

Marine control and navigation

Elevator control systems

9

CAN Bus Introduction

CAN Characteristics

All messages are broadcast

Any node is allowed to broadcast a message

Each message contains an ID that Identifies the source or content a identifies the source or content of a message

Each receiver decides to process or ignore each message

10

CAN Bus Introduction

CAN Characteristics

Bus length/Bit rate tradeoff

1 M bit/sec 40 meters500K bit/sec 100 meters

250K bit/sec 200 meters

125K bit/sec 500 meters

11

CAN Bus Introduction

CAN Characteristics – Bit timing

Local timing logic re-synchronizes with bus on each recessive to dominant transition

12

CAN Bus Introduction

CAN Characteristics

Network Size

The maximum number of nodes is not specified

Networks are limited by electrical loading ,up to 64 nodes is normal

13

CAN Bus Introduction

CAN Characteristics

Network Size

The maximum number of nodes is not specified

Networks are limited by electrical loading ,up to 64 nodes is normal

14

CAN Bus Introduction

CAN Characteristics Bit fieldStandard CAN

Standard CAN: 11-Bit Identifier

Extended CAN

Extended CAN: 29-Bit Identifier

15

Peripheral Interface Controller (PIC)

internal memory

Central Processing Unit (CPU)

Read Only Memory (ROM)

Random Access Memory(RAM)

peripherals

PIC microcontrollers ( Programmable Interface Controllers), are electronic circuits that can be programmed to carry out a vast range of tasks

A microcontroller has 3 basic parts :

digital I/O pins

Analog to Digital Converters (ADC) , Timers and counters

16

Peripheral Interface Controller (PIC)

Application of PIC

A microcontroller is a compact microcomputer designed to govern the operation of embedded systems in :

Motor vehicles RobotsOffice machinesMedical devicesTelecommunications systems

Alarm systems and fire detectionHome security systems & Home automation systems

17

Peripheral Interface Controller (PIC)

Benefits of the PIC Microcontroller

Faster speed

Lower cost

Easier and quicker development

18

Program language

ASSEMBLY language

C language

BASIC language

19

Why program PICs in C ?

C is a portable language, requiring minimal modification whenTransferring programs from one processor to another

C programming in high-level language rather than assemblerAllows programs to be developed much more rapidly

Typically a program which takes a few weeks in assemblerCan be written in C in a few days

20

PIC programming overview

Write the code

Compile the code

Upload the code into a microcontroller

21

The hardware module is consisting of four main nodes, each node in different places and collects all refrigerator temperatures in one place. Also each node sends data to the bus. Our hardware is simulated in a one card and consist it the following :

HARDWARE ARCHITECTURE

Blood Bank Center designed layout

22

1. PICF18458

PIC18F458 PIN diagram

23

2. MCP2561 Control Area Network (CAN) Transceiver:

high-speed CAN, fault-tolerant device that serves as the interface between a CAN protocol controller and the physical bus

including 5V requirements

operate at speeds of 1 Mb/s

CANH

CANL

24

LM7805CVoltage Output

+5V+9V

Voltage Input

GND

Vin Vout

3.LM7805C VOLTAGE REGULATOR

The operating voltage range of PIC18F458 is 2.0V to 5.5V. So LM7805C which is a +5.0V 1A voltage regulator, is used. It is a linear voltage regulator that produces a relatively constant output voltage of +5VDC

4.Temperature sensor LM35The LM35 is an integrated circuit sensor that can be used to measure temperature with an electrical output proportional to the temperature (in C°)

LM35 Temperature Sensor

Voltage Regulator Circuit

The LM35 does not require any external calibration

10mV per 1 °C

LM35 is that it draws only 60 micro amps from its supply

25

The Implemented Algorithms

This project is a four node CAN bus project, which are Display, Plasma, platelet, and RBC node

The display node is consisting of a PIC18f458, a 4 MHz Oscillator, a transceiver MCP2561, 7channel Darlington Sink Driver ULN2003APG is connected to the PORTE of PIC, Buzzer, LED and an LCD is connected to the PIC via port D. All the components interface with each other and work based on a specified algorithm. Using C-Language that is compiled on MPLAB v.8.92 we have programmed the PIC. The PIC18f458 has one build in CAN module and CAN controller. This facilitates the CAN project because there is an internal interface between the CAN module and the CAN controller. The shows the circuit diagram of the Node.

Display Node

26

Display Node Schematic Diagram

27

Flow Chart For CAN Based Display Node

28

The Implemented Algorithms

This node has the following components: a PIC18f458, an LM35 temperature sensor, a 4 MHz Oscillator, and an MCP2561 transceiver. The temperature sensor is connected to the Analog to Digital Converter (ADC) which is a module inside the PIC through Port A (RA1).The temperature sensor continuously reads the actual temperature and sends the temperature as a voltage signal to ADC input pin which is RA1 in my case

Red Blood Cell (RBC), Platelet and Plasma Node

29

RBC, Platelet and Plasma Node schematic diagram

30

Flow Chart for CAN Based RBC, Platelet and Plasma Node

31

Display node

Platelet node

RBC node

Plasma node

32

33

34

Plasma node RBC node Platelet node

Display node

35

The four nodes CAN bus system designed and implemented successfully and the data exchanges between all the four nodes. The PIC18f458 is used in each of the four nodes. The PIC18f458 that used in display node interfaced with an LM35 temperature sensor and the CAN bus.The node is read the temperature from the sensor and build a CAN package data and then put it on the can bus as well as the node read the data on the bus successfully. Another node has been designed in this project that connected to an LCD and has sent the data to show on the LCD successfully. The LCD (display) node could send and read the data on the bus perfectly, Also it turned on and off the LED and Buzzer successfully in case the temperature is greater or less than the limited range.

conclusion

REFEERENCES[1]Texas Instrumeents, “Introductioon to the Conttroller Area Neetwork CAN),” Appliccation report, SLLOA101A–Auguust 2002–Revisedd July (CAN specificcation version 22.0 Robert Boschh GmbH, publisshed by 2008. copper hill Teechnologies Corpooration.

[2] Steve Corriggan, “Introductioon to the Conttroller Area Neetwork”, pH Sensor byy Using PIC Microcontroller Unit (MCU)””IEEEPublished byy Texas Instrumments Applicatio n Report, SLO A101A, August 2002––Revised July 20008. C.P.,pp.148-1522,2009.

[4] U. Hashim, M. NN. Haron,” Desiggn of Digital Dispplay System for IISFET

[5] Microchip technolog Inc, “High-Speed CAN Transceiver,” MCP2561/2, Device Document DS25167B, 2013

[6] Singh, S.A.J., Raviram, P., ShanthoshKumar, K., “Embedded Based Green House Monitoring System Using PIC Microcontroller’’ IEEE ICGCCEE, 2014, pp.1-4.

[7] U. Hashim, M. N. Haron,” Design of Digital Display System for ISFET pH Sensor by Using PIC Microcontroller Unit (MCU)”IEEE C.P.,pp.148-152,2009.

[8] National Semiconductor, “LM35 Precision Centigrade Temperature Sensors Data sheet”, National Semiconductor Corporation, November2000. [9] Microchip Technology Inc, “28/40/44-Pin, Low-Power, High Performance Microcontrollers with XLP Technology,” PIC18(L)F2X/4XK22 Data Sheet, ISBN: 9781620763131, USA 2012.

[10] Microchip Technology Inc, “Understanding Microchip’s CAN Module Bit Timing,” Document AN754, DS00754A, 2001.

37

Thank you

top related