Calendar Digital-RAS

42
document.doc TE MINI PROJECT DIGITAL CALENDER WITH TEMPERATURE BY: ROHIT JADHAV (T2-25) AVADHOOT KUMTHEKAR (T3-35) SUJAY PUJARI (T3-48) 1

description

project done by rohit, sujay and avadhootits for students only.enjoy!done under avr-atmega32.

Transcript of Calendar Digital-RAS

Page 1: Calendar Digital-RAS

document.doc

TE MINI PROJECT

DIGITAL CALENDER WITH TEMPERATURE

BY:ROHIT JADHAV (T2-25)AVADHOOT KUMTHEKAR (T3-35)SUJAY PUJARI (T3-48)

PVG’s COLLEGE OF ENGINEERING& TECHNOLOGY

1

Page 2: Calendar Digital-RAS

document.doc

CERTIFICATE

This is to certify that the Mini Project entitled DIGITAL CALENDER WITH TEMPERATUREHas been completed in Academic year 2007-2008 by 1. ROHIT JADHAV (T2-25) 2. AVADHOOT KUMTHEKAR

3. SUJAY PUJARI (T3-48)

In fulfillment of Third Year Engineering in the E&TC Engineering as prescribed by the University of Pune, Pune.

DATE: ___________

___________ ________________Project guide Head of Department

2

Page 3: Calendar Digital-RAS

document.doc

INDEX OF CONTENTS

SR NO.

TITLE PAGE NO

1 ACKNOWLEDGEMENT

2 INTRODUCTION

3 SPECIFICATIONS

4 BLOCK DIAGRAM

5 CIRCUIT DIAGRAM AND WORKING

6 ALGORITHM

7 FLOWCHART

8 CODE

9 PCB LAYOUT

10 DEBUGGING AND TESTING

11 MECHANICAL DESIGN

12 FUTURE DEVELOPMENTS

13 LIST AND BILL OF COMPONENTS

3

Page 4: Calendar Digital-RAS

document.doc

ACKNOWLEDGEMENT

We wish to express our profound thanks to Prof Mr. R.W. Pattarkine (HOD of Electronics and Telecommunication dept) for giving us this opportunity to present our “DIGITAL CALENDER WITH TEMPERATURE”.

Project initiative was from and by Prof. C.B. Joshi.Whole concept of project and implementation of AVR controller was all due to him.

We would like to express our sincere gratitude to Prof Mr. R.G. Kaduskar for his able guidance and unfailing support. Without his constructive criticism and co-operation, we would have never overcome the difficulties and hardships faced during the course of the project work.

To our parents who have been the constant source of inspiration for us.Last but not the least, we are grateful to all those who have extended their co-operation directly or indirectly during the implementation of this project.

-ROHIT JADHAV -AVADHOOT KUMTHEKAR

-SUJAY PUJARI

4

Page 5: Calendar Digital-RAS

document.doc

INTRODUCTION

Digital calendar with temperature is the device that displays current time, date, day and current temperature in degree Celsius. Every one can use it in day to day life. It is ATMEGA 32 (AVR Family) controller based devise. It uses LM 35 as a temperature sensor, DS1307 as R.T.C. and JHD162Aas a LCD module.

SPECIFICATIONS

CIRCUIT SPECIFICATIONS

Sensor module: No of sensors: 1 Type of sensors: Temperature I/P voltage: 5V O/P of sensor module: 0V or 5V

Controller: Atmega32

Total current requirement: 500mA

Display:

JHD162A

16x2 line LCD

MECHANICAL SPECIFICATIONS PCB size : 17 x 11 cm Controller board 1 x 1 cm Sensor board 5 x 3 cm RTC board

5

Page 6: Calendar Digital-RAS

document.doc

ELECTRICAL SPECIFICATIONS

Input Supply : 9V DC Input current: 500 mA

BLOCK DIAGRAM

6

SensorsController

Display unit

R.T.C.

Page 7: Calendar Digital-RAS

document.doc

CIRCUIT DIAGRAM

Controller Board

7

Page 8: Calendar Digital-RAS

document.doc

CIRCUIT WORKING

SENSOR MODULE ( Temp Reading) :

Connection: pin2 i.e. o/p of LM35 to portA.0

