53
A MINI PROJECT ON SOLAR CELL DATALOGGER INCLUSIVE OF TEMPERATURE SENSOR 1

Project Report

Embed Size (px)

Citation preview

Page 1: Project Report

A

MINI PROJECT ON

SOLAR CELL DATALOGGERINCLUSIVE OF TEMPERATURE SENSOR

1

Page 2: Project Report

INDEX

SR. NO. TOPIC PAGE NO

1. Introduction & The Concept 4

2. Specifications 7 Circuit Specifications

3. Block diagram 8

4. Module wise design 9

5. softwares (programmming and simulation) 23

6. PCB Layout designing 24

7. Testing of Hardware and Software 26

8. References 29

9. Component List and Costing 31

10. Conclusions 33

2

Page 3: Project Report

INTRODUCTION

In the recent past we have seen the introduction of technology that has radically changed the way in which we analyze and control the world around us. Our project is on SOLAR CELL DATALOGGER , it is nothing but the data acquisition system. Data acquisition system accepts the data in analog form which is the output of certain sensor and converts it to digital form for further operation like data processing, transmission, storage and display.

In our project we are recording the output voltage ( mV) of a SOLAR CELL and also SOLAR INTENSITY (in Lux) after every single second. In addition to that we have added another physical parameter, TEMPERATURE.

Programmed control unit is the heart of the data acquisition system. That controls operations like channel selection, analog to digital conversion. In our project PIC microcontroller is acting as a control unit for the system.

It is very essential that we make use of automated technology in this fast modernizing world in order to reduce time, manpower& increase productivity and so automation is quiet essential in this world. Therefore we have interfaced RTC with microcontroller. The RTC generates interrupt signal after each second to the microcontroller so that microcontroller stores the reading after each second.

The measured physical parameter readings are displayed on the LCD display, which is acting as output module for the system. Also using RS 232 protocol we have interfaced the microcontroller to the PC so that readings can be stored on it.

3

Page 4: Project Report

THE CONCEPTActually to estimate the sun energy for a given location, we record the

irradiance (W/m2) with time. Figure below shows a sample plot of irradiance with time (5mins interval). The daily insolation can be computed easily by integrating the curve. For accurate total radiation measurement, we use the expensive pyranometer. However for simplicity and cheap instrument we can replace it with a

small solar cell as the input sensor.

Sample plot of Irradiance along the day. The insolation is 4777 WH/m2. The Peak-Hour is 4.8.

4

Page 5: Project Report

INSOLATION: Insolation is a measure of solar radiation energy received on a given surface area in a given time. The name comes from a portmanteau of the words incident solar radiation. It is commonly expressed as average irradiance in watts per square meter (W/m2) or kilowatt-hours per square meter per day (kW·h/(m2·day)) (or hours/day). In the case of photovoltaics it is commonly measured as kWh/(kWp·y) (kilowatt hours per year per kilowatt peak rating).

The given surface may be a planet, or a terrestrial object inside the atmosphere of a planet, or any object exposed to solar rays outside of an atmosphere, including spacecraft. Some of the solar radiation will be absorbed while the remainder will be reflected. Most commonly, the absorbed solar radiation causes radiant heating, however, some systems may store or convert some portion of the absorbed radiation, as in the case of photovoltaics or plants. The proportion of radiation reflected or absorbed depends on the object's reflectivity .

5

Page 6: Project Report

PROJECT SPECIFICATIONS:

CIRCUIT SPECIFICATIONS:

1. PIC 16F877A Microcontroller

It is given 5V Vcc for its operation. Crystal oscillator used has a frequency of 4.00 MHz.Up to 8K x 14 words of Flash Program Memory,Up to 368 x 8 bytes of Data Memory (RAM),Up to 256 x 8 bytes of EEPROM Data Memory

10-bit, up to 8-channel Analog-to-Digital Converter (A/D)

2. RTC DS1307 64 x 8, Serial, I2C Real-Time Clock

3. SENSORS

SOLAR PANEL (6.7V, 31mA Polycrystalline Solar Cell)LM 35DZ (Precision Centigrade Temperature Sensor)

BPW34 (Silicon PIN Photodiode) 4. MAX 232 (+5V-Powered, Multichannel RS-232 Drivers/Receivers )

6

Page 7: Project Report

BLOCK DIAGRAM

MICROCONTROLLER

LCD

ADC RTC

