Continued experimenting and exploring with coupled pendulums.
This link was of great help: Two coupled pendula
Today worked on python code for the experiment to generate waveforms, and now it is in its final form. Pushed the same to my GitHub repository.
Repeated the experiment in three different ways:
- When both the pendulums oscillate in phase
- When pendulums oscillate out of phase
- When one pendulum is at rest while the other is given oscillations
Now writing a simple GUI to access the code and experiment related information.
( From Monday 21st July 2014 to Sunday, 27th July 2014)
I am happy with the work that I could do this week. Planning and basic set-up of almost all planned experiments for my GSoC project is complete. Gathered the required apparatus and set-ups are ready. Still some work on python programs for these experiments and documentation is to be done. In another week I will be able do complete the work. Then I can focus on polishing the code and finalizing everything.
Things we could do this week…..
Completed python program for using photo-gates for time measurements in various experiments. ( Some issues like timeout error are to be solved)
Started working on an interesting experiment of Helmholtz Resonator.
Wrote a python program to digitize sound resulted from different resonators. With this program it is possible to change the frequency of source and when it matches with the natural frequency of resonator, a loud sound is produced. Tested the code with a bottle ( which resonates at about 200 Hz) and a test tube (which resonates at about 450 Hz).
Python program ( srf3.py) to fetch data from srf module and plot graphs needed some modifications to plot velocity and acceleration graphs. Now the basic program is complete and plots position, velocity and acceleration. Velocity is calculated using numerical differentiation and acceleration is calculated as the second derivative of position with numerical methods. Wrote following code for velocity and acceleration. Committed the entire program to GIT Repo.
- In most of the mechanics experiments we are trying to plot multiple graphs ( position, velocity and acceleration or kinetic energy and potential energy etc.) in one figure. In the figure the axis labels of two graphs are overlapping. These labels should have some spacing between them. Studied different functions available in python. I found tight-layout() function from matplotlib to be very easy and useful. Sometimes it can happen that axis labels or titles (or sometimes even ticklabels) go outside the figure area, and are thus clipped. tight_layout() can prevent this and also adjust spacing between subplots to minimize the overlaps.
- The experiments of resonator and resonance tube are generally performed with tuning forks. Since tuning fork produces very low intensity sound, it is not clearly audible and the frequency is fixed. therefore the length of the resonance pipe must be changed to adjust with the frequency of tuning fork. We used a speaker connected to SQR1 of ExpEYES. frequency of SQR1 can be varied till we get sound of resonance. a wide range of frequencies is available from ExpEYES therefore it is easy to do this experiment with various sizes of tubes and resonators. We used a mic to study the amplitude. Wrote a python program to change frequency of SQR1 and to plot the frequency v/s amplitude graph. The program for frequency response study of pizzo buzzer was already available. Just made few modifications required for this experiment. I did experimental trials with a measuring flask, plastic pipe, conical flask and a round bottom flask. Resonant frequency is between 300Hz to 750 Hz which varies with length of tube and volume of resonator.
Difficulties faced and things TO DO next week….
- I am working on smoothing the graphs using filtering techniques. Wrote a program using Savitzky-Golay filtering ( From this source). I could remove all the errors in the program but not getting the plots. Need to work on it.
- Ultrasonic sensor giving time-out error when used with get-echo program with SQR2 and IN1. It is working fine with SQR1 and SEN. Need to solve this issue.
- Need to write a separate GUI for time, Speed and acceleration measurements using Photo-gates.
- Complete Coupled pendula experimental set-up and python program.
- Continue working on documentation.
Enjoyed setting-up sound resonance experiments. It really fun doing sound experiments with ExpEYES.
Polished the python code written yesterday. Now it is more flexible, user can digitize sound from any source and get the waveform on the screen. Using Xmgrace frequencies can be obtained.
Curve fitting function in the program is not giving correct results. It needs to be corrected.
Also with the new program we can vary the frequency of sound generated by the buzzer and one it matches with the natural frequency of resonator, a loud sound is generated. Used Helmholtz equation to relate frequency with volume.
Tried the code with different vessels, a bottle, a test tube a pipe and a round bottom flask (borrowed from chemistry lab.) Results are amazing.
Here is some useful information: (Source)
Some small whistles are Helmholtz oscillators. The air in the body of a guitar acts almost like a Helmholtz resonator. An ocarina is a slightly more complicated example, because for the higher notes it has several holes. Loudspeaker enclosures often use the Helmholtz resonance of the enclosure to boost the low frequency response. Here we analyse this oscillation, informally at first. Later, we derive the equation for the frequency of the Helmholtz resonance.
The vibration here is due to the ‘springiness’ of air: when you compress it, its pressure increases and it tends to expand back to its original volume. Consider a ‘lump’ of air at the neck of the bottle . The air jet can force this lump of air a little way down the neck, thereby compressing the air inside. That pressure now drives the ‘lump’ of air out but, when it gets to its original position, its momentum takes it on outside the body a small distance. This rarifies the air inside the body, which then sucks the ‘lump’ of air back in. It can thus vibrate like a mass on a spring . The jet of air from your lips is capable of deflecting alternately into the bottle and outside, and that provides the power to keep the oscillation going.