The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature. The LM35 is rated to operate over a -55 to +150C temperature.LM35C, LM35CA, and LM35D are also available in the plastic TO-92 transistor package.

Linear a 10.0 mV/˚C scale factorFor inbuilt ADC section of controller; we set

Reference voltage=2.56v. 8-bit resolution mode For ADC.

This mean, step voltage=2.56/ (2^8) =2.56/256=10mV

As and when temp changes by a single ˚c (degree).o/p of LM35 wil differ (alter) by 10mV.which results in 1 bit change in digital representation of o/p of ADC, which come out in ADCH register of controller.

ALGORITHM

1. Initialize ADC(a) RFS1 and RFS0 are for Internal Reference voltage of

2.56V AND 8 BIT CONVERSION

8

Page 9: Calendar Digital-RAS

document.doc

ADLAR bit set to get o/p in ADCH register Select A0 channel

(b)1MHz/32 = 31 kHz & Normal conversion without interrupt

2. Read ADC (a) Start conversion: set bit ADSC from ADCSRA.(b)

Bit 4 – ADIF: ADC Interrupt FlagThis bit is set when an ADC conversion completes and the Data Registers are updated. The ADC Conversion Complete Interrupt is executed if the ADIE bit and the I-bit in SREG are set. ADIF is cleared by hardware when executing the corresponding interrupt handling vector. Alternatively, ADIF is cleared by writing a logical one to the flag. Wait for that interrupt.

3. Display temp on LCDThe byte stored in ADCH is nothing but HEX format of temperature .As 0 ˚C corresponds to 0in ADCH and any 1˚C change in temperature will change content of ADCH

9

Page 10: Calendar Digital-RAS

document.doc

by one. Therefore the situation is like ADCH= (TEMP) hex.(a)Convert hex to 3 digits BCD no.(b) And again each BCD no to ASCII forms.(c) Then send each no. one by one to data ports of using

appropriate function.

10

Page 11: Calendar Digital-RAS

document.doc

RTC (ti me ,date ,day read) Connections:

For ATMEGA32 (master):

TWI Control Register –TWCRThe TWCR is used to control the operation of the TWI. It is used to enable the TWI, to initiate amaster access by applying a START condition to the bus, to generate a receiver acknowledge,to generate a stop condition, and to control halting of the bus while the data to be written to thebus are written to the TWDR.

• Bit 7 – TWINT: TWI Interrupt FlagThe TWINT Flag must be cleared by software by writing a logic one to it. Note that this flag is not automatically cleared by hardware when executing the interrupt routine. Also note that clearing this flag starts the operation of the TWI, so all accesses to the TWI Address Register (TWAR), TWI Status Register (TWSR), and TWI Data Register (TWDR) must be complete before clearing this flag.• Bit 2 – TWEN: TWI Enable BitThe TWEN bit enables TWI operation and activates the TWI interface. When TWEN is written to one, the TWI takes control over the I/O pins connected to the SCL and SDA pins, enabling the slew-rate limiters and spike filters.

A STOP condition is generated by writing the following value to TWCR:

11

Page 12: Calendar Digital-RAS

document.doc

For DS1307(slave):

For RTC part DS1307, as ‘TWI base RTC (I2C protocol) ‘is used.

12

Page 13: Calendar Digital-RAS

document.doc

ALGORITHM

NOTE: Controller is master always.For RTC operation there are two mode.

1. Controller transmitting mode1 2. Controller receiving mode2

Product requires 2 source codes 1. Before user access(administrator code) 2. For user dedicated (client code)

There is some common part of initialization in bothAlgo –common)

a. set global interrupt flag so interrupts can be usedb. set hardware i2c to 28khz rate operation(ref: doc2564)c. set internal pull-ups on SDA and SCL pins

Apart from above, Administrator code uses algorithm to initialize RTC timekeeper register. ( i.e. set mode) & to test read it.->ALGO-a) .Client code uses algorithm to read RTC timekeeper register. ( i.e. set mode) ALGO-b)

ALGO-a)a. Initialize register address;b. initialize Register data;c. write(); //mode 1 onlyd. read(); //mode 1 & 2 e. go to d.