PHOTO

DIODE

SOLAR

CELL

TEMP.

SENSOR

COM1

7

Page 8: Project Report

MODULE WISE APPROACH

SENSORS :-

We have used 3 sensors in our project.

1) Solar cell

Solar cell (Robosoft systems) used is of specification of 6.7V and 31mA. As the analog input of microcontroller cannot be more than 5V , so we used the potential divider circuit to halve the output of solar cell.

8

Page 9: Project Report

2) Photo diode (for intensity measurement)

Photodiode (vishay) - The Photodiode used is the BPW34. This is a high speed and high sensitive silicon PIN photodiode in a miniature flat plastic package. A photodiode is designed to be responsive to optical input. Due to its waterclear epoxy the device is sensitive to visible and infrared radiation. The large active area combined with a flat case gives a high sensitivity at a wide viewing angle. Photodiodes can be used in either zero bias or reverse bias. Diodes have extremely high resistance when reverse biased. This resistance is reduced when light of an appropriate frequency shines on the junction. Hence, a reverse biased diode can be used as a light detector by monitoring the current running through it. Coupled to a 10Kohm resistor, and given the specification of the BPW34 a simple relationship between lux (light intensity) and voltage is given by;

lux = 1333 * Vo

9

Page 10: Project Report

3)LM 35DZ (for temperature measurement)

The LM 35 series are precision integrated- circuit temperature sensors, whose output voltage is linearly proportional to the Celsius temperature. LM 35 is rated to operate over a -55 C to +110 C range. It is a linear device with +10.0mV/ C scale factor. The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature. The LM35 thus has an advantage over linear temperature sensors calibrated in° Kelvin, as the user is not required to subtract a large constant voltage from its output to obtain convenient Centigrade scaling. The LM35 does not require any external calibration or trimming to provide typical accuracies of ±1⁄4°Cat room temperature and ±3⁄4°C over a full −55 to +150°Ctemperature range. Low cost is assured by trimming and calibration at the wafer level. The LM35’s low output impedance, linear output, and precise inherent calibration make interfacing to readout or control circuitry especially easy. It can be used with single power supplies, or with plus and minus supplies. As it draws only 60 μA from its supply, it has very low self-heating, less than 0.1°C in still air. The LM35 is rated to operate over a −55° to +150°C temperature range, while the LM35C is rated for a −40° to +110°C range (−10°with improved accuracy).

10

Page 11: Project Report

CONTROLLER :-

PIC is a family of Harvard architecture microcontrollers made by Microchip Technology, derived from the PIC1640[1] originally developed by General Instrument's Microelectronics Division. The name PIC initially referred to "Programmable Interface Controller".

PICs are popular with both industrial developers and hobbyists alike due to their low cost, wide availability, large user base, extensive collection of application notes, availability of low cost or free development tools, and serial programming (and re-programming with flash memory) capability.

The PIC architecture is distinctively minimalist. It is characterized by the following features:

Separate code and data spaces (Harvard architecture)

A small number of fixed length instructions

Most instructions are single cycle execution (4 clock cycles), with single delay cycles upon branches and skips

A single accumulator (W), the use of which (as source operand) is implied (i.e. is not encoded in the opcode)

All RAM locations function as registers as both source and/or destination of math and other functions.

A hardware stack for storing return addresses

A fairly small amount of addressable data space (typically 256 bytes), extended through banking

Data space mapped CPU, port, and peripheral registers

The program counter is also mapped into the data space and writable (this is used to implement indirect jumps).

We have selected PIC 16F877 for our application having following features –

11

Page 12: Project Report

High-Performance RISC CPU:1) Only 35 single-word instructions to learn 2) All single-cycle instructions except for program branches, which are two-cycle 3) Operating speed: DC – 20 MHz clock input DC – 200 ns instruction cycle 4) Up to 8K x 14 words of Flash Program Memory, Up to 368 x 8 bytes of Data Memory (RAM), Up to 256 x 8 bytes of EEPROM Data Memory5) Pinout compatible to other 28-pin or 40/44-pin PIC16CXXX and PIC16FXXX microcontrollers

Peripheral Features:1) Timer0: 8-bit timer/counter with 8-bit prescaler 2) Timer1: 16-bit timer/counter with prescaler, can be incremented during Sleep via external crystal/clock3) Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler 4) Two Capture, Compare, PWM modules –

