Digital To Analog Converter with Sine Wave Output



Similar documents
Conversion Between Analog and Digital Signals

DAC Digital To Analog Converter

Web Site: Forums: forums.parallax.com Sales: Technical:

DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION

Digital to Analog and Analog to Digital Conversion

Chapter 6: From Digital-to-Analog and Back Again

Chapter 4: Pulse Width Modulation

Interfacing Analog to Digital Data Converters

Basic Analog and Digital Student Guide

LM 358 Op Amp. If you have small signals and need a more useful reading we could amplify it using the op amp, this is commonly used in sensors.

Digital to Analog Converter. Raghu Tumati

Analog/Digital Conversion. Analog Signals. Digital Signals. Analog vs. Digital. Interfacing a microprocessor-based system to the real world.

Analog to Digital Conversion of Sound with the MSP430F2013

Scan a Keypad with the BS2 For Pushbutton User Input

ServoPAL (#28824): Servo Pulser and Timer

Digital Electronics Detailed Outline

Basics of Digital Recording

Chapter 12. Data Converters. à Read Section 19 of the Data Sheet for PIC18F46K20. Updated: 4/19/15

Hideo Okawara s Mixed Signal Lecture Series. DSP-Based Testing Fundamentals 46 Per-pin Signal Generator

Analog signals are those which are naturally occurring. Any analog signal can be converted to a digital signal.

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Electronic Circuits Spring 2007

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

Analog Signal Conditioning

etape Continuous Fluid Level Sensor Operating Instructions and Application Notes

Upon completion of unit 1.1, students will be able to

PLL frequency synthesizer

Decimal Number (base 10) Binary Number (base 2)

Microcontroller to Sensor Interfacing Techniques

Teaching the Importance of Data Correlation in Engineering Technology

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence :

PHY-2464 Physical Basis of Music

Analog Representations of Sound

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

ADS9850 Signal Generator Module

Tire pressure monitoring

Gripper Kit for the Boe-Bot Robot (#28202)

Laboratory 4: Feedback and Compensation

PACKAGE OUTLINE DALLAS DS2434 DS2434 GND. PR 35 PACKAGE See Mech. Drawings Section

Measuring Resistance Using Digital I/O

6.025J Medical Device Design Lecture 3: Analog-to-Digital Conversion Prof. Joel L. Dawson

Application Report. 1 Introduction. 2 Resolution of an A-D Converter. 2.1 Signal-to-Noise Ratio (SNR) Harman Grewal... ABSTRACT

Parallax Serial LCD 2 rows x 16 characters Non-backlit (#27976) 2 rows x 16 characters Backlit (#27977) 4 rows x 20 characters Backlit (#27979)

Evaluating AC Current Sensor Options for Power Delivery Systems

Controlling a Dot Matrix LED Display with a Microcontroller

SAMPLE CHAPTERS UNESCO EOLSS DIGITAL INSTRUMENTS. García J. and García D.F. University of Oviedo, Spain

Positive Feedback and Oscillators

Part 1. MAX BIT DAC with an Arduino Board. MIDI to Voltage Converter Part1

Using a Thermistor to Measure Temperature. Thermistors are resistors that vary their resistance according to temperature.

A PSTN Terminal for FSK Decoding and DTMF Dialing Applications

FEATURES DESCRIPTION. PT6321 Fluorescent Display Tube Controller Driver

Bend Sensor USB User Guide

Micro-Step Driving for Stepper Motors: A Case Study

Low Cost Pure Sine Wave Solar Inverter Circuit

Section 3. Sensor to ADC Design Example

Lecture N -1- PHYS Microcontrollers

AMZ-FX Guitar effects. (2007) Mosfet Body Diodes. Accessed 22/12/09.

Section 19. Voltage Reference

Pulse Width Modulation (PWM) LED Dimmer Circuit. Using a 555 Timer Chip

LAB 7 MOSFET CHARACTERISTICS AND APPLICATIONS

Analog-to-Digital Converters

Glitch Free Frequency Shifting Simplifies Timing Design in Consumer Applications

Programming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II

A Digital Timer Implementation using 7 Segment Displays

Constructing a precision SWR meter and antenna analyzer. Mike Brink HNF, Design Technologist.

POCKET SCOPE 2. The idea 2. Design criteria 3

C8051F020 Utilization in an Embedded Digital Design Project Course. Daren R. Wilcox Southern Polytechnic State University Marietta, Georgia

isppac-powr1220at8 I 2 C Hardware Verification Utility User s Guide

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1

HT9170 DTMF Receiver. Features. General Description. Selection Table

Lesson 16 Analog-to-Digital Converter (ADC)

Lab 3 Rectifier Circuits

Op-Amp Simulation EE/CS 5720/6720. Read Chapter 5 in Johns & Martin before you begin this assignment.

Physics 623 Transistor Characteristics and Single Transistor Amplifier Sept. 13, 2006

How To Calculate The Power Gain Of An Opamp

Lab 5 Operational Amplifiers

ARRL Morse Code Oscillator, How It Works By: Mark Spencer, WA8SME

Use and Application of Output Limiting Amplifiers (HFA1115, HFA1130, HFA1135)

Zeros, Ones, and the Morse Code

Microcomputers. Analog-to-Digital and Digital-to-Analog Conversion

Lab Unit 4: Oscillators, Timing and the Phase Locked Loop

Analog Sound From A Digital Delay

INTRODUCTION TO DIGITAL SYSTEMS. IMPLEMENTATION: MODULES (ICs) AND NETWORKS IMPLEMENTATION OF ALGORITHMS IN HARDWARE

Operational Amplifier - IC 741

How To Close The Loop On A Fully Differential Op Amp

ECEN 1400, Introduction to Analog and Digital Electronics

Wireless Security Camera

PCM Encoding and Decoding:

Fondamenti su strumenti di sviluppo per microcontrollori PIC

Special Lecture. Basic Stamp 2 Programming. (Presented on popular demand)

TSic 101/106/201/206/301/306/506 Rapid Response, Low-Cost Temperature Sensor IC with Analog or digital Output Voltage

Experiment # (4) AM Demodulator

Electronics Technology

Designing an efficient Programmable Logic Controller using Programmable System On Chip

Web Site: Forums: forums.parallax.com Sales: Technical:

Bipolar Transistor Amplifiers

5B5BBasic RC Oscillator Circuit

Sentinel-SSO: Full DDR-Bank Power and Signal Integrity. Design Automation Conference 2014

SC14404 Complete Baseband Processor for DECT Handsets

Transcription:

Digital To Analog Converter with Sine Wave Output Overview In this Lab we will build a resistive ladder network and use the BASIC Stamp to generate the digital data for the D/A conversions. PBASIC will be used to program the BASIC Stamp to send the resistive ladder network sets of binary values that will yield distinct voltage levels at the output of the network.. Parts Required Gather these parts from your parts: (10) 2 k resistors (7) 1 k resistors (1) Red LED (1) 270 resistor (1) LM 358 op-amp Converter Discussion A simplified example with only four of the eight inputs needed of resistive ladder network for this experiment is shown in shown in Figure 1. It's components are definitely an inexpensive alternative compared to an integrated circuit digital to analog converter (D/A converter or DAC). A few resistors are a fraction of the cost of an integrated circuit, however when manufacturing a large number of circuits the cost of inserting so many components would be much more than the cost of inserting one IC. Then there is the size and power issues. The resistive ladder network is also used in many A/D and D/A integrated circuits, such as the ADC0831. The resistors used in integrated circuits are microscopic implants on the surface of a silicon wafer. One advantage of IC converters is that they have a high degree of accuracy. Another advantage an IC has extra built in output circuitry such as a voltage follower. Circuit Discussion. The following R2R Ladder network is different from the one that is in the textbook (see Figure 3- NOTE it has 8 inputs). The changes were necessary for building a simple DAC that doesn t have negative voltages at the output. The digital inputs to the ladder network are held at either 0 VDC or approximately 5.0VDC and are tied to the I/O pins on the Basic Stamp Prototyping board. Figure 2 P0 P15 I/O Pins for the Basic Stamp Figure 1

Due to the construction of the circuit the VRef voltage has a different relationship with the output. Specifically the Vfs voltage approaches to 2/3 of VRef, but it is always one VLSB less that 2/3 VRef. VRef equals the Logic 1 level that can be on the Basic Stamp I/O pins. The Logic 1 voltage is 5VDC and the Logic 0 voltage is 0VDC. 2 VRe f V 3 LSB n 2 1.a.) Use Figure 1 as an example. Calculate DAC Output for 1111 2 in, using super positioning. DAC Out = DAC Out 0001 + DAC Out 0010 + DAC Out 0100 + DAC Out 1000 = 1.b.) Calculate DAC Output for 1000 2 in. 1.c.)Calculate DAC Output for 10012 in. Directions Figure 3 Resistive Ladder D/A Converter. = 5 VDC P1 P0 P1 P0 This resistive ladder network can be used as a D/A converter. The binary number input is sent in parallel as 8-bits across 8 separate data lines, P0 through P7. As long as the value of all eight bits are present at the same time, the output of the D/A converter output will be the intended discrete voltage value.

Step 1. Build it per the circuit is in Figure 3. Vss and Vdd along with the P0 P7 data outputs come from the Circuit board on the Lab robot. Most of the parts will be in the Basic AD kit. Use lab stock for any missing items. Programming for the Digital Signal Source. The digital input will come from the Stamp micro controller. It will provide the digital input signals for this Lab. Step 2. Getting the range of values for you specific configuration. Connect the P0-P7 pins of your circuit and load the following program into the microcontroller on the Lab robot. If you are having problems with the programming start with the Your First Program on page 22 of the book from Parallax called Robotics with the Boe Bot. 'Basic Analog and Digital PL4_1R0.bs2 ' Simple DAC with conversion held for 4 seconds ' {$STAMP BS2} ' {$PBASIC 2.5} counter VAR Word n VAR Byte '--------------------------Initialize------------------------- n = 0 OUTPUT 7 OUTPUT 6 OUTPUT 5 OUTPUT 4 OUTPUT 3 OUTPUT 2 OUTPUT 1 OUTPUT 0 OUTL = n DO '----------------------Get Input----------------------------- DEBUG "Enter decimal number between 1-255: " DEBUGIN DEC n ' ---------------Set ports as outputs-----------------------

OUTPUT 7 OUTPUT 6 OUTPUT 5 OUTPUT 4 OUTPUT 3 OUTPUT 2 OUTPUT 1 OUTPUT 0 '----------Display for 4 seconds------------------ FOR counter = 1 TO 200 OUTL = n PAUSE 30 NEXT LOOP The values sent to the resistive ladder network, aka Digital to Analog Converter (DAC) will be referred to as the D value and be expressed in a decimal number. The above program will open a window on the computer screen, the bottom window shows the results sent to the window by the PBASIC command of Debug. The top window is where you enter the D values. 2.a. Set D=0 and send it to the DAC. V (aka,v D0). 2.b. If a a value of 255 was sent to the DAC what voltage would you expect at the output? Set D=255 and send to the DAC. V(aka,VD255). How the measured amount compare with your calculated value Percentage error? What would account for the difference? 2.c. If a a value of 128 was sent to the DAC what voltage would you expect at the output? Set D=128 and send it to the DAC V (aka,v D128). How the measured amount compare with your calculated value Percentage error? What would account for the difference? This will be your reference voltage for the center of the output waveform V 180 Degrees and also equals the magnitude of the signal amplitude (A). 2. d. Calculate the value of VOut Resolution, aka VLSB using the following: V O RES = (V Out D=255 V Out D=0 )/(2 n -1) = (V D255 V D0 )/(2 n -1)