c) write() 1. send START condition2. wait until TWINT is set by hardware3. check TWSR with 0x08(starts successfully)4. send SLAVE address .TWDR=0xD05. wait until TWINT is set by hardware6. check TWSR with 0x18 (device Acknowledge

successfully)7. Send actual register address.TWDR=registeradd.8. wait until TWINT is set by hardware9. check TWSR with 0x28 ( data Acknowledge

successfully)13

Page 14: Calendar Digital-RAS

document.doc

10. send actual register data.TWDR = registerdata11. wait until TWINT is set by hardware12. check TWSR with 0x28 ( data Acknowledge

successfully)13. send STOP condition14. return

d) read ()mode1

1. Send STOP condition.2. send START condition3. wait until TWINT is set by hardware4. check START complete5. Send Slave address6. loop until TWINT is set7. check SLAVR ADDRESS complete8. Send DS1307 RAM address. TWDR =

registeradd 9. loop until TWINT is set10. check Data Send complete

mode211. SECOND START CONDITION to go into

writing mode12. loop until TWINT is set13. check RESTART complete14. Send Address and write bit15. loop until TWINT is set16. check receive complete17. loop until TWINT is set18. TWDR will contain actual content of

desired register.19. return

ALGO-b)a. Int k=read(int regaddress)b. K will contain actual reading

14

Page 15: Calendar Digital-RAS

document.doc

a) Int read (int regaddress)mode1

1. Send STOP condition.2. send START condition3. wait until TWINT is set by hardware4. check START complete5. Send Slave address6. loop until TWINT is set7. check SLAVR ADDRESS complete8. Send DS1307 RAM address. TWDR =

regaddress. 9. loop until TWINT is set10. check Data Send complete

mode211. SECOND START CONDITION to go into

writing mode12. loop until TWINT is set13. check RESTART complete14. Send Address and write bit15. loop until TWINT is set16. check receive complete17. loop until TWINT is set18. TWDR will contain actual content of

desired register.19. return TWDR

LCD MODULE: LCD operates in 8 bit and 2*16 character mode.Port D is taken as data port&Port C.7=RS (register select)Port C.6=R/wPort C.5=ale (address latch enable)

15

Page 16: Calendar Digital-RAS

document.doc

CODE: Codes are classified in 2 part

1. User dedicateda) Client code

2. Debugging purposea) Administrator code for RTCb) LCD Test

1a)client code

#include "mega32_ds1307.c"int main(void){ char temp[]="Temp=";

char arrr[7][4]={"SUN","MON","TUE","WED","THU","FRI","SAT"};int i;

init();Init_Ports();Init_Lcd();Init_ADC();

Select_InstructionRegister;Write_Lcd;Data_Lcd(0xC8);Set_Enable;delay2(ka);Clear_Enable;delay2(ka);

Lcd_Send('^');Lcd_Send('c');

Select_InstructionRegister;Write_Lcd;Data_Lcd(0xC0);Set_Enable;delay2(ka);Clear_Enable;delay2(ka);

for(i=0;i<5;i++){

Lcd_Send(temp[i]);

16

Page 17: Calendar Digital-RAS

document.doc}

//call the read function in a loop to update second's value to the screenfor(;;){

Select_InstructionRegister;Write_Lcd;Data_Lcd(0x80);Set_Enable;delay2(ka);Clear_Enable;delay2(ka);

Ouptut_Display(read2(2));Lcd_Send(':');Ouptut_Display(read2(1));

Select_InstructionRegister;Write_Lcd;Data_Lcd(0x87);Set_Enable;delay2(ka);Clear_Enable;delay2(ka);

Ouptut_Display(read2(4));Lcd_Send('/');Ouptut_Display(read2(5));Lcd_Send('/');Ouptut_Display(read2(6));

Select_InstructionRegister;Write_Lcd;Data_Lcd(0xc5);Set_Enable;delay2(ka);Clear_Enable;delay2(ka);Ouptut_Display2(Read_ADC());

Select_InstructionRegister;Write_Lcd;Data_Lcd(0xcB);Set_Enable;delay2(ka);Clear_Enable;delay2(ka);Lcd_Send(arrr[read2(3)-1][0]);Lcd_Send(arrr[read2(3)-1][1]);

17

Page 18: Calendar Digital-RAS