- Capture is 16-bit, max. resolution is 12.5 ns - Compare is 16-bit, max. resolution is 200 ns - PWM max. resolution is 10-bit

5) Synchronous Serial Port (SSP) with SPI™ (Master mode) and I2C™ (Master/Slave) 6) Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI) with 9-bit address detection7) Parallel Slave Port (PSP) – 8 bits wide with external RD , WR and controls (40/44-pin only) 8) Brown-out detection circuitry for Brown-out Reset (BOR)

Analog features :- 1) 10-bit, up to 8-channel Analog-to-Digital Converter (A/D) 2) Brown-out Reset (BOR) 3) Analog Comparator module with: - Two analog comparators - Programmable on-chip voltage reference (V REF) module - Programmable input multiplexing from device inputs and internal voltage reference

- Comparator outputs are externally accessible.RTC (REAL TIME CLOCK) :-

12

Page 13: Project Report

A real-time clock (RTC) is a computer clock (most often in the form of an integrated circuit) that keeps track of the current time. Although the term often refers to the devices in personal computers, servers and embedded systems, RTCs are present in almost any electronic device which needs to keep accurate time.

Although keeping time can be done without an RTC, using one has benefits:

Low power consumption (important when running from alternate power)

Frees the main system for time-critical tasks

Sometimes more accurate than other methods

We have used DS 1307 RTC.

The DS1307 Serial Real-Time Clock is a low-power, full binary-coded decimal (BCD) clock/calendar plus 56 bytes of NV SRAM. Address and data are transferred serially via a 2-wire, bi-directional bus. The clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The clock operates in either the 24-hour or 12-hour format with AM/PM indicator. The DS1307 has a built-in power sense circuit that detects power failures and automatically switches to the battery supply.

Typical operating circuit for DS1307

TWO WIRE SERIAL DATA BUS : -

13

Page 14: Project Report

The DS1307 supports a bi-directional, 2-wire bus and data transmission protocol. A device that sends data onto the bus is defined as a transmitter and a device receiving data as a receiver. The device that controls the message is called a master. The devices that are controlled by the master are referred to as slaves. The bus must be controlled by a master device that generates the serial clock (SCL), controls the bus access, and generates the START and STOP conditions.

The DS1307 operates as a slave on the 2wire bus. A typical bus configuration using this 2-wire protocol is show in Figure.

LCD : -

14

Page 15: Project Report

In recent years the LCD panels became very popular because of their

widespread use in various electronic systems like instruments to read the parameter

values, digital communications for sending or receiving the text information, data

acquisition systems, etc. These display units dominating seven segment displays by

providing more features to the user. The LCD system can display numbers,

characters, and graphics, where as seven segments LED’s displays only numbers,

therefore most of the engineers prefers LCD’s. The data fed to the LCD remains as

it is and the same will be displayed until it gets an erase signal from the controller.

The data can be stored and it can be refreshed for the next task.

The LCD panel used in this block interfaced with micro-controller through

the output port. This is a 20 character x 2Line LCD module, depending up on the

availability of LCD panel 3 lines or 4 lines panels can be used for the purpose, so

that more information can be displayed simultaneously. These panels are capable

of display numbers, characters, and graphics. The display contains two internal

byte-wide registers, one for commands (RS=0) and the second for characters to be

displayed (RS=1). It also contains a user. Programmed RAM area (the character

RAM) that can be programmed to generate any desired character that can be

formed using a dot matrix. To distinguish between these two data areas, the hex

command byte 80 will be used to signify that the display RAM address 00h is

chosen.

The instruction command codes from microcontroller can be sent to the

LCD to clear the display, depending up on the command the cursor can be brought

to home position or blink the cursor. The LCD is having two important resistors

internally, command resistor and data register; RS pin is used to select either

command register or data register. If RS = 0, the instruction command code

register is selected and allowing the user to send a command to clear the display. If

RS = 1 the data register is selected, there by the user is allowed to send data that is

15

Page 16: Project Report

to be displayed on LCD screen. By making RS pin to zero, we can also check the

busy flag bit to see if the LCD is ready to receive information. As already

mentioned that D0 – D7 of LCD pins are 8 – bit data pins and the busy flag is D7,

it can be read when R/W (Read or Write) pin is high (R/W = 0) and RS = 0, as

follows; if R/W = 1, R/S = 1. When D7 pin is high, the LCD is busy taking care of

