![Page 1: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/1.jpg)
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
![Page 2: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/2.jpg)
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
![Page 3: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/3.jpg)
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
![Page 4: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/4.jpg)
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
![Page 5: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/5.jpg)
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
![Page 6: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/6.jpg)
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
![Page 7: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/7.jpg)
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
![Page 8: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/8.jpg)
8
CAN Bus Introduction
CAN Applications
AutomotiveMilitary vehicles
Industrial machinery
Medical Systems
Agricultural machinery
Marine control and navigation
Elevator control systems
![Page 9: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/9.jpg)
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
![Page 10: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/10.jpg)
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
![Page 11: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/11.jpg)
11
CAN Bus Introduction
CAN Characteristics – Bit timing
Local timing logic re-synchronizes with bus on each recessive to dominant transition
![Page 12: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/12.jpg)
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
![Page 13: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/13.jpg)
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
![Page 14: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/14.jpg)
14
CAN Bus Introduction
CAN Characteristics Bit fieldStandard CAN
Standard CAN: 11-Bit Identifier
Extended CAN
Extended CAN: 29-Bit Identifier
![Page 15: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/15.jpg)
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
![Page 16: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/16.jpg)
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
![Page 17: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/17.jpg)
17
Peripheral Interface Controller (PIC)
Benefits of the PIC Microcontroller
Faster speed
Lower cost
Easier and quicker development
![Page 18: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/18.jpg)
18
Program language
ASSEMBLY language
C language
BASIC language
![Page 19: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/19.jpg)
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
![Page 20: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/20.jpg)
20
PIC programming overview
Write the code
Compile the code
Upload the code into a microcontroller
![Page 21: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/21.jpg)
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
![Page 22: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/22.jpg)
22
1. PICF18458
PIC18F458 PIN diagram
![Page 23: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/23.jpg)
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
![Page 24: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/24.jpg)
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
![Page 25: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/25.jpg)
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
![Page 26: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/26.jpg)
26
Display Node Schematic Diagram
![Page 27: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/27.jpg)
27
Flow Chart For CAN Based Display Node
![Page 28: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/28.jpg)
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
![Page 29: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/29.jpg)
29
RBC, Platelet and Plasma Node schematic diagram
![Page 30: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/30.jpg)
30
Flow Chart for CAN Based RBC, Platelet and Plasma Node
![Page 31: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/31.jpg)
31
Display node
Platelet node
RBC node
Plasma node
![Page 32: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/32.jpg)
32
![Page 33: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/33.jpg)
33
![Page 34: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/34.jpg)
34
Plasma node RBC node Platelet node
Display node
![Page 35: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/35.jpg)
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
![Page 36: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/36.jpg)
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.
![Page 37: Gaziantep University Department of Electrical and Electronics Engineering 1 Development of Monitoring Blood Bank Center Based PIC Microcontroller Using](https://reader035.vdocument.in/reader035/viewer/2022062322/5697c00d1a28abf838cc9994/html5/thumbnails/37.jpg)
37
Thank you