document.docLcd_Send(arrr[read2(3)-1][2]);

}return 0;

}

2a)Administrator code:#include "mega32_ds1307.c"int main(void){

init();Init_Ports();Init_Lcd(); registeradd=0x3; registerdata=0x5; write();for(;;)

read();return 0;

}

3)externally included

************************mega32_ds1307.C****************************#include "global.h" // include our global settings#include <avr/io.h>#include "MYLCD.c"#include "ADC.c"#include "C:/Program Files/avrlib/timer.c" // include timer function library (timing, PWM, etc)//masks for different conditions on the TWI bus#define START 0x08#define RESTART 0x10 #define MT_SLA_ACK 0x18#define MT_SLA_NOACK 0x20 #define MT_DATA_ACK 0x28 #define MT_DATA_NOACK 0x30#define MT_SLA_DATA_LOST 0x38 //Master Receive conditions#define MR_SLA_NOACK_LOST 0x38 #define MR_SLA_ACK 0x40#define MR_SLA_NOACK 0x48#define MR_DATA_ACK 0x50#define MR_DATA_NOACK 0x58

#define TARGET_ADDR 0xD0 //Hardwired address of DS1307 (see datasheet)#define WRITE_FLAG 0x01 //bitmask to OR to TARGET_ADDR when attempting to write to the DS1307

//prototypes of diferent functions to organise the code a littlevoid init(void);

18

Page 19: Calendar Digital-RAS

document.docvoid i2cInit(void);int read(int);

//variable to store the value returned from the DS1307

void init(void){

timerInit(); //defined in timer.hi2cInit(); //my personal function, defined in this file (see below)return;

}

void i2cInit(void){

set global interrupt flag so interrupts can be usedsei();//set hardware i2c to 100khz rate operationTWBR = 10; //see appnote 315, page 5//set internal pullups on SDA ans SCL pinsPORTC = 0x03; //see Mega32 datasheet, page 63return;

}

int read2(int reg){

//send STOPTWCR = (1<<TWINT)|(1<<TWEN)|(1<<TWSTO); //Tell TWCR

(control register) to send STOP CONDITION

timerPause(200);//send START

TWCR = (1<<TWINT)|(1<<TWSTA)|(1<<TWEN);

//loop until TWINT is setwhile(!((TWCR&0x80)==0x80)){}

//check START complete//;SLAVE//Send Slave address

TWDR = TARGET_ADDR;TWCR = (1<<TWINT)|(1<<TWEN);

//loop until TWINT is setwhile(!((TWCR&0x80)==0x80)){}

19

Page 20: Calendar Digital-RAS

document.doc//check SLAVR ADDRESS complete//;DATA1

//Send DS1307 RAM address 0x00 ($00)TWDR = reg;TWCR = (1<<TWINT)|(1<<TWEN);

//loop until TWINT is setwhile(!((TWCR&0x80)==0x80)){}

//SECOND START CONDITION to go into writing modeTWCR = (1<<TWINT)|(1<<TWSTA)|(1<<TWEN);

//loop until TWINT is setwhile(!((TWCR&0x80)==0x80)){}

//check Data Send complete

//Send Address and write bitTWDR = TARGET_ADDR | WRITE_FLAG;TWCR = (1<<TWINT)|(1<<TWEN);

//loop until TWINT is setwhile(!((TWCR&0x80)==0x80)){}timerPause(300);

//check receive complete//;DATA

TWCR = (1<<TWINT)|(1<<TWEN);//loop until TWINT is set

while(!((TWCR&0x80)==0x80)){}

//NACKTWCR = (1<<TWEA)|(1<<TWEN);

//STOPTWCR = (1<<TWEA)|(1<<TWEN)|(TWSTO);

return TWDR;}

void write(void){

//send START conditionTWCR = (1<<TWINT)|(1<<TWSTA)|(1<<TWEN);

//wait until TWINT is set by hardwarewhile(!((TWCR&0x80)==0x80)){}

20

Page 21: Calendar Digital-RAS

document.doc//mask TWSR with & 11111000 and compare result against START mask (see top

of this file)//see page 176 of the ATMEGA32 datasheet for explaination of TWSR register

//else go on normally without msg