internal operations and will not accept any new information. When D7 = 0, the

LCD is ready to receive new information. It is recommended to check the busy flag

before writing any data to the LCD.

The following figure shows how the display unit is interfaced to the

Microcontroller.

Interfacing the display unit to the Microcontroller

RS 232 : -

16

Page 17: Project Report

Also, we have interfaced microcontroller to computer to store the data after every minute, which allows us to store large amount of data. For pc interfacing we have used RS 232 standard.

RS-232 is quite famous term in telecommunications, RS-232 stands for Recommended Standard 232. RS-232 is a standard used for serial binary data signals which connects DCE (Data Circuit-terminating Equipment) to DTE (Data Terminal Equipment), most commonly used in computer serial ports. In today’s computers RS-232 is replaced with USB for local communications. RS-232 is slower than USB. USB is simple to use with its easy connectors and also it use very less energy. RS-232 and USB both have software support for all the famous operating systems.

USB make it easy for device drivers to communicate with hardware, but there is no provision for direct analog to the terminal programs used which will allow users communicate directly with serial ports. Because of a protocol for transferring data to device USB is more complex than RS-232. This includes an extra software to support protocol to be used. RS-232 on the other hand only regulate voltage of signals and the functions of the physical interface pins.

17

Page 18: Project Report

Nowadays application of RS 232 is gone beyond the original use of connect a terminal with modem and its successors are showing some disadvantages.

Few of the limitations associated with RS 232 are:

Noise immunity and transmission distance are limited because of the single ended signaling

Power consumptions are increased because of large voltage swings for positive and negative supplies. Upper speed of a compatible interface is also gets limited due to the voltage swing.

There is no specific method of sending power to device ;RS232 is only suitable for low power devices like mice.

Between two devices multi-drop connection is not defined. When multi drop works it still lacks in compatibility and speed.

POWER SUPPLY :-

18

Page 19: Project Report

The basic step in designing of any system is to design power supply required for that system.

The steps involved in the designing of the power supply are as follows,

1) Determine the total current that the system sinks from the supply.

2) Determine the voltage rating for the different components.

In our system most of the components used require 5V as operating voltage such as microcontroller, MAX 232, RTC etc. The total current, which our circuit sinks from the power supply, is not more than 200mA. We have used regulator IC 7805 that gives output voltage 5V. The minimum input voltage required for the 7805 is near about 7V. Also we have used bridge module for rectification which have ON state voltage drop equal to 2V. Therefore we have used the transformer rating 230V - 12V and current rating 500Ma.

STEP DOWN TRANSFORMER

Step down transformer is the first part of regulated power supply. To step down the mains 230V AC we require step down transformer. Following are the characteristics of electronic transformer.

Power transformers are usually designed to operate from source of low impedance at a single frequency.

It is required to construct with sufficient insulation of necessary dielectric strength.

.Transformer ratings are expressed in volt-amp. The volt-amp of each secondary winding are added for the total secondary VA. To this are added the load losses.

Temperature rise of a transformer is decided on two well known factors i.e. losses on transformer and heat dissipating or cooling facility provided unit.

RECTIFIER UNIT :-

19

Page 20: Project Report

Rectifier unit is a circuit which converts AC into pulsating DC. Generally semiconductor diode is used as rectifying element due to its property of conducting current in one direction only. Generally there are two types of rectifiers-

a) Half wave rectifier

b) Full wave rectifier.

Of which our circuit needs full wave centre tapped rectifier.

FILTER UNIT :-

Generally a rectifier is required to produce pure DC supply for using at various places in the electronic ckt. However, the o/p of rectifier has pulsating character i.e. if such a DC is applied to electronic ckt. It will produce a character containing AC & DC components. The AC components are undesirable and must be kept away from the load. To do so a filter circuit is installed between rectifier and regulator.

In our project we are using capacitor filter because of its low cost, small size, little weight and good characteristics. Capacitors are connected in parallel to the rectifier o/p because it passes AC but does not pass DC at all.

THREE TERMINAL VOLTAGE REGULATOR :-

A voltage regulator is a circuit that supplies constant voltage regardless of change in load current.IC voltage regulators are versatile and relatively cheaper. The 7800 series consists of three terminal positive voltage regulators. These ICs are designed as fixed voltage regulator and with adequate heat sink, can deliver o/p current in excess of 1A.These devices do not require external component. This IC also has internal overload protection and internal short circuit and current limiting protection. For our project we use 7805 voltage regulator IC.

