Upload
abhimanyu-sanghi
View
2.047
Download
6
Tags:
Embed Size (px)
Citation preview
Abhimanyu Sanghi (02/EC/05)
Ankur Verma (15/EC/05)
Ashish Bhandari (20/EC/05)
Kshitij Gupta (41/EC/05)
Mentors
Prof. Subrat Kar
Astt. Prof. S.P. Singh
A quick summaryA quick summary
This presentation discusses a Distributed Climate Control System (DCCS).
Motivation behind DCCSMotivation behind DCCS Climate encompasses:
Temperature Humidity
Atmospheric Gases e.g. CO2, CO …..
Ideal climatic conditions and parameter values vary. Climate control essential for:
Manufacturing, processing, packaging, transport or storage of various sensitive goods
To prevent damage, deterioration or contamination of sensitive goods.
Thus, we propose to devise a system to control climate parameters.
What is Distributed Control Climate What is Distributed Control Climate System (DCCS) ?System (DCCS) ?
Slave Nodes measure parameters
Master logs and responds to changes
System Specifications
Cost of each node < Rs. 500. Choice of microcontrollers-> ARM / MSP430 /
AVR / PIC. Interfacing with temperature (LM35), humidity and
carbon dioxide sensors. Interfacing with fan, mister and memory card–
requires Serial Peripheral Interface and Analog to Digital Converter Channels.
Choice of communication networks CAN / RF / RS485 / RS232.
Choice of Components
1. eZ430-RF2500 Development board.2. MSP430F169.3. AT90CAN32.4. ATmega16.
ATmega16 is selected which meets system requirements
Selection of Microcontroller:
Choice of Components (Contd.)
1. RS232.2. RS485.3. Zigbee.4. CAN.
CAN Network is selected for our system.
Selection of Communication Network:
Choice of Components (Contd.)
1. CAN CONTROLLER :MCP2515, Microchip Technology2. CAN TRANSCEIVER :MCP2551, Microchip Technology3. TEMP. SENSOR :LM354. IC-MAX232, General Purpose Board, Resistors, Capacitors,
Switches, LEDs etc.
Total Expenditure per node ~ Rs. 500Total Expenditure per node ~ Rs. 500
Selection of Other Components:
Block Diagram of SystemBlock Diagram of System
SPI CAN SPI SPI
Working of SystemWorking of System
SPI CAN SPI
Working of SystemWorking of System
Interfacing Temperature Sensor Interfacing Temperature Sensor with ATMega16with ATMega16
BLOCK DIAGRAM
Interfacing Temperature Sensor Interfacing Temperature Sensor with ATMega16with ATMega16
LM35 temperature sensor is used in the initial prototype of the system.
The figures have been made using Eagle
Interfacing Temperature Sensor Interfacing Temperature Sensor with ATMega16with ATMega16
Features of LM35
Output Voltage is proportional to Celsius Temperature.Outputs 10mv for each degree centigrade temperature.Requires no external calibration.Rated for full -55° to +150°C range.
Operates from 4 to 30 volts.
Suitable for remote applications. LM 35
Interfacing Temperature Sensor Interfacing Temperature Sensor with ATMega16with ATMega16
ADC Registers
ADC Multiplexer Selection Register – ADMUX : For selecting the reference voltage and the input channel.
Interfacing Temperature Sensor Interfacing Temperature Sensor with ATMega16with ATMega16
ADC Registers Cond….
ADC Control and Status Register A – ADCSRA : It has the status of ADC and is also use for controlling it.
The ADC Data Register – ADCL and ADCH : The final result of conversion is here.
Interfacing Temperature Sensor Interfacing Temperature Sensor with ATMega16with ATMega16
USART Registers
UDR - USART Data Register : When we read it you will get the data stored in receive buffer and when we write data it goes into the transmitters buffer.
AVR USART registers
Interfacing Temperature Sensor Interfacing Temperature Sensor with ATMega16with ATMega16
USART Registers Contd.
UCSRA - USART Control and status Register A : It is used to configure the USART and it also stores some status about the USART. There are two more of this kind the UCSRB and UCSRC. UBRRH and UBRRH : This is the USART Baud rate register, it is 16BIT wide so UBRRH is the High Byte and UBRRL is Low byte.
Interfacing Temperature Sensor Interfacing Temperature Sensor with ATMega16with ATMega16
PORT settings of Hyper terminal
Interfacing Temperature Sensor Interfacing Temperature Sensor with ATMega16with ATMega16
The result was displayed on Hyper terminal on the computer and verified.
Introduction to Controller Area Network (CAN) Bus Standard allows
microcontrollers and devices to communicate with each other without a host computer.
Message based protocol Bit rates up to 1 Mbps
Introduction to CAN (contd.)
Data transmitted through dominant bits (0) and recessive bits (1).
All devices read bus value while transmitting.
Protocol implements Physical Layer and Data Link Layer of OSI Model.
Requirements of a Node for CAN Communication
Host processor ATmega16 CAN Controller
MCP2515 CAN
Transceiver MCP2551
The Master Node - Schematic
The Slave Node - Schematic
Device Driver for CAN ControllerDevice Driver for CAN ControllerFunctions to read from and write to the controller
Thus, SPI has:Thus, SPI has:
4 interface pinsMOSI, MISO,SCK, SS or CS
3 registersSPDR data, SPSR status , SPSC control
Writing SPDR -> Initiates Data Transfer
All data movement is coordinated by SCK.
SPI Data Register (SPDR)
Thus, SPI has:Thus, SPI has:
4 interface pinsMOSI, MISO,SCK, SS or CS
3 registersSPCR control , SPSR status , SPDR data
Interrupt flagSet when serial transfer is complete
SPI Status Register (SPSR)
Thus, SPI has:Thus, SPI has:
4 interface pinsMOSI, MISO,SCK, SS or CS
3 registersSPCR control , SPSR status , SPDR data
Interrupt flagif set, interrupt occurs!
SPI Control Register (SPCR)
SPI enableif set, SPI interface enabled
Clock Polarity and RateIdle mode SCK and Rate
Code Snippets for CAN Device Code Snippets for CAN Device DriverDriver
Configuration of CAN ControllerConfiguration of CAN Controller
Resets the CAN Controller
How to transmit data bytes
Next Steps….Next Steps….
1.Communication between Master and Slave Node
2.Interfacing of Humidity and Carbon Dioxide Sensors
3.Implementation of Discrete PID Controller
4.Interfacing of Memory Card
SummarySummary Average cost of slave node is ~ Rs. 500. Interfacing temp. sensor with
microcontroller. Design and Development of Test board that
includes a master node and a slave node, interfaced with CAN controllers and transceivers.
Implementation of device driver for the CAN Controller
We propose the use of this system as either a stand-alone system in the industry or workplace or as an integrated device with climate modifying appliances such as an air conditioner or a heater.
ReferencesReferences
For more information refer:
[1] Application Note: AVR 221: Discrete PID Controller for 8-bit AVR microcontrollers
[2] Development Tool User’s Guide for eZ430-RF2500, TI[3] Datasheet: MSP430X16X, Texas Instruments.[4] Datasheet summary: AT90CAN32, Atmel Corporation.[5] Datasheet: ATmega16, Atmel Corporation.[6] David Porter, Steve Gilson, “Data Acquisition System With Controller Area
Network and SD Card”, Cornell Univ.