Jump to content

Frequency analyzer built from the new Stellaris Launchpad

Recommended Posts

Actually, I do have the code to display on the top row as well but it does not look too good due to the gaps between the row. I will clean up the codes a bit then release it. Keep in mind that this type of LCD need some delays between commands that could cause the audio mismatch. Thanks.

Link to post
Share on other sites
  • Replies 38
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

From HAD, the Stellaris is not shipping yet "But [EuphonistiHack] works as a software dev for TI and snagged one of the early development units." http://hackaday.com/...aris-launchpad/  

Hey everybody, I don't know if I should make this a new post or just update here, but I just released a pretty heavy duty update to my project.  Let me know what you think!   http://euphonistihack.

Yep! It was originally an MSP430 booster pack, and can be found at https://www.olimex.c...msp-led8x8.html   If I remember right, I was able to find one at either Digikey or Mouser for about $15.  

  • 2 weeks later...

Hey CorB,

I'm going to venture a guess and say you'd be able to modify my code pretty easily to suit your needs.  I don't have a datasheet handy, but if memory serves me right, the ADC peripherals on an lm4f120 have a max sampling rate of 1 MHz,.  To get an upper bound of 100 KHz, you'd want to sample around 200 KHz.  I'm fairly certain that the processor and DSP algorithms I use are good enough to give you a good data rate if you're sampling at that frequency.  Your frequency bins are going to be a bit large though... The maximum FFT size that the CMSIS library allows is 2048, which means your bins are going to be 200,000/2048 wide, or ~100 Hz per bin.  


You're probably going to need to do something fancy for your analog input though.  For one thing, standard microphones aren't normally designed for handling frequencies above ~25 Khz (since we can't hear much audio above that).  You'll also want to be careful in your opamp selection.  It shouldn't be hard to find one that can handle up 100 KHz, but I know the one I used for my project isn't spec'd for it.


The final point to consider is what you're going to be doing with the data.  If you want to take immediate action based on what's happening in a frequency range, you're good.  If you want to keep a record of things happening though, you're probably going to hit memory restrictions real quick.  I have a new version of my code that I'm going to be releasing this week, and the final compiled binary takes up 32,743 bytes of ram.  Note that the chip has 32,768 bytes of ram total.  When doing DSP on a microcontroller, memory gets scarce :/


Hope this helps, and happy hacking :)

Link to post
Share on other sites

Hi Euphonistichack,


Thanks for answering. I am using a pre-amp scheme I have used before for a heterodyne batdetector. Nothing excotic, Options are to use a 40khz ultrasonic transducer (ive used those sucessfully) or to use an electret micro with some additional filtering. Theres many schemes around.


I wont need that many bins in the FFT as I am planning to display the data directly on an LCD and a resolution of 1 bin/khz would deliver enough information to determine the species by. Recording data is indeed not easy unless I would simply store the "footprint" with the data /bin. 


Thanks for confirming the possibility to use the stellaris to do this.




Link to post
Share on other sites

That is correct.  Honestly, though, the only reason I cap it at 80K is because there's no reason to go higher than that in my project.  The hardware is capable of handling higher frequencies, but the larger the maximum value, the more difficult it is to set the value using the touchscreen slider.  You can change the maximum sampling frequency pretty easy in my code by editing a single macro.

Link to post
Share on other sites



Ive tried to load your new project into CCS but it failed. During the import I get an error :


Error: Import failed for project 'freq_analyzer' because its compiler definition is not available. Please install the ARMv5.0 compiler before importing this project.
the led project imported just fine.
Link to post
Share on other sites

bwar... I recently had to update to CCS 5.3 to for an unrelated project.  I'm assuming this will be a common issue, as 5.3 was released pretty recently.  If you want to get up and running right now, updating CCS should fix it.  I think I still have version 4.9 or 4.7 of the compiler somewhere on my build system... I'll see if I can revert the compiler version in my project settings and push that to github.

Link to post
Share on other sites

Well, with 5.3, the CCS guys changed around a bunch of tool names, including the tms470 compiler that is used for the Stellaris line (they now call it the ARMv5 compiler).  That's why you're seeing the "Please install the ARMv5.0 Compiler" message... if it were just that my project was using a newer version of the tms470, CCS would still let you import, but give you a warning.  Since my project is using a compiler with both a different version and a different name from the one you have, it's outright not letting you import the project.  I'll push an update sometime today or tomorrow with the compiler set to the tms470... in the meantime, you can try poking around the .project files in the ccs directory to see if you can find out where the compiler is declared and switch that to whatever you're using.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...