Btp Midsem


Published on

Published in: Business, Technology
1 Comment
  • Hey ! have u completed this project??coz i m working on the similar project as my final year project and i m running short of time .i need the avr programming of this project ..Can u please send me (whatever u can regarding this project) on :
    I will be truly greatful to u
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Btp Midsem

  1. 1. <ul><li>Abhimanyu Sanghi (02/EC/05) </li></ul><ul><li>Ankur Verma (15/EC/05) </li></ul><ul><li>Ashish Bhandari (20/EC/05) </li></ul><ul><li>Kshitij Gupta (41/EC/05) </li></ul>Mentors Prof. Subrat Kar Astt. Prof. S.P. Singh
  2. 2. A quick summary <ul><li>This presentation discusses a Distributed Climate Control System (DCCS). </li></ul>
  3. 4. Motivation behind DCCS <ul><li>Climate encompasses: </li></ul><ul><ul><li>Temperature </li></ul></ul><ul><ul><li>Humidity </li></ul></ul><ul><ul><li>Atmospheric Gases e.g. CO 2, CO ….. </li></ul></ul><ul><li>Ideal climatic conditions and parameter values vary. </li></ul><ul><li>Climate control essential for: </li></ul><ul><ul><li>Manufacturing, processing, packaging, transport or storage of various sensitive goods </li></ul></ul><ul><ul><li>To prevent damage, deterioration or contamination of sensitive goods. </li></ul></ul><ul><li>Thus, we propose to devise a system to control climate parameters. </li></ul>
  4. 5. What is Distributed Control Climate System (DCCS) ? <ul><li>Slave Nodes measure </li></ul><ul><li>parameters </li></ul><ul><li>Master logs and responds to changes </li></ul>
  5. 7. System Specifications <ul><li>Cost of each node < Rs. 500. </li></ul><ul><li>Choice of microcontrollers-> ARM / MSP430 / AVR / PIC. </li></ul><ul><li>Interfacing with temperature (LM35), humidity and carbon dioxide sensors. </li></ul><ul><li>Interfacing with fan, mister and memory card– requires Serial Peripheral Interface and Analog to Digital Converter Channels. </li></ul><ul><li>Choice of communication networks </li></ul><ul><li>CAN / RF / RS485 / RS232. </li></ul>
  6. 8. Choice of Components <ul><li>eZ430-RF2500 Development board. </li></ul><ul><li>MSP430F169. </li></ul><ul><li>AT90CAN32. </li></ul><ul><li>ATmega16. </li></ul><ul><li>ATmega16 is selected which meets system requirements </li></ul>Selection of Microcontroller:
  7. 9. Choice of Components (Contd.) <ul><li>RS232. </li></ul><ul><li>RS485. </li></ul><ul><li>Zigbee. </li></ul><ul><li>CAN. </li></ul><ul><li>CAN Network is selected for our system. </li></ul>Selection of Communication Network:
  8. 10. Choice of Components (Contd.) <ul><li>CAN CONTROLLER :MCP2515, Microchip Technology </li></ul><ul><li>CAN TRANSCEIVER :MCP2551, Microchip Technology </li></ul><ul><li>TEMP. SENSOR :LM35 </li></ul><ul><li>IC-MAX232, General Purpose Board, Resistors, Capacitors, Switches, LEDs etc . </li></ul><ul><li>Total Expenditure per node ~ Rs. 500 </li></ul>Selection of Other Components:
  9. 11. Block Diagram of System
  10. 12. SPI CAN SPI SPI Working of System
  11. 13. SPI CAN SPI Working of System
  12. 15. Interfacing Temperature Sensor with ATMega16 <ul><li>BLOCK DIAGRAM </li></ul>
  13. 16. Interfacing Temperature Sensor with ATMega16 <ul><li>LM35 temperature sensor is used in the initial prototype of the system. </li></ul>The figures have been made using Eagle
  14. 17. Interfacing Temperature Sensor with ATMega16 <ul><li>Features of LM35 </li></ul><ul><li>Output Voltage is proportional to Celsius Temperature. </li></ul><ul><li>Outputs 10mv for each degree centigrade temperature. </li></ul><ul><li>Requires no external calibration. </li></ul><ul><li>Rated for full -55° to +150°C range. </li></ul><ul><li>Operates from 4 to 30 volts. </li></ul><ul><li>Suitable for remote applications. </li></ul>LM 35
  15. 18. Interfacing Temperature Sensor with ATMega16 <ul><li>ADC Registers </li></ul><ul><li>ADC Multiplexer Selection Register – ADMUX : For selecting the reference voltage and the input channel. </li></ul>
  16. 19. Interfacing Temperature Sensor with ATMega16 ADC Registers Cond…. <ul><li>ADC Control and Status Register A – ADCSRA : It has the status of ADC and is also use for controlling it. </li></ul><ul><ul><li>The ADC Data Register – ADCL and ADCH : The final result of conversion is here. </li></ul></ul>
  17. 20. Interfacing Temperature Sensor with ATMega16 <ul><li>USART Registers </li></ul><ul><li>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. </li></ul>AVR USART registers
  18. 21. Interfacing Temperature Sensor with ATMega16 <ul><li>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 . </li></ul><ul><li>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. </li></ul>USART Registers Contd.
  19. 22. Interfacing Temperature Sensor with ATMega16 <ul><li>PORT settings of Hyper terminal </li></ul>
  20. 23. Interfacing Temperature Sensor with ATMega16 <ul><li>The result was displayed on Hyper terminal on the computer and verified . </li></ul>
  21. 25. Introduction to Controller Area Network (CAN) <ul><li>Bus Standard allows microcontrollers and devices to communicate with each other without a host computer. </li></ul><ul><li>Message based protocol </li></ul><ul><li>Bit rates up to 1 Mbps </li></ul>
  22. 26. Introduction to CAN (contd.) <ul><li>Data transmitted through dominant bits (0) and recessive bits (1). </li></ul><ul><li>All devices read bus value while transmitting. </li></ul><ul><li>Protocol implements Physical Layer and Data Link Layer of OSI Model. </li></ul>
  23. 27. Requirements of a Node for CAN Communication <ul><li>Host processor </li></ul><ul><li>ATmega16 </li></ul><ul><li>CAN Controller </li></ul><ul><ul><li>MCP2515 </li></ul></ul><ul><li>CAN Transceiver </li></ul><ul><li>MCP2551 </li></ul>
  24. 28. The Master Node - Schematic
  25. 29. The Slave Node - Schematic
  26. 31. Device Driver for CAN Controller <ul><li>Functions to read from and write to the controller </li></ul>
  27. 32. Thus, SPI has: <ul><li>4 interface pins </li></ul><ul><li>MOSI, MISO,SCK, SS or CS </li></ul>3 registers SPDR data, SPSR status , SPSC control Writing SPDR -> Initiates Data Transfer All data movement is coordinated by SCK. SPI Data Register (SPDR)
  28. 33. Thus, SPI has: <ul><li>4 interface pins </li></ul><ul><li>MOSI, MISO,SCK, SS or CS </li></ul>3 registers SPCR control , SPSR status , SPDR data Interrupt flag Set when serial transfer is complete SPI Status Register (SPSR)
  29. 34. Thus, SPI has: <ul><li>4 interface pins </li></ul><ul><li>MOSI, MISO,SCK, SS or CS </li></ul>3 registers SPCR control , SPSR status , SPDR data Interrupt flag if set, interrupt occurs! SPI Control Register (SPCR) SPI enable if set, SPI interface enabled Clock Polarity and Rate Idle mode SCK and Rate
  30. 35. Code Snippets for CAN Device Driver
  31. 36. Configuration of CAN Controller <ul><li>Resets the CAN Controller </li></ul><ul><li>How to transmit data bytes </li></ul>
  32. 38. Next Steps…. <ul><li>Communication between Master and Slave Node </li></ul><ul><li>Interfacing of Humidity and Carbon Dioxide Sensors </li></ul><ul><li>Implementation of Discrete PID Controller </li></ul><ul><li>Interfacing of Memory Card </li></ul>
  33. 40. Summary <ul><li>Average cost of slave node is ~ Rs. 500. </li></ul><ul><li>Interfacing temp. sensor with microcontroller. </li></ul><ul><li>Design and Development of Test board that includes a master node and a slave node, interfaced with CAN controllers and transceivers. </li></ul><ul><li>Implementation of device driver for the CAN Controller </li></ul><ul><li>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. </li></ul>
  34. 41. References <ul><li>For more information refer: </li></ul><ul><ul><li>[1] Application Note: AVR 221: Discrete PID Controller for 8-bit AVR microcontrollers </li></ul></ul><ul><ul><li>[2] Development Tool User’s Guide for eZ430-RF2500, TI </li></ul></ul><ul><ul><li>[3] Datasheet: MSP430X16X, Texas Instruments. </li></ul></ul><ul><ul><li>[4] Datasheet summary: AT90CAN32, Atmel Corporation. </li></ul></ul><ul><ul><li>[5] Datasheet: ATmega16, Atmel Corporation. </li></ul></ul><ul><ul><li>[6] David Porter, Steve Gilson, “ Data Acquisition System With Controller Area Network and SD Card ”, Cornell Univ. </li></ul></ul>