//send SLAVE addressTWDR = TARGET_ADDR; //0xD0TWCR = (1<<TWINT)|(1<<TWEN); //Change the TWCR

register so TWI hardware starts (page 175 Mega32 datasheet)//wait until TWINT is set by hardware

while(!((TWCR&0x80)==0x80)){}

//Check slave address complete//;DATA1//send address

TWDR = registeradd; //load TWDR with DS1307 RAM address $00TWCR = (1<<TWINT)|(1<<TWEN); //Tell TWCR (control register) to

start sending

//wait until TWINT is set by hardwarewhile(!((TWCR&0x80)==0x80)){}

//check complete//;DATA2//send data (set seconds to zero (00))

TWDR = registerdata; //load TWDR with DS1307 RAM address $00TWCR = (1<<TWINT)|(1<<TWEN); //Tell TWCR (control register) to

start sending

//wait until TWINT is set by hardwarewhile(!((TWCR&0x80)==0x80)){}

//check complete//send STOP

TWCR = (1<<TWINT)|(1<<TWEN)|(1<<TWSTO);//Tell TWCR (control register) to send STOP CONDITION

return;}

void read(void){

//send STOP

21

Page 22: Calendar Digital-RAS

document.docTWCR = (1<<TWINT)|(1<<TWEN)|(1<<TWSTO); //Tell TWCR

(control register) to send STOP CONDITION

timerPause(200);

//send STARTTWCR = (1<<TWINT)|(1<<TWSTA)|(1<<TWEN);

//loop until TWINT is setwhile(!((TWCR&0x80)==0x80)){}

//check START complete//;SLAVE//Send Slave address

TWDR = TARGET_ADDR;TWCR = (1<<TWINT)|(1<<TWEN);

//loop until TWINT is setwhile(!((TWCR&0x80)==0x80)){}

//check SLAVR ADDRESS complete//;DATA1

//Send DS1307 RAM address 0x00 ($00)TWDR = registeradd;TWCR = (1<<TWINT)|(1<<TWEN);

//loop until TWINT is setwhile(!((TWCR&0x80)==0x80)){}

//check Data Send complete//SECOND START CONDITION to go into writing mode

TWCR = (1<<TWINT)|(1<<TWSTA)|(1<<TWEN);//loop until TWINT is set

while(!((TWCR&0x80)==0x80)){}

//check Data Send complete//Send Address and write bit

TWDR = TARGET_ADDR | WRITE_FLAG;TWCR = (1<<TWINT)|(1<<TWEN);

//loop until TWINT is setwhile(!((TWCR&0x80)==0x80)){}timerPause(300);

//check receive complete//;DATA

TWCR = (1<<TWINT)|(1<<TWEN);//loop until TWINT is set

22

Page 23: Calendar Digital-RAS

document.docwhile(!((TWCR&0x80)==0x80)){}Ouptut_Display(TWDR);

//NACKTWCR = (1<<TWEA)|(1<<TWEN);

//STOPTWCR = (1<<TWEA)|(1<<TWEN)|(TWSTO);

return;}

********************************ADC.C**************************

