+ All Categories
Home > Documents > Dsp2 Adda Demos

Dsp2 Adda Demos

Date post: 14-Apr-2018
Category:
Upload: electrotehnica
View: 229 times
Download: 0 times
Share this document with a friend

of 16

Transcript
  • 7/30/2019 Dsp2 Adda Demos

    1/16

    University of MariborFaculty of Electrical Engineering and Computer ScienceSmetanova ulica 17, 2000 MariborSloveniaINSTITUTE Of ROBOTICS

    October, 2005 ADDA interface card demos

    Authors: Darko Hercog

    Suzana Uran

    dsp2lib version: 1.5.04

    Terminal version: 1.5.5

    MATLAB version: 6.5

    ADDA I n t e r f a ce Ca r d L ib r a r y a n d

    D em o n s t r a t i o n Ex a m p l e s

    Technical Documentation

  • 7/30/2019 Dsp2 Adda Demos

    2/16

    TABLE OF CONTENT i

    TABLE OF CONTENT

    1. ABOUT THIS DOCUMENTATION ....................................................................1

    2. ADDA INTERFACE CARD HARDWARE DESCRIPTION .....................................2

    3. SIMULINK BLOCKS FOR ADDA INTERFACE CARD..........................................4

    ADDA analog input 1...................................................................................... 6ADDA analog input 2...................................................................................... 7ADDA analog output ...................................................................................... 8ADDA DSP-2 Interface block ........................................................................... 9

    4. DEMO EXAMPLES FOR DSP-2 ADDA INTERFACE CARD................................10

    4.1. DEMO EXAMPLE OF DSP-2 LEARNING MODULE AND ADDA INTERFACE CARD .........................10

    5. APPENDIX ..................................................................................................13

  • 7/30/2019 Dsp2 Adda Demos

    3/16

    TABLE OF FIGURES ii

    TABLE OF FIGURES

    Figure 1: photo of ADDA interface card ....................................................................... 2Figure 2: The circuit of the ADDA interface card............................................................ 2Figure 3: photo of DSP-2 learning module, ADDA interface card and custom breadboard .... 3Figure 4: ADDA interface card Simulink library ............................................................. 4Figure 5: ADDA interface card blocks in Simulink Library Browser ................................... 5Figure 6: GUI of ADDA DSP-2 Interface block............................................................... 6Figure 7: GUI of ADDA DSP-2 Interface block............................................................... 7Figure 8: GUI of ADDA DSP-2 Interface block............................................................... 8Figure 9: GUI of ADDA DSP-2 Interface block............................................................... 9Figure 10: ADDA DSP-2 Interface block algorithm......................................................... 9Figure 11: DSP-2 ADDA interface card demos .............................................................10Figure 12: Simulink block scheme of ADDA simple demo example ..................................11

    Figure 13: demo example in DSP Terminal..................................................................12Figure 14: DSP-2 learning module connector...............................................................13

  • 7/30/2019 Dsp2 Adda Demos

    4/16

    CHAPTER 1: ABOUT THIS DOCUMENTATION 1

    1. About this documentation

    In this documentation short hardware description of the ADDA interface card is presented.

    It is assumed that user is familiar with DSP-2 controller, DSP-2 Library for Simulink and DSP

    Terminal. If this is not the case the user is kindly invited to read the documentation which

    could be found on the following internet address:

    http://www.ro.feri.uni-mb.si/projekti/dsp2/documentation.htm

    Related documentation:

    DSP-2 Users Manual

    DSP-2 Library for Simulink Users Manual

    DSP Terminal Users Manual

  • 7/30/2019 Dsp2 Adda Demos

    5/16

    CHAPTER 2: ADDA INTERFACE CARD HARDWARE DESCRIPTION 2

    2. ADDA interface card hardware descript ion

    ADDA interface card (Figure 1) is an interface between D/A converter and two A/D

    converters (A/D 1 and A/D 2) of the DSP-2 learning module. The output of the D/A

    converter is called AO (Analog output). The input for A/D 1 converter is called AI1, and

    similarly the input for A/D 2 converter is called AI2. The +, - and GND pins are power supplypins for power supply needed in the case of active circuits built on the breadboard. + means

    +15 V power supply, - means 15 V power supply, and GND is ground (Figure 14).

    Figure 1: photo of ADDA interface card

    The circuit of the ADDA interface card is shown in Figure 2. It consists of three voltage

    followers (buffers) and 2 resistor dividers.

    Figure 2: The circuit of the ADDA interface card

    Detailed description of DSP-2 connector can be found on page 13.

    The D/A output voltage range is between 0 and 8 V therefore the AO output voltage range is

    the same. The A/D 1 and A/D 2 input voltage range is between 2 V. The allowed input

    voltage range for AI1 and AI2 is between +/- 12 V. The two resistor dividers reduce the

    input voltage range of AI's to the range of A/D inputs.

  • 7/30/2019 Dsp2 Adda Demos

    6/16

    CHAPTER 2: ADDA INTERFACE CARD HARDWARE DESCRIPTION 3

    Figure 3: photo of DSP-2 learning module, ADDA interface card and custom breadboard

  • 7/30/2019 Dsp2 Adda Demos

    7/16

    CHAPTER 3: SIMULINK BLOCKS FOR ADDA INTERFACE CARD 4

    3. Simulink blocks for ADDA interface card

    In this chapter, Simulink blocks for DSP-2 ADDA interface card are described. Blocks are

    placed in DSP-2 ADDA Library (Figure 4). To access this library, enter dsp2addalib in

    MATLAB command window. Blocks are also accessible in Simulink Library Browser underDSP-2 controller -> Plants -> ADDA interface card (Figure 12).

    Figure 4: ADDA interface card Simulink library

  • 7/30/2019 Dsp2 Adda Demos

    8/16

    CHAPTER 3: SIMULINK BLOCKS FOR ADDA INTERFACE CARD 5

    Figure 5: ADDA interface card blocks in Simulink Library Browser

  • 7/30/2019 Dsp2 Adda Demos

    9/16

    CHAPTER 3: SIMULINK BLOCKS FOR ADDA INTERFACE CARD 6

    ADDA analog input 1

    Description: ADDA Analog Input 1 block reads analog voltage at the input port AI1

    (input of A/D 1 converter) of the ADDA interface card. The range of the

    input voltage is +/- 12 V.

    Note: this block should be placed in Simulink model only, ifADDA interface

    card is attached to the DSP-2 learning module.

    Figure 6: GUI of ADDA DSP-2 Interface block

    Parameters: Sample time

    Sample time must be an integer multiple of the base sample time (Fixed

    sample time parameter).

  • 7/30/2019 Dsp2 Adda Demos

    10/16

    CHAPTER 3: SIMULINK BLOCKS FOR ADDA INTERFACE CARD 7

    ADDA analog input 2

    Description: ADDA analog input 2 block reads analog voltage at the input port AI2 (input

    of A/D 1 converter) of the ADDA interface card. The range of the input

    voltage is +/- 12V.

    Note: this block should be placed in Simulink model only, ifADDA interface

    card is attached to the DSP-2 learning module.

    Figure 7: GUI of ADDA DSP-2 Interface block

    Parameters: Sample time

    Sample time must be an integer multiple of the base sample time (Fixed

    sample time parameter).

  • 7/30/2019 Dsp2 Adda Demos

    11/16

    CHAPTER 3: SIMULINK BLOCKS FOR ADDA INTERFACE CARD 8

    ADDA analog output

    Description: ADDA analog output block sets output voltage at AO port of DSP-2 learning

    module (output of D/A converter) to the value specified at the input of the

    block. The range of output voltage is +/- 8 V.

    Note: this block should be placed in Simulink model only, ifADDA interface

    card is attached to the DSP-2 learning module.

    Figure 8: GUI of ADDA DSP-2 Interface block

    Parameters: Sample time

    Sample time must be an integer multiple of the base sample time (Fixed

    sample time parameter).

  • 7/30/2019 Dsp2 Adda Demos

    12/16

    CHAPTER 3: SIMULINK BLOCKS FOR ADDA INTERFACE CARD 9

    ADDA DSP-2 Interface block

    Description: ADDA DSP-2 Interface block contains all blocks that are needed when

    developing algorithm for DSP-2 ADDA interface card (Figure 10). This

    interface block contains ADDA analog output, ADDA analog input 1, ADDAanalog input 1 blocks (Figure 10). Description of these blocks can be found

    on pages 6, 7 and 8.

    Note: this block should be placed in Simulink model only, ifADDA interface

    card is attached to the DSP-2 learning module.

    Figure 9: GUI of ADDA DSP-2 Interface block

    Figure 10: ADDA DSP-2 Interface block algorithm

    Parameters: Sample time

    Sample time must be an integer multiple of the base sample time (Fixed

    sample time parameter).

  • 7/30/2019 Dsp2 Adda Demos

    13/16

    CHAPTER 4: DEMO EXAMPLES FOR DSP-2 ADDA INTERFACE CARD 10

    4. Demo examples for DSP-2 ADDA interface card

    For easier beginning with DSP-2 learning module and ADDA interface card, demonstration

    examples are prepared. All DSP-2 related demonstration examples are placed inside

    MATLAB demos. You can access to DSP-2 demos by typing demos in MATLAB command

    window. In Help window navigate to Blocksets > DSP-2 Library for Simulink > ADDAinterface card (Figure 11).

    Figure 11: DSP-2 ADDA interface card demos

    4.1. Demo example of DSP-2 learning module and ADDA interface card

    After the ADDA simple example is selected in ADDA interface card folder (Figure 11),

    Simulink model shown in Figure 12 will appear.

  • 7/30/2019 Dsp2 Adda Demos

    14/16

    CHAPTER 4: DEMO EXAMPLES FOR DSP-2 ADDA INTERFACE CARD 11

    Figure 12: Simulink block scheme of ADDA simple demo example

    In the left above corner of the Simulink block scheme Edit Parameters, Update Parameters,

    Buildand HELPbuttons exist.

    In order to run demo on DSP-2 controller follow the steps:

    double click Update Parameters button and then

    double click Build button.

    Double click on Buildblock starts the code generation process for the DSP-2 controller from

    Simulink block scheme. When the code generation process is completed, DSP Terminal

    program is automatically invoked and generated code is downloaded to the DSP-2 learning

    module.

    On the ADDA interface card place a wire connection between AO port and AI1 port. In DSP

    Terminal select PG_OUT and AI1. After this, selected signals will appear in Terminal graph

    (Figure 13). Parameter inspector window (Figure 13) enables on-the-fly parameter tuning.

    In this demo example, pulse generator amplitude, pulse generator frequency and both gains

    (AD1_GAIN, AD2_GAIN) are changeable in online mode (meanwhile generated code is

    executing on DSP-2 controller).

    More informations about DSP Terminal can be found in DSP Terminal Users Manual:

    http://www.ro.feri.uni-mb.si/projekti/dsp2/documentation.htm

    Now you can place custom plant between AO, AI1 and AI2 ports.

  • 7/30/2019 Dsp2 Adda Demos

    15/16

    CHAPTER 4: DEMO EXAMPLES FOR DSP-2 ADDA INTERFACE CARD 12

    Figure 13: demo example in DSP Terminal

  • 7/30/2019 Dsp2 Adda Demos

    16/16

    CHAPTER 5: APPENDIX 13

    5. Appendix

    DSP-2 learning module connector

    Figure 14: DSP-2 learning module connector


Recommended