Shop OBEX P1 Docs P2 Docs Learn Events
Using the BS2 to make a graphic equilizer - no idea where to start... — Parallax Forums

Using the BS2 to make a graphic equilizer - no idea where to start...

DevezuDevezu Posts: 4
edited 2009-03-13 05:01 in BASIC Stamp
Good day! For a school project, I wanted to make a graphic equalizer using the availible BS2 stamp and BOE. As of now, I have been doing research and learning how to even program the stamp (no previous coding knowlege). However, my research has come up blank as I cannot find any resources on a similar project. What I plan to do is have an audio input (like an iPod through a jack) and have a series of LEDs light up similarly to a graphic equalizer. I would like some info to help me get on the right path and make this project work (using the BS2 stamp)

Comments

  • Brodie677Brodie677 Posts: 2
    edited 2009-02-06 14:26
    You have a few options of how to go about this project.

    1. Don't say your doing a project for school, otherwise people will probably just ignore your post.
    2. I'm not familiar with the peripherals on the BS2 stamp, oh wait it's a PIC16C57C, something seem's fishy here.
    3. Perhaps use one of the dsPIC's from Microchip, the BS2 is just a PIC16C57C from Microchip.

    Your project seems to require quantifying analog signals and making decions based on those quantifications. I have yet to really jump into the dsPIC's from Microchip (I think the dsPIC's are the PIC33 line) but I'd definetly suggest checking those out. It'll cost you probably about $100 for the dev board and a programmer. Then you would have to learn how to program in either C or Assembly, and do surface mount soldering if you want to port the PIC over to a board. These languages give you a lot more power over the CPU architecture that your programming, unlike BASIC, but BASIC is in the sense of the word basic. I'm not making fun of the BASIC Stamp, I think Parallax offers a product that can appeal to a much wider audience then Microchip, through the use of their BASIC compiler and the pre-engineered projects it makes theing easier and faster. You do sacrifice some control you would otherwise have over the target CPU. I don't know exactly how capable the BASIC compiler is for the BS2, and in combination with the capabilities of the PIC16 they use for the Basic Stamp. Looking at it from the angle of a PIC16, I'd say that it doesn't have the necessary peripherals to do the project you mentioned, but it's no like I'm a pro at this stuff either(yet, heh). So in otherwords take everything I've said with a grain of salt.
  • sylvie369sylvie369 Posts: 1,622
    edited 2009-02-06 14:44
    It's not clear from your question whether you simply want a display of the relative volumes of the various frequencies, or you want the device to actually allow you to adjust those volumes. I've never done anything like either of those, but it seems clear to me that they're vastly different projects. I could imagine a Stamp-based device that takes a "snapshot" of the audio input, analyzes it at a number of frequency ranges, and graphically displays the volumes found in each range. The "analyzes it" part is WAY over my head, but I bet that quite a few people here have done something of that sort (I imagine using some external hardware). The relatively slow speed of the Stamp modules would probably mean that you only got a few such snapshots per second, and maybe less than that (depending on how many frequencies you looked at, I'd think), so it wouldn't look like a continuous display, but still more-or-less do what your describing.

    But if you want it to give you the ability to adjust the volumes of those frequencies and re-output the data as real-time audio, that "snapshots" thing is a killer. I often see people here say that the Stamp isn't fast enough to do real-time audio processing, which is of course what a real graphic EQ does.
  • Desy2820Desy2820 Posts: 138
    edited 2009-02-06 23:50
    I'd suggest you approach this is a "color organ" project.· Convert the signal to mono, then divide it·into three bands:· bass, mids and highs.· The Stamp would be at the heart of this project, but will need a lot of external parts.

    Do you have access to some test equipment, especially a function or audio generator and a scope?·

    My suggested approach, use a low-pass filter (bass), band-pass filter (mids), and high-pass filter (highs).· You can google for several op-amp based circuits.· Feed the output of each of these filters into a multi-channel ADC (you shouldn't need a high-bit ADC for this, 8-bit should be fine), read by the Stamp.· This should give you the relative voltage level of each frequency band.· From here, the display method is up to you.

    Understand that your display will be simple and limited, as the Stamp can only process data so quickly, but it should also be a challenging and worthwhile project.· Break it up into simple pieces, get that to work properly, then move on to the next.· I'd start with getting the ADC to work, then your display, finally the filters.

    Depending on your skill level, you may also want to consider adapting an existing color organ kit or project.· Try to tap off just after the filters, in order to feed your ADC.· I think that you'll learn more if you can design and build everything yourself, but I don't know your overall skill level, time frame or budget for this project.·

    Myself, I'm really weak with the analog side of electronics, so I don't think I'll be of much further help with your project, but the other forum members here may be able to help.· Good Luck!·
  • DevezuDevezu Posts: 4
    edited 2009-02-09 12:58
    Thank you very much. However, I am still at a loss - i knew that It was going to be very basic (I plan to only have one row of LEDs compared to the 6-10 a normal equalizer has. However, I do not know how exactly to separate these three bands.
  • remmi870remmi870 Posts: 79
    edited 2009-02-09 21:12
    lookup passive crossover on the internet, you can use caps and inductors to bandpass or crossover frequencys then you just sample the xovered band to give you a display based on the level of output. as a matter of fact, you realy dont need the stamp at all to do this, this topic should go to the sandbox.
  • DevezuDevezu Posts: 4
    edited 2009-02-12 13:02
    Thank you. However, I cannot find any material on how exactly to build a passive crossover (in small scale). Also, I would have liked to use he basic kit to work like a graphic equilizer. I know I can put a strand of lights to pulse to the music, but I want more of like this (like the one on audio systems, bars in WinMedPlayer.1089_1_230.jpeg
  • DevezuDevezu Posts: 4
    edited 2009-02-23 12:36
    BUMP!
  • BriceHBriceH Posts: 10
    edited 2009-02-24 06:03
    This kind of project would be major undertaking in my view. This is how I would start... use a analog to digital converter on the input of the BS...and thats were the problems starts, identifying frequencies from just raw data... or maybe seperating that before the input of the BS? But if you could do that, then you would output that info into an 8 channel digital to analog converter, each channel would have its own frequency information. Like channle 0 being low end bass and so on. Connect a LM3915 to each channel, this is a audio voltage logrithmic led driver chip that will drive 10 led's in the vertical direction like your posted picture. You would have to make sure that the voltage out to this chip are within then decible range... see the pdf for more info.
    The BS does not have enough pins to drive each led seperatly.
    You could probably make a smaller version of this circuit or even maybe multiplexing somehow. Maybe some else could help with that.
    This definatly would NOT be a good choice for a beginer to tackle, allthough I dont think its impossible.
  • stephenwagnerstephenwagner Posts: 147
    edited 2009-02-24 12:59
    I hope this helps:

    http://www.national.com/an/AN/AN-435.pdf

    http://www.geofex.com/Article_Folders/EQs/paramet.htm

    Also google/yahoo "gyrator"

    A gyrator is a simulated inductor made from a capacitor(s) and a resistor(s) and an op-amp.

    When you add a series capacitor to the gyrator, you form a tuned circuit.



    SJW
  • LEDboyLEDboy Posts: 21
    edited 2009-03-13 05:01
    This project is not as difficult as most of us think...infact I did just using the BS2 and OpAmp...you have to use the COUNT comand...but it really is just an over built light organ...i have a video of mine on my myspace page...search my email address toady21_03@yahoo.com and look at videos. I'm in the works of trying the fillters and ADC angal to this as mentioned in an earlier reply. I have a 10 bit ADC from TI and will be building the High-Mid-lLow filters just using a few OpAmps.
Sign In or Register to comment.