Master of Science IN Embedded Systems: Resistance Measurement Using Avr Atmega8 Microcontroller
Master of Science IN Embedded Systems: Resistance Measurement Using Avr Atmega8 Microcontroller
Master of Science IN Embedded Systems: Resistance Measurement Using Avr Atmega8 Microcontroller
MICROCONTROLLER
A Mini Project report submitted in partial fulfillment of the requirements
For the award of the degree of
MASTER OF SCIENCE
IN
EMBEDDED SYSTEMS
(UGC INNOVATIVE PROGRAMME)
BY
GOWTHAMRAJ K T P13E7001
Under the guidance of
Mr.K.Mathan Kumar, M.Sc., M.Tech.,
Assistant Professor of M.Sc., Embedded Systems
APRIL 2014
ACKNOWLEGDEMENT
This is to place on record my appreciation and deep gratitude to the persons without
whose support this project would never seen the light of day.
Finally, I express my sincere gratitude to all the members of faculty and my friends
who contributed their valuable advice and helped to complete the project successfully.
GOWTHAMRAJ K T
ABSTRACT
1. INTRODUCTION
2. TOOLS USED
2.2 Software Tools.
AVR STUDIO 4:
The AVR Studio4 Development Tools are designed to solve the complex problems facing
embedded software developers.
When starting a new project, simply select the microcontroller you use from the device
Database and the software consist compiler, assembler, linker and memory options for use.
The AVR Studio 4 Debugger accurately on – chips(I2C,CAN,UART,SPI,Interrupts,
I/O Ports, A/D Converter, D/A Converter and PWM Modules) of your AVR device.
Simulation helps you to understand hardware configurations and avoids time wasted on setup
problems, Additionally, with simulation, you can write and test applications before target
hardware is available.
PROTEUS SOFTWARE:
Proteus 7.0 is a Virtual System Modelling (VSM) that combines circuit simulation, animated
components and microprocessor models to co-simulate the complete microcontroller based
designs. This is the perfect tool for engineers to test their microcontroller designs before
constructing a physical prototype in real time.
This program allows users to interact with the design using on-screen indicators and/or LED
and LCD displays and, if attached to the PC, switches and buttons. One of the main
components of Proteus 7.0 is the Circuit Simulation -- a product that uses a SPICE3f5 analogue
simulator kernel combined with an event-driven digital simulator that allow users to utilize any
SPICE model by any manufacturer.
Proteus VSM comes with extensive debugging features, including breakpoints, single stepping
and variable display for a neat design prior to hardware prototyping. In summary, Proteus 7.0
is the program to use when you want to simulate the interaction between software running on a
microcontroller and any analog or digital electronic device connected to it.
ADVANTAGES:
Real time simulation.
Time and money saving.
CHAPTER – 3
3. FLOW CHAT
START
SYSTEM, ADC
INITIALIZATION
CALIBRATION MANUAL
CALIBRATION
TYPE?
DEFAULT OR STORED
CALIBRATION VALUES
WHILE (1)
RESISTANCE FINDER
SYSTEMS WAKING
RESISTANCE CALCULATION
VARIABLE
RESISTANCE ATmega8
Microcontroller LCD -
DISPLAY
POWER
SUPPLY
4.1 Description in Detail:
The “Resistance Measurement” basically consists of four main blocks; these are resistors,
microcontroller, display and switches.
Microcontroller: Microcontroller senses the signal given from switches and the mode of
operation voting mode it increments the data for corresponding key. In measuring mode
micro controllers fetches data from memory location and send it to display devices.
Fig4.3 LCD
OPERATION
RESISTANCE:
To calculate the resistor value using this formula we can find out it.
Small resistances
Small resistances of the order of ten ohm or less have resistances similar or even
smaller than the ones of the cables and connectors needed in the measurement. The s.c.
four-wire method is well suited for measurements of small resistances. For small
resistances you may also use the volt-ampere method, the Wheatstone bridge or a digital
general purpose meter (GPM). The effect of wires and connector is the larger the smaller
the resistance under study is.
Middle-range resistances
Large resistances
For large resistances (over 10 kΩ) the effect of cables and connectors is negligible so
The magnitude of the resistance can be adjusted with the third pole. If e.g. the third
pole would be at the top of the resistor the resistance would be the entire resistance of the
resistor. If the third pole would be exactly in the middle of the resistor, the resistance
would be 50% of the entire resistance.
CHAPTER – 6
SOFTWARE CODE
//********************************************************
// ******** avr core v 1.1 ***********
//********************************************************
//processor : AVR(MEGA)
//Controller : ATmega8 (Crystal: int8 Mhz)
//Compiler : winAVR (AVRStudio)
//Author : Gowthamraj.K.T
//Date : may- 2014
//********************************************************
int main(void)
{
init_devices();
LCDWriteStringXY(0,0,"please wait......");
LCDWriteStringXY(0,1,"system waking*****");
_delay_ms(900);
LCDClear();
while(1)
{
LCDWriteStringXY(0,0,"RESISTANCE ");
LCDWriteStringXY(0,1,"R= KOhm ");
result();
_delay_ms(200);
}
PROTEUS FILE :
HARDWARE DESIGN
CHAPTER – 8
1. It is economical
2. Less manpower required
3. Time conscious, as less time required for measuring the resistors.
4. Avoids invalid value while measuring
5. Saves transportation cost due to its compact size
6. Convenient on the part of measuring resistors.
CONCLUSION: