Design and Analysis of Peak Detector with Automatic Reset using Arduino Mega 2560

DOI : 10.17577/IJERTV3IS030594

Download Full-Text PDF Cite this Publication

Text Only Version

Design and Analysis of Peak Detector with Automatic Reset using Arduino Mega 2560

Dharmrajsinh Parmar E&C Department, CHARUSAT University, Changa, India

Rachna Jani

E&C Department, CHARUSAT University, Changa, India

Zalak Dobariya

E&C Department, CHARUSAT University, Changa, India

Abstract – This paper describes the hardware and algorithm implementation of peak detector with automatic reset with brief overview of the peak detector. A microcontroller is used to compute the peak value of each input using looping algorithm. All inputs as analog (Voltage, Current) or physical quantities likes Pressure, Temperature are given to analog inputs of the microcontroller. The microcontroller finds peak of each input after one minutes delay or we can say that after analyzing much values. After that it can be displaying it on LCD or in hyper terminal of PC. This device finds the peak value but also displayed all values. Comparison of hardware bases and software base peak detector has also been discussed in the present work and result of device is also given.

Keywords – Hardware based peak detector, Software based peak detector, Arduino Mega 2560 microcontroller.

  1. INTRODUCTION TO PEAK DETECTOR

    Peak detector is one of the most essential circuits or device where peak value of any physical quantity (Pressure, Temperature) or amplitude (Current, voltage) is required. Based on an algorithm used peak detectors classified as (a) Hardware base peak detector (b) software base peak detectors. There are another two types (1) manually reset (2) Automatic reset. Schematic, block diagrams and brief introduction of these types are given below.

  2. HARDWARE BASE PEAK DETECTOR

    A hardware base peak detector consists of register, capacitor and reset switch in parallel with capacitor as shown in Fig.1

    When output of an op-amp is generated capacitor at the will be charged for output of the op-amp. When value of op-amps output is changed condition of capacitors charge is changed if output increases the voltage of capacitor is increased and if output is decreases voltage of capacitor is remain as it is as shown in Fig.1 For discharging capacitor no path is exist so when we press a switch discharging path for capacitor is available and discharges it [1]. So we get peak value but we must reset it for finding new peak value after some time.

    Generally peak detectors depend on RC component and its circuit as shows in a Fig. 1. The response time of any devices is

    depending on RC component of that device [2]. The value of RC component sets such that we get proper response time. Response time means when input gives to a device and when gets output from device means rise time of device. Generally response time of peak detectors is large due to RC component. In addition this when we use reset switches it has also its own response time therefore overall response time of peak detectors is increasing.

    Fig.1 Schematic of hardware base Peak detector

    So the disadvantage of hardware base peak detectors is it has larger response time, reset of capacitor using switch is manually. These disadvantages are affecting application of peak detectors. Some ICs also available in markets that finds the peak value of quantity and reset automatically but problem creates here is cost of the IC is larger and also require some extra connection to it, it requires larger power and area. The ICs available such types are PKD01, pp00. These ICs are used when accuracy is required. The another way for finding a peak value is using looping structure circulates the loop every time and find the peak value each time and after completion of loop the circuit will be reset.

  3. SOFTWARE BASED PEAK DETECTOR

    In software based peak detector the concept of the peak detector remain same but the principle of working is different. In hardware base peak detector we use RC component with reset switch and manually reset it. On other hand in software based peak detector we use any microcontroller with appropriate looping algorithm. Peak value will finding after analyzing particular value and automatically reset after finding peak value. The advantage of this detector is the response time of the device reduce and also cost and area of circuit because if we make any devices generally we use microcontroller so all other circuits are not required and also cost. Schematic of software base peak detector with automatic reset is as shown in Fig.2.

    Fig. 2 schematic of software base peak detector with automatic reset

  4. ARDUINO BASED PEAK DETECTOR WITH

    AUTOMATIC RESET

    We have used Arduino Mega 2560 microcontroller board based on Atmega2560. It has 54 digital input/output pins of which 15 can be used as pulse width modulator (PWM) outputs, 16 analog input pins, 4 hardware serial ports and a 16 MHZ crystal oscillator [3]. Fig. 3 shows the schematic of microcontroller (Arduino Mega 2560) based peak detector with automatic reset. The microcontroller computes peak values based on the algorithm using physical quantity. It displays the peak values into LCD display or in Personal computer using serial communication. A peak detector with automatic reset has been designed and implemented in order to find peak value and reset automatically rather than manually. The analog outputs of any physical quantities send to analog inputs of the arduino.

    Then microcontroller check each inputs and gives peak value of each inputs after one minute or we can say that after checking sixty values and display it into PC or into LCD. The microcontrollers predefined task in its software as shows in Fig. 4.

    Fig. 3 Schematic of Arduino Mega 2560 based peak detector with automatic reset

    As a case study first read all analog value or physical quantity then display all analog values which are pressure, voltage, binary value etc in LCD or PC. This peak detector detects peak value after analyzing sixty values or we can say that after one minute. Here sixty values are not fixed but that depends on users. Mean looping for much values and check if it is maximum or not if it is maximum than change the value of variable otherwise remains as it is. After analyzing much value looping will be complete and display or print the maximum value on PC or LCD through serial communication like USB, RS232 etc. After completing this value of a variable became reset means zero and process will be continue. Here objective of making this device is we can do work with cost effectiveness and to remove the manually operation of reset the capacitor.

    Fig. 4 Flow chart showing the peak detector with automatic resets algorithm

  5. RESULTS OF PEAK DETECTOR WITH AUTOMATIC

    RESET

    After all work to be done means connection of all devices, software programming and loading into arduino board time to read of results. Here result will be displayed into PC and LCD. So the snapshot of result is showing into fig. 5. The snapshot is displaying the physical quantity for five analog pin that discribe above and after analyzing sixty values it gives maximum value of each quentity as shown in fig. 5. In figure the digital value is displaying because arduino have inbuilt ADC so after that we can convert it into analog form.

    Fig. 5 Snapshot of results

  6. CONCLUSION

In this paper we have discussed about the design and implementation of peak detector with automatic reset. The Arduino Mega 2560 microcontroller is the center processing unit of the system. It has been programmed to compute the peak value using looping algorithm with automatc reset the value. The analog or physical quantities are given to the Arduino Mega 2560 at its analog pins and peak value of each device is finding using the predefined algorithm and after that value become reset and process will be continue. The peak detector with automatic reset based on Arduino Mega 2560 is quite advantageous and provides best system performance in terms of area, power, response time and cost. The peak detector with automatic reset based on Arduino Mega 2560 works satisfactorily when we consider terms areas, cost etc.. Here the drawback of peak detectors with reset is when we consider peak value in terms of time means one minute the execution time of a program also included into time so after some time we must refresh the

program of the device but we consider in terms of values than it will be perfect for sixty values. So peak detectors using software sides is quite advantageous than the hardware side peak detector and we can analyze more value than sixty using software change so that is flexible.

REFERENCES

  1. http://www.indiabix.com/electronics-circuits/peak-detector/.

  2. http://www.electronics-tutorials.ws/rc/rc_1.html.

  3. http://arduino.cc/en/Main/arduinoBoardMega2560.

Leave a Reply