Search for question
Question

Date: Experimental Record You must make notes on your progress through this experiment. You can do this in your own laboratory notebook on paper, or you can make a copy of this digital lab sheet and edit it with your own notes. To make an editable copy of this labsheet: Click File > Make a Copy in this Google Sheet window You can now choose a location in your University Google Drive to save the file. Click on the box underneath the word "Folder" to choose a place to save. If you do not have one already, use this button to make a new folder to store labsheets in, so that you can find them again later: Copy document current roduce iangle x wavefor Name Copy of Workstation Familiarisation 2020.docx Comments and suggestions will be copied over Folder Original documents My Drive EEE126 Circuit Simulation EEE218 ct you r co GEE301 descr ties GTAS e this Capture Device spied Figu lues Select • You can now proceed with the experiment, making notes as you go by directly editing your copy of the document./n1. Aims and Objectives In this project you will be building the following systems: • A digital-to-analogue converter (DAC) formed from a ladder of resistors • A commercial DAC chip to compare with the performance of our own DAC • A simple amplifier to drive a small speaker from the DAC output • Basic spectral analysis of the entire resulting system This is a relatively long project! Do not try to just rush through it all in one lab session or one sitting. It is much better to test and thoroughly understand every subsystem as you build it, than to try and debug the whole project at the end. Notice that in this project, you will be expected to work individually. You may be sharing lab workbenches with another student as you work on your design, but you must each individually complete the lab tasks. 2. Equipment You are required to use your take home lab kits to complete this task. In particular this task will be using the speaker, but almost all other components will have a part to play - if you haven't used it so far, now is the time! 3. What does analogWrite() really do? So far we have created variable voltage outputs from the Arduino Uno by using the analogWrite() function (look back at the solar cell controller or the motor controller to see this). However you may remember that the analogWrite() function does not actually provide a true analogue output. • Construct the following very simple circuit using your Arduino and a single piece of/n• Create a new Arduino sketch and paste in the following code: // Input/Output pins #define PWM1 9 #define INPUTPIN AO // Command interface String inputString void setup() { = "00000000"; pinMode (PWM1, OUTPUT); pinMode (INPUTPIN, INPUT); Serial.begin(9600); } void loop() { // Serial interface if (Serial.available () ) { } inputString = Serial.readStringUntil('\n'); int number = inputString. toInt(); analogWrite (PWM1, number); Serial.println (analogRead (INPUTPIN)); delay(1000); } // End loop This code takes input from the Serial Monitor and then writes any numerical input to an analogue output, using the analogWrite command. Importantly, the Arduino then performs an analogueRead on the output waveform, to try and read back in the analogue voltage produced./nCCEE Individual Construction Project • Use the Serial monitor to send some numbers to the device e.g. ° 0 ° 255 о 127 о 69 ° 180 • What do you observe shown on the Serial Monitor display? Does the reading actually show any relationship to the expected input value? L

Fig: 1

Fig: 2

Fig: 3

Fig: 4