This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Help with a VERY simple DSP demonstration for students

Hey guys, I'm writing a micro-controller course for university students, and we're using the Tiva C Launchpad as the development platform. As part of the class I want to create a short VERY SIMPLE DSP demonstration/lab. I'd like to make it so that we don't have to add any new hardware (mics, or audio jack inputs) to their lab kits. The goal isn't to really teach anything useful about Digital Signal Processing (they'll have plenty of courses dedicated to that later), just show them how the microcontroller can be used as a tool to do some filtering and what-not. Unfortunately, I don't know much of anything about DSP, or what the microcontroller is really capable of in terms of DSP. I'm having trouble getting some stuff through my head about if my idea for this lab is do-able. And all my searches online result in projects that are far more complex then what I have in mind. I can learn enough to implement the idea later. I'd love some help from anyone out there who can just help me work this through in my head.

My idea: Have the students output wave-forms from a function generator (we already have these in our lab-room) and feed those wave-forms directly into an ADC on the Launchpad. The software on the microcontroller can then run either a low-pass, high-pass, or band-pass filter over that input and output the filtered result to a DAC (already in our lab kits) that students can display on an oscilloscope. Students would change the frequency on the function generator and see where it starts getting filtered on the oscilloscope. We could also generate some noise and see that get filtered as well. Students would be asked to make slight changes to the code to change the filters' cut-off frequencies.

I don't see why this shouldn't be doable, but I'd love some input if you see anything wrong with this idea. (I know its not very exciting, useful, all that taxing on the microcontroller, but I think it gets the point across.) I would also love recommendations for resources on where I can brush up on my DSP knowledge, and ideas about ways we could actually accomplish the filtering.

  • Salute you for including, "simplicity" as a central, design objective.  Our firm - and one prior - have designed, produced & sold similar product to various tech schools, colleges & small industry.

    Cost is rising in importance for all such projects.  And - too often, "unsaid/unrecognized" is the "lost time - and error introduction" brought about by the necessary, "inter-connect" of your described function generator, scope, external DAC and MCU-test board. 

    Should not be too hard to have the MCU serve as the function generator.  This usually would require the addition of a, "plug-in" pcb which would contain DACs, switches and pots.  Indeed software must be added to accommodate - but the function generators could be eliminated - raising the possibility of, "student use of this more complete board outside the classroom!"  (we past found this to be a most compelling Sales/Learning advantage!)

    Bit harder - but still possible - is the scope replacement w/small Graphic Oled or Lcd. Again - student growth/enrichment springs from the extended time/usage possibilities this method provides.  (thinking of smaller displays here - with in-built parallel bus controllers - say 3" (diagonal) or smaller.  In the past we noted scope inventory far below lab-student size - creating an on-going, time/usage block - never good...  (and hereby solved!)

    And - as a fringe benefit - this new, "all in one" assembly may run w/out any need and unwieldy connection to AC power.

    Have comments on efficient introduction of DSP - much already exists - suspect that's best left till you've had the chance to digest & comment upon this writing...  (schools too often {imho} resist change - but the benefits of adopting these suggested methods appear - and have proven - overwhelming...)

  • Josh Ginter said:
    would also love recommendations for resources on where I can brush up on my DSP knowledge, and ideas about ways we could actually accomplish the filtering.

    The ARM CMSIS DSP library can be run on Tiva devices, and includes filter and other DSP functions.

    The Writeup 2: Electric Boogaloo is an example of a project for a Stellaris Launchpad which uses the CMSIS DSP library to process signals from a ADC. The project author is the TI employee Stellaris Jordan who might be able to offer further advice.

  • Chester Gillon said:

    The ARM CMSIS DSP library can be run on Tiva devices, and includes filter and other DSP functions.

    The Writeup 2: Electric Boogaloo is an example of a project for a Stellaris Launchpad which uses the CMSIS DSP library to process signals from a ADC. The project author is the TI employee Stellaris Jordan who might be able to offer further advice.

    Sadly it is not true, at least oficially, until TI releases the App Note about how to set up CMSIS DSP for Tiva C devices. 

    For the moment, if you want to use CMSIS DSp you have to stick with the good old Stellaris libraries...quite sad actually.

    As the poster has realized in this other thread http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/p/261081/1103078.aspx#1103078 

    , Ti member Jordan Stellaris, made all the work, but it has not gone public yet.

    What I can tell you from my experience is that CMSIS DSP works like a charm in Tiva devices with CMSIS v3.20.

    On the other hand, what  want to do is easily achievable, using CMSIS DSP, a uart (with a fast FTDI TTL to USB cable) and a simple app for reciving the data on the PC and show it (or MATLAB).

    Besides if you use the uDMA present in the Tiva C devices, your app will fly on the little ARM M4 core. In some of my apps in the signal processing block, I am doing 3 FFTs (of different sizes), 2 FIR, Windowing and using max, min and sorting functions provided in the CMSIS DSP library. With these techniques (uDMA + CMSIS) I have seen an increase on the performance from 150% (not doable) to 17.6%. 

    Hope this gives you some good view.

  • I just wanted to mention that I managed to build the CMSIS library using the new version of application note (which is out now) and I have the class marks example running right now on a Launchpad.

  • Andreja Kostic said:

    I just wanted to mention that I managed to build the CMSIS library using the new version of application note (which is out now) and I have the class marks example running right now on a Launchpad.

    That is great news for the community!!

    Anyway, I'd recommend to compile CMSIS version 3.20 instead of 3.10 in the app note. 

  • Actually, the application note uses version 3.20.  You can see in the figures that the directory used to store the CMSIS is called CMSIS-SP-00300-r3p2-00rel1, which is from  version 3.20.

    In any case, congratulations are in order for Jordan Wills.

  • This is great news. 

  • It's cool that I got this information on at least one of my threads. But I've started a new one. I'm looking for some advice designing a program to use the FIR-filter function in the library. If you guys get a second I'd appreciate some input. http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/p/316608/1103079.aspx#1103079