20

Page 21: Project Report

CIRCUIT DIAGRAM

21

Page 22: Project Report

PROGRAM

22

Page 23: Project Report

unsigned short kp,i,j,temp1,temp2,flag;// Declare Short range 0 to 255

signed short back;

unsigned int intvar,maxx;

char intstr[4],volt[13];

unsigned float temp_res;

//------------RTC Variable Declaration--------------------------

unsigned short read_ds1307(unsigned short address );

void write_ds1307(unsigned short address,unsigned short w_data);

unsigned short sec;

unsigned short minute;

unsigned short hour;

unsigned short data;

char time[9];

unsigned char BCD2UpperCh(unsigned char bcd);

unsigned char BCD2LowerCh(unsigned char bcd);

void RTC(void);

void main()

//--------------RTC Initilization---------------------------------

I2C_Init(100000); //DS1307 I2C is running at 100KHz

TRISC = 0xFF;

23

Page 24: Project Report

Usart_Init(9600);

Lcd_Init(&PORTD); // Initialize LCD on PORTC

Lcd_Cmd(LCD_CLEAR); // Clear display

Lcd_Cmd(LCD_CURSOR_OFF); // Cursor off

RTC();

void RTC()

while(1)

//------------------------RTC Time---------------------------

sec=read_ds1307(0); // read second

minute=read_ds1307(1); // read minute

hour=read_ds1307(2); // read hour

time[0] = BCD2UpperCh(hour)+'0'; // Get '1' Add '0' i.e. ascii of 0 is 48

time[1] = BCD2LowerCh(hour)+'0'; // Get 2 from 12

time[2] = ':';

time[3] = BCD2UpperCh(minute)+'0';

time[4] = BCD2LowerCh(minute)+'0';

time[5] = ':';

time[6] = BCD2UpperCh(sec)+'0';

time[7] = BCD2LowerCh(sec)+'0';

24

Page 25: Project Report

time[8] = '\0';

Lcd_Out(1, 2, "TIME:");

Lcd_Out(1,8,time); // Displays whole Time Array 12:30:23

Usart_Write('T');

Usart_Write('I');

Usart_Write('M');

Usart_Write('E');

Usart_Write(':');

Usart_Write(' ');

for(i=0;i<9;i++)

Usart_Write(time[i]);

Usart_Write(13);

Usart_Write(10);

//-----------------Solar Panel VOLTAGE DISPLAY---------------------------

Lcd_Out(2, 2,"Panel mV");

temp_res = Adc_Read(3);

intvar =(((temp_res/1024)*5)*1000)*2;

IntToStr(intvar, intstr);

Lcd_Out(2,12,intstr);

25

Page 26: Project Report

Usart_Write('P');

Usart_Write('V');

Usart_Write(':');

Usart_Write(' ');

for(i=0;i<8;i++)

Usart_Write(intstr[i]);

Usart_Write(13);

Usart_Write(10);

//-----------------Photo Diode loop---------------------------

Lcd_Out(3, 2,"light(in Lux):");

temp_res = Adc_Read(1);

intvar=temp_res*1333;

IntToStr(intvar, intstr);

Lcd_Out(3,15,intstr);

Usart_Write('L');

Usart_Write('T');

Usart_Write(':');

26

Page 27: Project Report

Usart_Write(' ');

for(i=0;i<4;i++)

Usart_Write(intstr[i]);

Usart_Write(13);

Usart_Write(10);

//-----------------LM35 looop----------------------------------------

Lcd_Out(4, 2,"Tmp:in 'C");

temp_res = Adc_Read(2);

intvar=(((temp_res*5)/1024)*1000)/10;

IntToStr(intvar, intstr);

Lcd_Out(4,11,intstr);

Usart_Write('T');

Usart_Write('M');

Usart_Write('P');

Usart_Write(':');

Usart_Write(' ');

for(i=0;i<8;i++)

27

Page 28: Project Report

Usart_Write(intstr[i]);

Usart_Write(13);

Usart_Write(10);

Usart_Write(13);

Usart_Write(10);

Usart_Write(13);

Usart_Write(10);

Delay_ms(800);

Lcd_Cmd(LCD_CLEAR); // Clear display

//-------------------------RTC Functions-----------------------------

unsigned short read_ds1307(unsigned short address)

I2C_Start();

