Your SlideShare is downloading. ×
  • Like
IMPLEMENTING A DIGITAL MULTIMETER
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

IMPLEMENTING A DIGITAL MULTIMETER

  • 2,419 views
Published

Implementation of a digital multimeter using basic stamp2 on a professional development board. It also includes R2R ladder network for digital to analog conversion

Implementation of a digital multimeter using basic stamp2 on a professional development board. It also includes R2R ladder network for digital to analog conversion

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • thanks your presentation of digital mutimeter
    Are you sure you want to
    Your message goes here
    Be the first to like this
No Downloads

Views

Total Views
2,419
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
68
Comments
1
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. IMPLEMENTING A DIGITAL MULTIMETER MAE 576 [MECHATRONICS] LAB-2 GROUP E Chembrammel Elavunkal Srinivasan Vishwajeet University at Buffalo, Mechatronics, Spring 2010
  • 2. INTRODUCTION
    • Implement and facilitate analog to digital (A to D) and from digital to analog (D to A) conversion using the Basic stamp II kit
    • The circuit used for the implementation is drawn
    • The code controlling the hardware is included to complement the understanding of the functioning of the multimeter.
    • The accuracy of the multimeter is discussed
    • Solution to improve the accuracy is proposed.
    University at Buffalo, Mechatronics, Spring 2010
  • 3. OBJECTIVES
    • To implement a digital ohmmeter using the BS2 RCTIME command to measure resistance.
    • To implement a digital voltmeter using chip ADC0831 to measure varying voltages.
    • To implement an R-2R ladder circuit to facilitate digital to analog conversion.
    • To implement a Pulse width Modulation based digital to analog converter using chip LM358N.
    University at Buffalo, Mechatronics, Spring 2010
  • 4. HARDWARE OVERVIEW
    • Basic Stamp 2 (Rev. J) Module
    • Professional Development Board
    • 2 x 16 Parallel LCD
    University at Buffalo, Mechatronics, Spring 2010
  • 5. HARDWARE OVERVIEW University at Buffalo, Mechatronics, Spring 2010 Professional Development Board (PDB) A Power switch L L293D high-current quad half-H driver B 2.1 mm power connection, centre positive, input voltage 6-12 VDC M Eight active-low push-buttons with 5V pull-ups C Serial programming interface, DB-9 N Eight active-low DIP switches with 5V pull-ups D BS1-IC, BS2-224, BS2-40 and Javelin Stamp sockets O Pulse generator with 1Hz, 10Hz, 100Hz and 1 kHz selectable output E BS1 Serial Adapter connection P RJ-11 connector for X-10 or 1-Wire I/O F Sixteen blue discrete LEDs Q MAX232E RS-232 DCE line driver G Five blue 7-segment LED displays R DS1307 I2C real-time clock with 3V battery backup H Parallel LCD interface with contrast pot (4/8-bit modes supported) S SX28AC/DP socket I Two servo headers (can also be used for Parallax Serial LCD displays and PING))) sensor) T SX-Key/SX-Blitz programming connection J Two 10K potentiometers U Solderless breadboard for connecting external components K Audio amplifier with volume control (speaker on-board/ext selectable)
  • 6. HARDWARE OVERVIEW University at Buffalo, Mechatronics, Spring 2010 Basic Stamp 2 (Rev. J) Module
  • 7. HARDWARE OVERVIEW University at Buffalo, Mechatronics, Spring 2010 EEPROM Regulator Interpreter PIC16F57 [i] http://www.parallax.com/tabid/134/List/1/ProductID/1/Default.aspx Basic Stamp 2 (Rev. J) Module Name BS2-IC Package 24-pin DIP Package Size  (L x W x H) 1.2"x0.6"x0.4" Environment -40 to +185  o F (-40 to +85  o C)  ** Processor Speed 20 MHz Program Execution Speed ~4,000 instructions/sec. RAM Size 32 Bytes (6 I/O, 26 Variable) Scratch Pad RAM N/A EEPROM  (Program)  Size 2K Bytes, ~500 instructions Number of I/O pins 16 +2 Dedicated Serial Voltage Requirements 5 - 15 vdc Current Draw @ 5V 3 mA Run / 50 µA Sleep Source / Sink Current per I/O 20 mA / 25 mA Source / Sink Current per unit 40 mA / 50 mA per 8 I/O pins PBASIC Commands 42 PC Programming Interface Serial Port (9600 baud) Windows Text Editor Stampw.exe (v1.04 and up)
  • 8. HARDWARE USED University at Buffalo, Mechatronics, Spring 2010 Component Name On PDB Y/N Part # Page # BS2 – IC Y Basic Stamp2 Module PDB - Professional Development Board Switches* Y [M] Resistors N 100Ω(3), 220Ω(1), 1kΩ(3), 2.2kΩ(5) - Capacitor N 0.1μF (1) - ADC0831 N ADC0831 (8-bit Analog to Digital Converter) LM358N N LM 385 (Op-Amp) LCD Display N 2 x 16 Parallel LCD
  • 9. HYPOTHESIS
    • The aim of the experiment can be summarized as follows:
    • R-2R Mode Off
    • When Switch S1(part M) is pressed, display the value of the unknown resistance on the LCD.
    • When Switch S2 is pressed, display the value of the voltage on the LCD.
    • Switch S3 is used to toggle the R-2R mode. Once it is pressed, the R-2R mode is enabled.
    • R-2R Mode On
    • When Switch S1(part M) is pressed, increment the value of the voltage in steps of 16 and display on the LCD.
    • When Switch S2 is pressed, decrement the value of the voltage in steps of 16 and display on the LCD.
    • Switch S3 is used to toggle the R-2R mode. Once it is pressed, the R-2R mode is disabled.
    University at Buffalo, Mechatronics, Spring 2010
  • 10. PROPOSED SOLUTION
    • In the light of the objectives and the constraints we would like the digital multimeter to have the following characteristics
    • Integrate voltmeter, ohmmeter, R-2R circuit and PWM to obtain functionality of multimeter.
    • Develop a flow chart to get better understanding of process
    • Create circuit layout to integrate all necessary hardware
    • Program code to ensure full operation spectrum
    • Implement finished digital system
    University at Buffalo, Mechatronics, Spring 2010
  • 11. CONSTRAINTS [Self Imposed]
    • Ensure clean hardware implementation
    • Reduce use of hardware resources
    • Streamline coding to achieve optimal functionality
    • Test and achieve maximum accuracy in measurement
    University at Buffalo, Mechatronics, Spring 2010
    • P14 is used for button 3 as well as for CS of one of the ADCs.
    • P15 is used for RCTIME as well as for CS of the other ADC .
    Additional Goals
  • 12. PROCEDURE
    • Ohmmeter:-
    • The RC circuit is constructed as shown in figure 1 using I/O pin of the basic stamp.
    • The resistance to be measured is connected between the point 1 and the ground. The LCD display is interfaced on to the stamp board as recommended.
    • The ohmmeter measures the resistance in a range between 1kΩ-10kΩ.
    • The output that is to be measures is connected to the basic stamp I/O pin 15.
    • The RC time command of the basic stamp is used in the code to measure the time taken for the discharge of the capacitor which is related to the resistance value using a relation.
    • The RC time obtained was used to calculate the resistance
    • A desktop multimeter is used to calibrate the ohmmeter.
    • The resistance value is displayed on the LCD in KΩ.
    • The Ohmmeter is activated by a push button which is connected to the I/O pin 12 of the basic stamp.
    University at Buffalo, Mechatronics, Spring 2010
  • 13. PROCEDURE
    • Voltmeter:-
    • The voltage output from the potentiometer (i.e the voltage divider) is provided to the ADC .
    • The ADC is connected as recommended in the manual using 3 I/O pins of the basic stamp.
    • The pushbutton to activate the voltmeter is connected the pin 13 of the basic stamp.
    • Using the measured value and the output value from the ADC calibration is made. A desktop multimeter is used to note the output voltage from the potentiometer.
    • The voltage thus measured is displayed on the LCD in binary form and in decimal form.
    • Pin Connections of ADC0831 in the Voltmeter Circuit
    • Pin 1(i.e chip select) of the ADC is connected to the pin 14 of the BS2 which is connected to the push button-I.
    • Pin 2 (i.e V in ) is connected to the potentiometer since it is the source of input.
    • Pin3 is connected to pin 4 (gnd) .
    • Pin 5 is connected to VDD via pin 5 of the second ADC.
    • Pin 6(DO) is connected to the pin 11 of the BSII via pin 6 of the other ADC.
    University at Buffalo, Mechatronics, Spring 2010
  • 14. PROCEDURE
    • R-2R Ladder:-
    • A second ADC0831 is used to measure the voltage levels from the R2R ladder.
    • Since the clock and data out pins (pins 7 & 6 respectively) take the same signals as the first ADC0831 they are connected to the same BS2 pins (pins 7 & 6).
    • The pushbutton to activate the R2R ladder is connected to P14 which is same as the /CS pin of the first ADC0831, since the IC is not active at this time.d
    • The pins 8 through 11 are the inputs to the ladder branches.
    • Using the measured value and the output value from the ADC calibration is made. A desktop multimeter is used to note the output voltage from the potentiometer.
    • The voltage thus measured is displayed on the LCD in binary form and in decimal form.
    University at Buffalo, Mechatronics, Spring 2010
  • 15. PROCEDURE [Flow Chart] University at Buffalo, Mechatronics, Spring 2010 Flow Chart
  • 16. PROCEDURE [Circuit] University at Buffalo, Mechatronics, Spring 2010 Circuit
  • 17. PROCEDURE [Pin Layout] University at Buffalo, Mechatronics, Spring 2010 Pin Layout PIN # Component Device P0 D4 LCD Data Input P1 D5 LCD Data Input P2 D6 LCD Data Input P3 D7 LCD Data Input P4 E LCD Pulse Input P5 RS LCD Command/Write P6 DataIN ADC (R-2R) and ADC (Voltmeter) P7 Clock ADC (R-2R) and ADC (Voltmeter) P8 BIT0 [LSB] R-2R Network P9 BIT1 R-2R Network P10 BIT2 R-2R Network P11 BIT3 R-2R Network P12 BTN0 Ohmmeter Button P13 BTN1 Voltmeter Button P14 BTN2 & Chip Select R-2R Mode Select & ADC(Voltmeter) P15 RC Circuit & Chip Select Ohmmeter & ADC(R-2R)
  • 18. PROCEDURE [Source Code] University at Buffalo, Mechatronics, Spring 2010 Source Code (Attached to Webpage)
  • 19. IMPLEMENTATION University at Buffalo, Mechatronics, Spring 2010
  • 20. CALIBRATION-Ohmmeter University at Buffalo, Mechatronics, Spring 2010 Resistances Used (kΩ) Digital Multimeter Basic Stamp Multimeter Raw Data (kΩ) Rounded Data (kΩ) Non-Calibrated Data Calibrated Data Absolute Error (kΩ) Value (kΩ) % Error Value % Error 1.0 0.968 1.0 0.8 20.00% 0.8 20.00% 0.2 2.2 2.13 2.1 2 4.76% 2 4.76% 0.1 3.2 3.1 3.1 3.1 0.00% 3 3.23% 0.1 4.4 4.28 4.3 4.4 2.33% 4.2 2.33% 0.1 4.7 4.59 4.6 4.7 2.17% 4.5 2.17% 0.1 5.7 5.56 5.6 5.8 3.57% 5.6 0.00% 0.0 6.9 6.73 6.7 7.1 5.97% 6.8 1.49% 0.1 7.9 7.7 7.7 8.1 5.19% 7.9 2.60% 0.2 9.4 9.16 9.2 9.7 5.43% 9.4 2.17% 0.2 10.0 9.76 9.8 10.4 6.12% 10.1 3.06% 0.3 11.0 10.73 10.7 11.4 6.54% 11.1 3.74% 0.4
  • 21. Calibration-Voltmeter University at Buffalo, Mechatronics, Spring 2010 Measurements (V) Digital Multimeter Basic Stamp Multimeter Raw Data (V) Rounded Data (V) Raw Data (V) Rounded Data (V) % Error Absolute Error (V) 0 0 0 0 0 - 0.00 0.5 0.498 0.5 0.509 0.51 2.00% 0.01 1 1.025 1.03 1.039 1.04 0.97% 0.01 1.5 1.504 1.5 1.509 1.51 0.67% 0.01 2 2.09 2.09 2.098 2.1 0.48% 0.01 2.5 2.49 2.49 2.51 2.51 0.80% 0.02 3 3.02 3.02 3.059 3.06 1.32% 0.04 3.5 3.48 3.48 3.51 3.51 0.86% 0.03 4 3.97 3.97 4 4 0.76% 0.03 4.5 4.49 4.49 4.529 4.53 0.89% 0.04 5 4.97 4.97 5 5 0.60% 0.03
  • 22. Calibration-R2R University at Buffalo, Mechatronics, Spring 2010 Digital Increment Binary Value BIT3 (V) BIT2 (V) BIT1 (V) BIT0 (V) Expected Voltage (V) Increment of 16 2.5 1.25 0.625 0.3125 BINARY HEX 0 0000 0 0 0 0 0 00000000 0 1 0001 0 0 0 1 0.3125 00010000 10 2 0010 0 0 1 0 0.625 00100000 20 3 0011 0 0 1 1 0.9375 00110000 30 4 0100 0 1 0 0 1.25 01000000 40 5 0101 0 1 0 1 1.5625 01010000 50 6 0110 0 1 1 0 1.875 01100000 60 7 0111 0 1 1 1 2.1875 01110000 70 8 1000 1 0 0 0 2.5 10000000 80 9 1001 1 0 0 1 2.8125 10001111 8F 10 1010 1 0 1 0 3.125 10011111 9F 11 1011 1 0 1 1 3.4375 10101111 AF 12 1100 1 1 0 0 3.75 10111111 BF 13 1101 1 1 0 1 4.0625 11001111 CF 14 1110 1 1 1 0 4.375 11011111 DF 15 1111 1 1 1 1 4.6875 11101111 EF
  • 23. CONCLUSION
    • Successfully implemented a digital multimeter
    • Digital to analog converter
    University at Buffalo, Mechatronics, Spring 2010
  • 24. REFERENCES
    • http://www.parallax.com/Store/Education/KitsandBoards/tabid/182/CategoryID/67/List/0/SortField/0/Level/a/ProductID/320/Default.aspx
    • http://ww.parallax.com/tabid/441/Default.aspx
    • BASIC Stamp Syntax and Reference Manual
    • http://www.parallax.com/tabid/214/Default.aspx
    • http://www.parallax.com/tabid/134/List/1/ProductID/1/Default.aspx
    • http://www.parallax.com/Portals/0/Downloads/docs/prod/audiovis/lcd2x16par.pdf
    • http://www.national.com/mpf/DC/ADC0831.html#Parametrics
    University at Buffalo, Mechatronics, Spring 2010