Step 3. Calculate the Y component values and then the value of D required as an input to the DAC to generate an output approximately equal to Y. Use the formula below to calculate the Y component and use Y/V O RES to calculate the D values for the table. The program for the Boe Bot will use the decimal value. Y = A [SIN(X) + 1], where X equals an angle listed in the table below and A the absolute value measured for a D value of 128, VD128. Angle (x) Degrees 0 22.5 45 67.5 90 112.5 135 157.5 180 202.5 225 247.5 270 292.5 315 337.5 Ycomp D YMeasured Percent Error 360 (same as 0) Don t use this as a value in the next program!!!

Step 3. Use the above program and the derived values for D to generate and measure the output voltages. Record the measured D values for the specified analog input. Determine the error percentage for the measured verse he calculated D values. Step 4. After confirming the values for D, Modify the first program to reflect the following code. The vales for D will replace the listed DATA values. Run the program and measure the output voltage with an O-scope (Note: ensure that the scopes ground pin is isolated from building ground). 'Basic Analog and Digital PL4_1R0-8step-Plus.bs2 ' Simple DAC 8-bit DAC Data input. ' {$STAMP BS2} ' {$PBASIC 2.5} OutsideCounter VAR Word n VAR Byte address VAR NIB '--------------------------Initialize------------------------- DATA 0,16,32,48,64,80,96,112,128,144,160,176,192,208,224,240 '--------------------------Run-------------------------------data OUTPUT 7 OUTPUT 6 OUTPUT 5 OUTPUT 4 OUTPUT 3 OUTPUT 2 OUTPUT 1 OUTPUT 0 DO READ address, n address = address + 1 OUTL = n LOOP Even faster replace the + 1 with + 2

Step 5. Draw the output waveform. V AV 0V time Vp = T = F = NOTE: Most of the graphics are from the Parallax Text on Basic Analog and Digital text and from their Robotics with the Boe-Bot text. Significant parts of the text of the Lab are also from those books and Warren Hioki s Lab Manual for telecommunications. Questions: 1. What is the factor that limits the output frequency? 2. What common commercial products change digital information into audio frequency sine waves? 3. What type of IC is a DAC0830. a.) What is it s resolution? b.) What is it s power supply voltage requirements?