I2C_Wr(0xd0); //address 0x68 followed by direction bit (0 for write, 1 for read) 0x68 followed by 0 --> 0xD0

I2C_Wr(address);

I2C_Repeated_Start();

I2C_Wr(0xd1); //0x68 followed by 1 --> 0xD1

data=I2C_Rd(0);

I2C_Stop();

28

Page 29: Project Report

return(data);

unsigned char BCD2UpperCh(unsigned char bcd)

return ((bcd >> 4));

unsigned char BCD2LowerCh(unsigned char bcd)

return ((bcd & 0x0F));

//-------------------------------------------------------------------

P.C.B. DESIGNING

29

Page 30: Project Report

P.C.B. LAYOUT:-

The entire circuit can be easily assembled on a general purpose P.C.B.

board respectively. Layout of desired diagram and preparation is first and most

important operation in any printed circuit board manufacturing process. First of

all layout of component side is to be made in accordance with available

components dimensions.

The following points are to be observed while forming the layout of P.C.B.

1. Between two components, sufficient space should be maintained.

2. High voltage/max dissipated components should be mounted at sufficient

distance from semiconductor and electrolytic capacitors.

3. The most important points are that the components layout is making proper

compromise with copper side circuit layout.

Printed circuit board (P.C.B.s) is used to avoid most of all the disadvantages

of conventional breadboard. These also avoid the use of thin wires for connecting

the components; they are small in size and efficient in performance.

PREPARING CIRCUIT LAYOUT: -

First of all the actual size circuit layout is to be drawn on the copper side of

the copper clad board. Then enamel paint is applied on the tracks of connection

with the help of a shade brush. We have to apply the paints surrounding the point

at which the connection is to be made. It avoids the disconnection between the

leg of the component and circuit track. After completion of painting work, it is

allowed to dry.

DRILLING: -

30

Page 31: Project Report

After completion of painting work, holes 1/23inch(1mm) diameter are

drilled at desired points where we have to fix the components.

ETCHING: -

The removal of excess of copper on the plate apart from the printed circuit

is known as etching. From this process the copper clad board wit printed circuit is

placed in the solution of FeCl with 3-4 drops of HCL in it and is kept so for about

10 to 15 minutes and is taken out when all the excess copper is removed from the

P.C.B.

After etching, the P.C.B. is kept in clean water for about half an hour in

order to get P.C.B. away from acidic, field, which may cause poor performance of

the circuit. After the P.C.B. has been thoroughly washed, paint is removed by soft

piece of cloth dipped I thinner or turbine. Then P.C.B. is checked as per the layout,

now the P.C.B. is ready for use.

SOLDERING: -

Soldering is the process of joining two metallic conductor the joint where

two metal conductors are to be join or fused is heated with a device called

soldering iron and then as allow of tin and lead called solder is applied which

melts and converse the joint. The solder cools and solidifies quickly to ensure is

good and durable connection between the jointed metal converting the joint

solder also present oxidation.

LAYOUT

31

Page 32: Project Report

TESTING OF HARDWARE AND SOFTWARE

32

Page 33: Project Report

Debugging and testing is a very critical step in the completion of a project. The testing of microcontroller was done by connecting LED’s at every port pin of the microcontroller. The microcontroller was then programmed to flash these LED’s

The testing of the LCD was done by writing a simple program to display something on the LCD. In this way the connections of the LCD were verified and the LCD was tested.

The testing of the 10 bit ADC was done by writing a simple code for measuring the analogue voltage at the channel of the ADC. This voltage was also displayed on the LCD.

Every sensor output was studied and accordingly the 10 bit ADC was utilized to get a satisfactory output.

Also testing of the RS 232 protocol (i.e. Communication with the computer) was done by sending the data serially to the COM1 port of the computer.

Last but not the least the code for RTC initialization was tested an n number of times for its correct operation. The time read from the RTC was displayed on the LCD.

33

Page 34: Project Report

PROBLEMS FACED One of the major problem faced by us was that of operation of the RTC. We

faced a serious problem in programming of the RTC. Initially we used DS1302 (Trickle-Charge Timekeeping Chip). Though the code worked perfectly when simulated but on actual hardware the scenario was exactly opposite. In spite of lots of debugging we were unsuccessful in our efforts.

And finally we decided to go for the DS1307 (64 x 8, Serial, I2C Real-Time Clock Chip). After thorough practice of programming we were successful in interfacing the RTC with the PIC.

