PIC-based Digital Voltmeter (DVM) | Anna university questions papers projects for EEE,ECE,IT,MECHANICAL,MBA,MCA Anna university questions papers projects for EEE,ECE,IT,MECHANICAL,MBA,MCA: PIC-based Digital Voltmeter (DVM) Bank Exam question paper, GATE Papers,Combined Defence Service Examination papers ,TANCET,BSNL JTO,ISRO,EBOOKS,DRDO ,BARC, , NTPC ,BHEL ,BEL ,HAL,Anna University Papers,ECE , EEE , CSE , IT , Mech , BIOMEDICAL , Textile , MBA , MCA , Anna University Question Bank , Anna University Syllabus , Anna University 'Q' Papers , Gate Papers , 8051, AVR, 8051 projects, free 8051 microcontroller projects, AVR projects, AVR tutorial, AVR microcontroller projects, circuits, hobby electronics, microcontroller based projects, microcontroller projects, final year projects, electronic projects, electronics projects, circuit diagrams, pin diagram, pin description, interfacing with AT89C51, 8051 tutorials, embedded projects, serial port, sensor, Electronic Components, Electronic Circuits, circuits for hobbyist, electronic schematics, DIY projects, breadboard circuits, at89c51, 8051 code, advanced circuits, hobby projects, circuit ideas, embedded system, embedded C, microcontroller programming in C, LCD interfacing, ADC interfacing, circuit components, hobby circuits, seven segment display, 89c51 projects, circuit description, major projects, minor projects, projects for circuit branches, interrupt, 8051 programming, RS232, 8 bit microcontroller,Microcontroller Tutorials, PIC Tutorial, 8051 Microcontroller Tutorial Resource, Connect to the PIC, PIC Tutorials, Micro Controller Tutorials, PIC Micro controller Tutorial Resource, DALLAS 80C320, DS80C320, Connect to the PIC, PIC Tutorials, Dallas DS80C320, 8051 Introduction, Types of Memory, Special Function Registers, Basic Registers, Addressing Modes, Program Flow, Low Level Information, 8051 Timers, 8051 Serial Port Operations, 8051 Interrupts, Additional Features of 8052, 8052 Instruction Set, Computer Science Seminar Topics, Mechanical Engineering Seminar Topics,Electrical Seminar Topics,Electronics Seminar Topics,Seminar Abstract And Report Downloads,High-Speed Architecture, New Instruction Speed, Variable Length MOVX Instruction, Timer Considerations, Dual Data Pointer, Watchdog Kicking, The Watchdog Watchdog Interrupt, Watchdog System Resets, Power Failure Functions, Power Failure Reset, Power Failure Interrupt, Secondary Serial Port, Timed Access Protection, PIC16F877A Tutorial, Introduction to the PIC16F877A, How to hook up the PIC so it will run?, What do the pins mean?, How to program the PIC?, Miscellaneous Advice, LED Blinker, Photoresistor Input, Analog Input (Photoresistor, Sonar sensor, IR sensor, Digital Input (Switches), Output messages to computer screen, Servo Motor Output, DC Motor Output,Gate sample paper with solution , Engineering E-Books , Free ebook websites , Final Year Projects , Placement papers,anna university previous year question bank, previous year question paper,model question paper, two mark question paper,sex,adult,results,atmel humidity Assembly Language code, Digital Clock Employing Memory Mapping, Humidity Sensing, Microcontroller51,control solid state relays, decoded 74ls138, latech 73ls373, port expander, Solid State Relays,urn ON, turn OFF, Relay Driver, back EMF, holding, current, pullup, resistor, coil, BC547, ULN2003, ULN2803, npn, transistor, microcontroller, Technology, circuit,bharathidasan university,university,thanjavur,madurai,coimbatore,chennai,adult,porn,sastra,sastra university, placement and training cell,java,j2ee,ajax,c,c++,oracle,COMPUTER SCIENCE,embedded, embedded systems, j2ee, dotnet, j2me, dot net, jsp, vb, c#, c, c sharp, computer science, cse, information technology, it, Electrical, Electronics, communication,SURVEY,ONLINE JOB,PAY TO CLICK,SEBOSA, ece, eee, academic, college, instrumentation, control, control systems, best ,project centers, project centres, company, companies, software, telecommunication, telecom, networking, matlab, robotics, Artificial intelligence, automation, cloud computing, cryptography, data mining, dsp, database, digital, image processing, fuzzy logic, gsm, gps, gprs, mobile computing, networks, network security, php, power, systems, vlsi, hardware, web services, wireless, rf, rfid, microcontroller, ns2, 2010, titles, list, download, latest, free, advanced, low cost, placement, zigbee, Chennai, india, uk, SOFTWARE ENGINEERING, APPLIED ELECTRONICS, VLSI Design, M.E,EMBEDDED SYSTEMS, COMMUNICATION SYSTEMS,Memory Organization, Microcontroller to LCD, moving message display using 8051 microcontroller, MOVING MESSAGE DISPLAY USING ATMEL 89C51, PIN Configuration, Programming Aspects, POWER ELECTRONICS, 89c51, 89s51 moving message display board, microcontroller 8051,8051, AVR, 8051 projects, 8051 microcontroller projects, AVR projects, AVR tutorial, AVR microcontroller projects, electronics projects, free electronic circuits, circuit diagrams, circuits, schematics, hobby electronic projects, electronic projects, hobby electronic circuit diagram, final year projects, embedded projects, technical articles. Interfacing microcontroller 8051 with peripherals like ADC, LCD, EEPROM,solenoid valve atmel dc control triac,dimmer bt138,uln2003 microcontroleur interfacing a microprocessor to a power thyristor microcontrol based level mesurement 89c51 as pwm controller,at89c2051 sine wave pwm,8051 lift, circuit design for a elevator, Elevator Lift control for three stories with microcontroller 8051, microcontroller based lift controller for three stories, three stories lift,ericsson at command microcontroller, GSM/ EDGE Modem in PCI Interface, Interface of mobile phone with micro-controller, Supporting AT commands,embedded projects,8051,pic,arm,pic16f877a,qualifity,best project in thanjavur,relay design,product manufuring,dvd,vcd,service,free training,electrical and electronic circuits,pcb board design,help of embedded,earn money with embedded,part time job,home based job,vacancy,ieee transaction,optimization,website design,university, Chapter 2 Liquid Crystal Display, Character Generator RAM, DDRAM or CGRAM, Display on or off control, LCD, microcontroller interface with LCD, PIN Configuration, Pressure monitoring with microcontroller 8051, Pressure sensing and controlling, Pressure Sensing System, Programmable Peripheral Interface, RS-232 serial communication,diploma in embedded,matlab in thanjavur, seo,site design @2900 onwards, 8255 and RS232, 89s51 LCD display LM 35 ADC0804 measurment, construction of a pressure sensing system using 8051, designed pressure sensor and transducer,microcontroller based heart rate meter,8051 pin diagram,invention heart rate meter,heart meter watch,heart beat monitor project,8051,AVR,8051 projects,free 8051 microcontroller projects,AVR projects,AVR tutorial,AVR microcontroller projects,circuits,hobby electronics,microcontroller based projects,microcontroller projects,final year projects,electronic projects,electronics projects,circuit diagrams,pin diagram,pin description,interfacing with AT89C51,8051 tutorials,embedded projects,serial port,sensor,Electronic Components,Electronic Circuits,circuits for hobbyist,electronic schematics,DIY projects,breadboard circuits,at89c51,8051 code,advanced circuits,hobby projects,circuit ideas,embedded system,embedded C,microcontroller programming in C,LCD interfacing,ADC interfacing,circuit components,hobby circuits,seven segment display,89c51 projects,circuit description,major projects,minor projects,projects for circuit branches,interrupt,8051 programming,RS232,8 bit microcontroller,microcontroller based heart beat monitor,8051 isp programmer,heartbeat monitor and display on LCD,heart beat rate monitor with sensor,training heart rate monitor with comaprators ans sensor,8051 microcontroller application,optocoupler based sensor of runner heart rate monitor,how to measure heart beat, calculate heartbeat just in one second,8051 rtos,limitations of heart rate monitors, quick display of heart monitor,advantages of electronic medical records,electronic medical billing,used electronic test equipment,electronic document management solution,fetal heart rate monitor,wrist heart rate monitor,avr 8051,baby heart monitor,heart beat counter using microcontroller 8051, block diagram for ir led and ldr based heartbeat monitor with display on computer, MICROCONTROLLER AT89C2051 BASED HEART BEAT MONITOR (PULSE RATE wth assembly code),ir led and ldr based heartbeat monitor with display on computer,wireless biomedical monitoring system using 89S52 microcontroller,wireless biomedical monitoring system using 89S52 microcontroller,8051microcontroller based heart beat monitor,heart pulse system project,very cheap cost in india,lm35,temperature sensor,heart beat sensor,technology,solutions,sastra university,data base design,speed ,innovative centre,home security system model design, water level indicator for home,COMPUTER SCIENCE, SOFTWARE ENGINEERING, APPLIED ELECTRONICS, VLSI Design,IEEE Project center, IEEE 2010 Projects in Tanjore, trichy, Kumbakonam, Pudukkottai, Ariyalur, Pattukkottai, Best IEEE Projects, final year projects, Project Center in Trichy, Project Company in thanjavur, Project training @ tanjore, Free 8051 Microcontroller projects,8052 projects,microcontroller,projects, Datasheers,circuit diagram,Microcontroller,8051,AVR,8085 Microprocessor,BASCOM,projects,tutorials,codes,Libraries,interfacing examples,embedded projects,serial port,infrared remote controls,rf remote controls,home automation,Intel 8051 microcontroller,electronic projects,embedded systems,control systems,computers,technical books,software,assembly language,programming intels 8051,serial communications,rs232,Electronics Projects,Books,Home Automation,Computer Software,Assemblers,Compilers,applications Programming,Embedded Systems Design,8052,AT89C2051,robotics applications,visualbasic, Microsoft Visual Basic,system, based, solar, control, intelligent, motor, controller, vehicle, monitoring, pwm, detection, home, temperature, tracking, alert, blind, alcohol, automated, automatic, close,Robotics,Kits,Circuit Examples,8051,Robots,micro Code,AT89c51, Programmer,IEEE 2010 embedded systems, embedded programming, PIC Micro projects, Microchip Programming, AVR tutorials, PIC Micro tutorials, ATMEL, Microcontrollers based systems, Microcontroller Projects, Embedded projects, Embedded designing in C, Microchip Lab, Embedded systems tips, DIY Electronics,Project Detail,onlinejob, Data Entry, no fee, no investment, part time, home based,recuirements,job,consultancy,helpline,maths,power,ultimate knowledge,prodigy,trichy,mobile
100% FAT LOSS TIPS Click Here!

PIC-based Digital Voltmeter (DVM)

, Posted by ADMIN at 10:19 AM

Introduction

This project will describe how to make a simple digital voltmeter (DVM) using a PIC16F688 microcontroller. The range of this DVM is 0-20V, but you can easily increase or decrease the range of input voltage as your requirements after you understand the voltage scaling method described in this project. The PIC micro reads the input voltage through one of the 8 analog channels and convert it to a 10-bit digital number using the internal ADC. Doing some math with ADC conversion (you will see later), this number can be converted to the actual measured voltage. The voltage is displayed in an HD44780-based character LCD.

Circuit Diagram and Description

You cannot feed a 20V signal directly to a PIC microcontroller's input channel. It is too higher than its operating voltage, and the microcontroller could be damaged. So, first we need a voltage scaler that will scale down the input voltage to the safe operating voltage range of PIC16F688. It can be achieved by a simple resistor divider network shown below.

Using two resistors, R1 and R2, the input voltage ranging from 0-20V can be down converted to 0-5V. For the chosen values of R1 and R2, you can see that the output (Va) from the resistor divider network is 1/4th of the input voltage. If the input voltage goes beyond 20V, Va will exceed 5V, and this could be harmful for the PIC microcontroller. If you connect a 5.1V Zener diode across the R1 resistor, the output voltage Va will never exceed 5.1V. This will protect the microcontroller from any possible damage due to high voltage input. The voltage Va will go to AN2 (pin 11) channel of the PIC16F688 microcontroller. The rest of the circuit is shown below.

The LCD display is connected in 4-bit mode. If you have just 14 pins in your LCD module, then you may not have a back-light facility and you can ignore the pins 15 and 16. The contrast adjustment is done through a 5K potentiometer connected between +5V and Gnd. An in-circuit serial programming (ICSP) header is provided so that you can easily upgrade the firmware inside the PIC microcontroller in future if you make any changes. An external reset is helpful to bring the entire system to a known initial condition, when the microcontroller stops executing the program for some reason.

The complete circuit built on a breadboard is shown here. You need a regulated +5V power supply for this project (Why regulated? You will find the answer in the Software section below). You can use a LM7805 linear regulator IC for this purpose (read my article Regulated Power Supply for your Breadboard).

Software

Before writing the code for this project, you need to do some math related to AD conversion. You know that any application that uses analog-to-digital converters (ADCs), requires a fixed reference voltage to provide accurate digital count for input analog signal. If the reference voltage is not stable, the ADC output is meaningless. In this project, the reference voltage for ADC operation is selected to be Vdd (= +5 V). This is done by clearing the VCFG bit in ADCON0 register. Therefore, the ADC will convert any input voltage between 0-5 V in to a digital count between 0-1023. A major source of error in this project is the accuracy of R1 and R2 resistors. You are recommended not to use the rated values of the resistors. Rather measure their values with a good quality digital multimeter, and use those values for your calculation. What I found is R1 = 1267 Ω and R2 = 3890 Ω. Now,

0 – 5 V Analog I/P is mapped to one of the 1024 levels (0-1023 Digital Count)

=> Resolution = 5/1024 = 0.0049 V/Count

Also, Va = 1267*Vin/(1267+3890) = 0.2457*Vin
=> I/P voltage = 4.07*Va = 4.07* Digital Count * 0.0049
= 0.01994 * Digital Count
= 0.02*Digital Count (Approx.)

To avoid floating point, use I/P voltage = 2*Digital Count. Here's how it works. Suppose, Vin = 4.6V. Then,

Va = 0.2457*Vin = 1.13V
=> Digital Count = 1.13/0.0049 = 231
=> Calculated I/P Voltage = 2*231 = 0462

In the 4-digit product (0462), the first two digits are the tens and units digits of measured voltage. and the last two are the decimal digits. So, the measured voltage will be 04.62 V. Only the first three digits will be displayed (04.6 V).

The firmware is developed in C and compiled with mikroC Pro for PIC compiler from Mikroelektronika. The PIC16F688 microcontroller uses internal clock oscillator at 4.0 MHz. MCLR is enabled and Power Up Timer is turned ON. You need to define RA2/AN2 input as analog by setting the corresponding bit in ANSEL register. VCFG bit of ADCON1 register is cleared to use Vdd = +5V as reference voltage for AD conversion. ADCON0 = 8 connects the AN2 input channel to the internal Sample and Hold circuit. Comparators on ports A and C pins must be disabled too (assign CMCON0 = 7). The configuration bits for the fuses are given below. You can set these in MikroC through Project->Edit Project.

Oscillator -> Internal RC No Clock
Watchdog Timer -> Off
Power Up Timer -> On
Master Clear Enable -> Enabled
Code Protect -> Off
Data EE Read Protect -> Off
Brown Out Detect -> BOD Enabled, SBOREN Disabled
Internal External Switch Over Mode -> Enabled
Monitor Clock Fail-Safe -> Enabled

The complete program written in mikroC is given here.
/* Project: Digital Voltmeter based on PIC16F688
Internal Oscillator @ 4MHz, MCLR Enabled, PWRT Enabled, WDT OFF
Copyright @ Rajendra Bhatt
Oct 10, 2010
*/


// LCD module connections

 sbit LCD_RS at RC4_bit;

 sbit LCD_EN at RC5_bit;

 sbit LCD_D4 at RC0_bit;

 sbit LCD_D5 at RC1_bit;

 sbit LCD_D6 at RC2_bit;

 sbit LCD_D7 at RC3_bit;

 sbit LCD_RS_Direction at TRISC4_bit;

 sbit LCD_EN_Direction at TRISC5_bit;

 sbit LCD_D4_Direction at TRISC0_bit;

 sbit LCD_D5_Direction at TRISC1_bit;

 sbit LCD_D6_Direction at TRISC2_bit;

 sbit LCD_D7_Direction at TRISC3_bit;

// End LCD module connections

char Message1[] = "DVM Project";

unsigned int ADC_Value, DisplayVolt;

char *volt = "00.0";

void main() {

 ANSEL = 0b00000100; // RA2/AN2 is analog input

 ADCON0 = 0b00001000; // Analog channel select @ AN2

 ADCON1 = 0x00;   // Reference voltage is Vdd

 CMCON0 = 0x07 ; // Disable comparators

 TRISC = 0b00000000; // PORTC All Outputs

 TRISA = 0b00001100; // PORTA All Outputs, Except RA3 and RA2

 Lcd_Init();        // Initialize LCD

 Lcd_Cmd(_LCD_CLEAR);      // CLEAR display

 Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off

 Lcd_Out(1,1,Message1);

 Lcd_Chr(2,10,'V');

do {

  ADC_Value = ADC_Read(2);

  DisplayVolt = ADC_Value * 2;

  volt[0] = DisplayVolt/1000 + 48;

  volt[1] = (DisplayVolt/100)%10 + 48;

  volt[3] = (DisplayVolt/10)%10 + 48;

  Lcd_Out(2,5,volt);

  delay_ms(500);   // Hold for 500 ms

 } while(1);

} // End main()

Download HEX File

Testing the DVM

Here are the DVM measurement output for various input voltages ranging from 0-20V obtained through a variable DC power source.

Variable power supply source

Questions, comments, and suggestions are welcome.


--
With Regards,

s.m.sethupathy,
sms communication,
Tanjore -1.


mobile :9944 186 173           
      www.questionpaperlink.co.cc
      www.sethu-panguvarthagam.blogspot.com






Currently have 0 comments: