Shop OBEX P1 Docs P2 Docs Learn Events
resonant Frequency — Parallax Forums

resonant Frequency

Brian CarpenterBrian Carpenter Posts: 728
edited 2009-07-27 15:53 in Propeller 1
Hello all,

I have a project where i need the be able to measure the volume inside a box. The box could be nearly full or completely empty of dense objects. The box is sealed when it is closed. The idea is to use 2- 4" woofer speakers. one to generate a frequency and the other to listen.

Now, i have not done anything with sound and the prop as of yet. The way i understand it, i will use the first speaker to output a frequency (pitch). After sending out the signal, i will use the other speaker to listen frequency and measure its amplitude. I will cycle through several frequencies until i find the one that creates the greatest amplitude on the other speaker. If i understand correctly, the frequency that returns the highest amplitude will be the resonant frequency.

Provided the above statements are correct, here are my questions.
I think i can manage the generation of a frequency, but using the Propeller, how do i measure Amplitude of a frequency and compare to other samples?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


It's Only A Stupid Question If You Have Not Googled It First!!

Comments

  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2009-07-26 16:42
    Is measuring Amplitude, in this case, as simple as running the output from the receiving speaker through an ADC and measuring the 'voltage' created. Is that my amplitude?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
    288 x 144 - 3K
  • LeonLeon Posts: 7,620
    edited 2009-07-26 16:46
    Presumably you are hoping to measure the resonant frequency of the box, and infer the volume of the contents from it. It might work if it contained something like sand, but I can't see it working with "objects" that could be located anywhere in the box. Have you checked that the technique will work by modeling the system?

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2009-07-26 16:51
    the objects in the box are all of the same material. Am i correct on the Amplitude = voltage and i can measure it via an adc?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • Mike GreenMike Green Posts: 23,101
    edited 2009-07-26 16:55
    Start here: en.wikipedia.org/wiki/Resonance

    You actually could accomplish this with only one speaker by measuring the current through the speaker coil. As the frequency of the speaker signal approaches the resonant frequency of the box, it will take less and less energy to make the speaker vibrate at that frequency and the current will drop. This technique is commonly used to tune RF transmitters.

    You would measure the output current by putting a small value resistor in series with the speaker and measuring the voltage across it. It's easiest to handle this if you arrange this resistor so one end is grounded. If it's not grounded, you will need an op-amp to take the voltage across the resistor and buffer and ground-reference the signal. Here's an application note: www.maxim-ic.com/appnotes.cfm/an_pk/746/.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-07-26 16:56
    Brian,

    Is the box moving on conveyor or stationary?

    -Phil
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2009-07-26 16:58
    Thanks Mike I will read the links

    @Phil
    The box is stationary

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2009-07-26 18:33
    @Phil,
    Why do you ask? What have you got in mind?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2009-07-26 18:45
    You may find that there are several resonant frequecies. The lowest would be the longest suported node, which would be a diagonal corner to corner. Then higher there would be the longest distance between side walls, etc, etc ...

    That is why folk try to make speakers without any parallel sides. Nice irony to use parrallax though !

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2009-07-26 18:49
    @Mike,
    So, do i understand correctly, that the current for all frequencies except for the resonant frequency will be higher than the resonant?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-07-26 18:52
    Brian,

    There are other ways to measure a box. I was thinking of doing it optically. For example, it could be done with a linescan sensor, like the TSL1401-DB I did for TAOS and Parallax. It's easier if the box is moving, though, since you can get the extra dimension via multiple scans triggered by an incremental encoder coupled to the conveyor.

    Typically, the kinds of questions I ask for such an app would be:

    1. What is the size range of the box (l,w,h)?

    2. How accurate do you have to be?

    3. How fast is the box moving?

    4. What color is the box?

    5. Can you control the lighting?

    -Phil
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2009-07-26 19:00
    At resonance the work required from the cone is reduced and so its impedance appears to rise and can be sampled easily on the ground side, provided that the amp is single sided and not balanced/bridged.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2009-07-26 19:12
    @ Toby

    Could you please help me with a reference to a schematic. I am not understanding

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2009-07-26 20:16
    Resonance will depend on the wavelength of sound in the material that fills the box and also the material's mechanical dissipation properties. That is, the resonant frequency and the Q factor.

    If you already know the size of the box, the resonance could in principle help to decide if the box is full or not and full of what. Or, if you know the material, then resonance could help to find the size. But maybe not both confounded.

    Another technique is to excite the resonant frequency with white noise (like ambient noise excites a seashell), and listen for the primary frequencies that are sustained. Or sweep quickly across the range of frequencies and listen for the sustained notes. That depends on having a high Q factor. (The number of cycles of sustain is roughly equal to the Q). I am thinking of vibrating wire sensors from GEOKON, which monitor the effect of pressure on the tension in a wire. A drive coil "plucks" the wire and then listens for the "guitar string" resonance. The Prop is a great match for those sensors.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • ElectricAyeElectricAye Posts: 4,561
    edited 2009-07-26 20:50
    Phil Pilgrim (PhiPi) said...
    Brian,

    Is the box moving on conveyor or stationary?

    -Phil

    Phil has a point here. You'll have to know your background noise and make sure your signal is discernible from the noise. The rumble of a conveyor, for example, might excite the box in ways unaccounted for by your measuring system. If the walls of the box are too thick, then the air inside might have little to do with how the box responds - instead, you'll just be measuring the box wall vibrations like the ringing of a bell. Much could depend on whether the contents are sometimes touching the walls or always setting only on the bottom, etc.

    It sounds like a complex project. No pun intended.

    smile.gif
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-07-26 21:00
    Oh. I think I may have misunderstood the intent. When you said "the volume inside the box", I thought you meant the total volume, not the leftover volume. 'Couldn't figure out why you wouldn't just measure the outside dimensions. D'oh!

    -Phil
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2009-07-26 21:13
    Yes. The device will be inside the box and measuring the internal volume of the box.

    If i use the in series resistor approach and a 2 channel ADC. (see attached Drawing) Will the formula work?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
    800 x 600 - 27K
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2009-07-26 21:17
    @ Tracy,

    The material in the box will always be the same. And the Empty volume of the box will always be the same. The only variable is the quantity of material in the box

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • lonesocklonesock Posts: 917
    edited 2009-07-27 02:31
    I really like the idea of measuring resonance! One quick note, though, is that whatever driver / sensor you use (in your case both might be a single speaker, or a speaker & microphone combo) will have their own frequency response curve. If you do not characterize both before hand, you may end up learning what the resonant frequencies of the entire system are, which are unlikely to be the same resonant frequencies of just the box.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lonesock
    Piranha are people too.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-07-27 02:48
    Biran,

    Is the material in the box self-leveling, or will the shape of the empty space above the material be different with each one?

    -Phil
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2009-07-27 04:09
    they are bags of material. each bag is the same in volume but they cam be stacked in many different configurations.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • ElectricAyeElectricAye Posts: 4,561
    edited 2009-07-27 04:14
    Phil might know something about this - but I sure don't...

    Seems to me I read something recently about using laser speckle to measure acoustic response of vibrating surfaces. It's probably mind-blowingly complicated, but if such a thing works, maybe you could boom the box and watch its response using a laser???

    just thinking out loud here at a quarter past midnight...


    smurf.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Watching the world pass me by, one photon at a time.
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2009-07-27 05:04
    The box is approx. 90-100 cubic feet in volume. it is steel and very insulated. I want to have a device inside the box to do the measuring

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-07-27 05:14
    Brian,

    Since the shape of the empty volume can vary so much, I have my doubts that measuring a single resonant frequency will give you much information. Imagine the complexities of the human vocal tract and the effect that shape has on the sounds it produces, and you'll get an idea of the problem's difficulty.

    Is the box at all airtight? IOW, if you pumped a known volume of air into it, would it become pressurized?

    Is the density of the stuff in the bags constant? Could you just weigh the box to determine it's percentage of fill?

    -Phil
  • SRLMSRLM Posts: 5,045
    edited 2009-07-27 05:15
    Why not simply give a full project description? Box design and construction, content material type and format, ambient conditions, and so on...
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2009-07-27 05:15
    @ phil
    i am going to send you a email

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2009-07-27 10:36
    The schematic you posted is mostly right in that the sence resistor is on the ground side. The value shown is far too high, 1 Ohm or so would be closer so that power can be put into the loudspeaker. My comments about making sure that the output from the power amp is one sided to ground is so that the bottom of the sence resistor and the vss of the adc/prop are common. Higher power amp often use bridged outputs where both ends of the load are driven in anti phase to get twice the volts and four times the power. If one side of this where earthed then large currents flow, things get hot ...

    This way of volume testing will take a lot of variables like temperature and materials types. If the system does get under way then it might be useful to have a lookup table of various known·loadings. If the load is very damping then any resonance would be stiffled and as already stated the placement pattern would effect everything.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
  • LeonLeon Posts: 7,620
    edited 2009-07-27 10:40
    I still don't see how the proposed technique will work. Weighing the box is how I'd do it.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • kwinnkwinn Posts: 8,697
    edited 2009-07-27 11:47
    Would a speaker and microphone not be simpler. Feed the amplified signal from the microphone back to the speaker and the system will oscillate at the resonant frequency of the enclosure. Measure the frequency and viola.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2009-07-27 15:53
    A room of regular geometrical shape has strong resonances, and one goal of acoustical engineering is to break up those resonances and to adjust the reverberation time of the room. That is done by adding panels, false ceilings, columns, etc. which will each scatter acoustic wavefronts so that the room has so many small resonances and the major resonances are washed out. The materials that the panels are made of determine how much acoustic energy is absorbed and how much is reflected, and that leads to the most fundamental acoustic property of a room, its reverberation time. A room with lots of absorbtion and many interstices will be "dead", whereas a space with many hard flat surfaces will have many overlapping echos or resonances. The lesson here for you is that the interior of the box stacked with sacks of material in various arrangements is effectively making a complex acoustic space with no strong resonance. The sound pattern could tell something about the fill, but the analysis could get complicated.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.