TROUBLESHOOTER

Care should be taken while soldering. There should be no shorting of joints.

Continuity of the tracks should be maintained.

Proper power supply should be maintained.

Project should be handled with care since some IC’s are delicate.

Last but not the least change the component/’s and check the circuit again, is

should work (it did for us a couple of times).

CAUTION!One must be cautious during the programming of the microcontroller chip.

Casual effort can lead to damage of the chip.

When soldering, use a proper stand for the gun.

34

Page 35: Project Report

REFERENCES

The IC’s and other important components used in this project work, procured

from the Rajiv Electronics, Pioneer Electronics. The details or datasheets of the

IC’s are downloaded from the Internet. The following are the web sites that can be

browsed for collecting the data sheets.

www. microchip .com/

www. national .com/

www. maxim -ic.com/

www. alldatasheet .com/

www. datasheet catalog.com/ etc.

While designing and developing this project work, lot of study material is referred, maximum information is gathered from Internet and books, In addition to searching websites, the following are the books referred at various stages during the development of this project work.

The Eejit’s Guide to the PIC Microcontroller.

Making PIC Microcontroller - Instruments and Controllers [Harprit Singh Sandhu]

The Quintessential PIC Microcontroller [Sid Katzen]

BASIC for PIC Microcontrollers [Nebojsa Matic]

PIC Microcontrollers (Know It All) [Newnes publications]

PIC-microcontroller-project-book-With-PICBASIC [John Iovine]

Design with PIC microcontrollers [Peatman]

PIC microcontroller’s application guide [David Benson]

MIKROELEKTRONIKA mikroC COMPILER MANUAL.

35

Page 36: Project Report

SOFTWARES

SIMULATION TOOLS:

36

Page 37: Project Report

COMPILER:

PCB LAYOUT TOOL:

37

Page 38: Project Report

COST ANALYSIS OF COMPONENTS USEDComponent Quantity Rates(Rs.)

1) PIC 16F877 1 125

2) IC - Ds1307 (RTC) 1 Free of cost

3) Max 232 1 40

4) Solar cell (6.7v , 31mA) 1 350

5) Photodiode 1 Free of cost

6) LM35 1 35

7) Transformer

(230v-12v, 1A)

1 140

8) Bridge rectifier module 1 6

9) 7805 1 7

10) 20x4 lcd 1 350

11) Crystal - 4 MHz

32.768 KHz

1

1

10

16

12) IC base - 40 pin

16 pin

8 pin

1

1

1

15

8

3

13) Resistor – 10 KΩ

440Ω

7

2

1.75

0.5

14) Resistor bank – 5 pin

4.7K Ω 9 pin

4

1

12

5

38

Page 39: Project Report

15) Potentiometer (10k Ω) 1 8

16) Db 9 connector 1 5

17) Capacitors

100uF,25v (electrolytic)

33uF (ceramic)

0.1uF (ceramic)

10uF ,63v(electrolytic)

2

2

2

4

4

2

2

12

18) Wires and connectors 30 (approx.)

19) PCB with etching 1 65

20) Cabinet 1 353

TOTAL 1607.25

39

Page 40: Project Report

CONCLUSION

The project work “SOLAR CELL DATALOGGER INCLUSIVE OF TEMPERATURE SENSOR” is designed and developed successfully, for the demonstration purpose prototype module is constructed and results are found to be satisfactory. This project work is designed for providing information about the solar energy in the region of interest. This project also keeps a track of solar intensity and temperature in the concerned region. This kind of data collecting systems are essential for the researchers those who are studying the distribution of solar energy in different geographical conditions. This is an innovative project introduced to help the researchers in the field of solar, so far in our country this kind of systems are not widely used.

This project may help us in analyzing the behavior of sun in different locations on the earth. Knowing the distribution of the solar energy, the equipments that work on solar power can be efficiently designed depending upon the requirement of energy consumed.

40

Page 41: Project Report

FUTURE SCOPEIt could be interfaced with the memory card(2GB) and so the need of

continuous PC monitoring will vanish.

The data from the memory card will be read by the microcontroller and a plot of solar energy v/s time can be given on a graphic LCD PANEL (good resolution)

The memory card can be directly interfaced with a printer to obtain a hard copy of the results.

The solar cell can be replaced by pyranometer to obtain irradiance directly.

41