void Init_ADC(void){

ADMUX|=(_BV(ADLAR) | _BV(REFS1)| _BV(REFS0)) ;// RFS1 and RFS0 are for Internal Reference voltage of 2.56V AND 8 BIT

CONVERSIONADMUX&=~(_BV(MUX0)|_BV(MUX1)|_BV(MUX2)|_BV(MUX3)|

_BV(MUX4)); //SELECTING CHANNEL0 ADCSRA|=(_BV(ADEN) | _BV(ADPS2) | _BV(ADPS0)) ; //normal conversion without interrupt

ADCSRA&=~(_BV(ADSC)|_BV(ADATE)|_BV(ADIF)|_BV(ADIE)|_BV(ADPS1));//clock/32 speed }

int Read_ADC(void){ADCSRA|=_BV(ADSC); //start conversionwhile(!((ADCSRA&_BV(ADIF))>>ADIF));return ADCH;}******************************MYLCD.C**********************************#include<avr/io.h>

/*-----------------------------------------------------------------------------CONNECTION BETWEEN LCD AND ATMEGA32----------------------------------------------------------------------------------*/#define DATA_DDR DDRD#define DATA_PORT PORTD

23

Page 24: Calendar Digital-RAS

document.doc#define CONTROL_DDR DDRC#define CONTROL_PORT PORTC#define Enable_Pin 5#define RegSelect_Pin 7#define ReadWrite_Pin 6#define CONTROL_MASK 0XE0/*-----------------------------------------------------------------------------CONTROL BITS OF LCD -------------------------------------------------------------------------------------------------*/

#define Set_Enable CONTROL_PORT|=_BV(Enable_Pin)#define Clear_Enable CONTROL_PORT&=~_BV(Enable_Pin)#define Write_Lcd CONTROL_PORT&=~_BV(ReadWrite_Pin)#define Read_Lcd CONTROL_PORT|=_BV(ReadWrite_Pin)#define Select_InstructionRegister CONTROL_PORT&=~_BV(RegSelect_Pin)#define Select_DataRegister CONTROL_PORT|=_BV(RegSelect_Pin)#define Data_Lcd(a) DATA_PORT=a#define delay2(a) delay_ms(a)

/*---------------------------------------------------------------------------------FUNCTIONS--------------------------------------------------------------------------------------------------------*/void Init_Ports(void);void Init_Lcd(void);void delay_ms(unsigned char time_ms);void Lcd_Send(unsigned char a);int ka=15;/*--------------------------------------------------------------------------------MAIN FUNCTION-------------------------------------------------------------------------------------------------------*//*int main(){Init_Ports();Init_Lcd();for(;;)Lcd_Send('f');return 1;}*//*---------------------------------------------------------------------------------SEND A CHARACTER TO LCD------------------------------------------------------------------------------------------*/void Lcd_Send(unsigned char a){Select_DataRegister;Write_Lcd;Data_Lcd(a);Set_Enable;

24

Page 25: Calendar Digital-RAS

document.docdelay2(ka);Clear_Enable;delay2(ka);}

/*---------------------------------------------------------------------------------FUNCTIONS TO INITIALIZE PORTS-------------------------------------------------------------------------------------*/void Init_Ports(void){DATA_DDR=0XFF; //Setting data port for outputCONTROL_DDR=CONTROL_MASK;//setting selected pins of control port for outputCONTROL_PORT&=~(_BV(Enable_Pin)|_BV(RegSelect_Pin )|_BV(ReadWrite_Pin)); //setting values to 0 at starting}

/*----------------------------------------------------------------------------FUNCTION TO INITIATE LCD ----------------------------------------------------------------------------------------------*/void Init_Lcd(void){char init[10]; int i; init[0] = 0x01; init[1] = 0x38; init[2] = 0x0c; init[3] = 0x06; init[4] = 0x80;Select_InstructionRegister;Write_Lcd;

for(i=0;i<5;i++){Data_Lcd(init[i]);Set_Enable;delay2(ka);Clear_Enable;delay2(ka);}

}

/*------------------------------------------------------------------------FUNCTION TO GENERATE DELAY IN MILLISECONDS---------------------------------------------------------------------------------*/void delay_ms(unsigned char time_ms){

unsigned short delay_count = F_CPU / 400;

25

Page 26: Calendar Digital-RAS

document.docunsigned short cnt;asm volatile ("\n"

"L_dl1%=:\n\t" "mov %A0, %A2\n\t" "mov %B0, %B2\n" "L_dl2%=:\n\t" "sbiw %A0, 1\n\t" "brne L_dl2%=\n\t" "dec %1\n\t" "brne L_dl1%=\n\t":"=&w" (cnt) :"r"(time_ms), "r"((unsigned short) (delay_count))

);}void Ouptut_Display(int h){int k,j;k=h%16; j=h/16;Lcd_Send(j+'0');Lcd_Send(k+'0');

}void Ouptut_Display2(int h){int k,j,i,t;k=h%10; i=h/100;t=h/10;j=t%10;Lcd_Send(i+'0');Lcd_Send(j+'0');Lcd_Send(k+'0');}

26

Page 27: Calendar Digital-RAS

document.doc

PCB LAYOUT

Sensor board R.T.C. BOARD

27

Page 28: Calendar Digital-RAS

document.doc

DEBUGGING AND TESTING

Connect the external 9.0V dc supply with the correct polarity without switching on the circuit and follow these steps.

1. Check whether +5 V is available at output pin 3 of regulator IC 7805.

2. Now check the availability of +5 V at pin 10 of controller base before placing IC into the socket.

3. We have separate code namely administrator code for RTC and testing code for LCD.

4. To check the LCD see the availability of 5V at pin2 of LCD. After giving VCC the LCD should show matrices of black dots (5x7). The continuity check applies to all the components on board.

5. Apart from this always check connection twice.

HARDSHIPS FACED Due to unavailability of AVR general purpose board, we developed

new AVR general purpose board. Cold soldering points were found at a number of places. Sensor was damaged because of wrong connections.

28

Page 29: Calendar Digital-RAS

document.doc

MECHANICAL DESIGN

29

Page 30: Calendar Digital-RAS

document.doc

FUTURE DEVELOPMENTS

We can reduce the size of device by constructing our own PCB. We can make the device user friendly giving it more features like alarm circuitry, also can use keypad. We can also make the device compatible for AC mains.

LIMITATIONS: This device does not give temperature reading below 0 degree. Size of device is large. Device is not user friendly. It works on 9V battery only.

30

Page 31: Calendar Digital-RAS

document.doc

COMPONENT LIST AND BILL

SR NO

COMPONENT SPECIFICATIONS QTY COST (Rs)

1 IC 7805 5V regulator 1 62 IC ATMEGA32 40-pin dipDIP 1 1454 IC base 16 pin dip 1 2

40 pin dip 45 Relamet connector 6 pin 1 9

2 pin 3 63 pin 1 54 pin 2 12

6 Power jack(dc socket) 1 67 Transistor BC548 1 18 Toggle switch SPDT 1 8

BWR 1 6Zener diode 5.1 V 2 2

9 Resistors 1000 ohm 0.25watt 2 0.510 kohm 0.25watt 2 0.515 Kohm 0.25watt 1 0.25

10 4.7 kohm 0.25 watts 2 0.511. Capacitors 1000uF,25V,electrolytic 1 6

100 uF,25V,electrolytic 1 210uF 25V, electrolytic 4 40.01 uF,ceramic 4 4

Bur strips 40 pin 3 1812. 2 pin push button 1 213 LCD 16x2 character LCD 1 13014 LEDs 3mm 2 215 PCB 3 6716 Serial cable Plug socket DB9

1 75

DB 9 socket Female 2 2017 LM 35 Temperature sensor 1 4018 RTC DS 1307 1 4019 CMOS Battery 3V 1 2020 Crystal 32.76Khz 1 621 casing 1 7522 Max232 1 21

TOTAL Rs.72531

Page 32: Calendar Digital-RAS

document.doc

Ref: MY EXPERIENCE IN PROGRAMMING AVR

MICROCONTROLLER USING WINAVR/AVRGCC- By BIBIN JOHN

Books are available on yahoo group-booksbybibin Australian amateur robotics websitehttp://www.users.on.net/~symes/CwithAVR/IntrotoCwithAVR.htmhttp://www.users.on.net/~symes/Mega32/Mega32_ds1307.zip AVR315: Using the TWI module as I2C master(application

notes by ATMEL (doc2564.pdf) DS1307 datasheet ATMEGA32.pdf datasheet Lm35 datasheet FREE ISP from www.deccanrobots.com for downloading

purpose RTC PCB etching part done by Mr.Kadam from Dhankawadi.

contact no:-9822851994 @rate 50p/cm2 (single sided) costs us 10/-

Sensor PCB etching part done by Mr.Gurram from Bibvewadi. contact no:-02024269293 @rate ( 1/-)/cm2 (single sided)Costs us 5/-

Controller PCB ( We are proud manufacturer of this testing board)Is now easily available named ‘R.A.S_ATMEGA’ in RAJIV

Electronics-Pune contact no:02024477218Costs us 52/-

Apart from this all components were buy from RAJIV Electronics Pune And serial cable from SEJUCTON-(house of networking product

contact -02024459989 For external casing purpose Tool used:

Winavr2007 compiler Avr studio4-(debugging & simulation) Free Isp- (free GNU for avr dude): downloader through spi bus. Ext. Library: avrlib1.5 avr-libc-user-manual-1.6.1.pdf

32