GSoC Weekly Report 7

( From Monday 30th June 2014 to Sunday, 6th July 2014)This week was not so much productive since I was little busy in preparing for my travel to France for participating  in RMLL-2014 a free software conference. There I will be conducting a workshop on ExpEYES and will be giving a talk on  ” Exploring the phenomena of Sound and Electromagnetic Induction with ExpEYES”.

This week I continued to do the experimental with Doppler Effect using a pizzo buzzer as a source and a simple mic as a detector. Facing difficulties is calculating apparent frequency in case of oscillating source.

It is easy to calculate Doppler frequency shift in case of a source moving with constant velocity. Both the experimental setups are ready. Created a draft document for experimental procedures. Need to review and finalize the document. Also worked on the required python code to fetch data from detector and get the Doppler Shift.

For accessing Data from all channels of ExpEYES we need a GUI which can plot graphs, something like a data logger. Today I started working on python code to develop a GUI to assess channels A1, A2, IN1, IN2 and SEN. Used the program written by Dr. Ajith Kumar as the base and started developing the code. Spent a lot of time …..happy that the result is awesome…..

datacapture

 

beatslike wave

With this GUI we can fetch data from any channel and save it to a dat file and see the plot in real time. It is time to forget all costly and closed source dataloggers…..ExpEYES can do a better job….most affordable…..open source….respects your freedom….. :) My mentors will be very happy to see this….:)

This week I also  worked on   setup of new experiment to measure velocity of sound in different media. We have mentioned this expt in our GSoC proposal. I have an idea to do this for solids but to find velocity  of sound in liquids appears very difficult.

To Do next week …..
These are incomplete tasks from the current week…I will work on these important things.

  • GUI for experiments with Friction
  • GUI for Doppler Effect
  • Documentation for all these Experiments
  • Python Code for a separate GUI for Plotting data from all channels of ExpEYES.

GSoC Weekly Report 6

The previous week ( From Monday 23rd to Sunday, 29th June 2014) we could setup some new experiments to study the phenomena of Friction and sound.

Submitted the midterm evaluation on June 25th. On 28th midnight at 12.45 am…..got the happiest news that I have successfully passed the Google Summer of Code 2014 – Midterm Evaluation….. awesome moment I was waiting for….. Thanks a million to my mentors for all the guidance, help and encouragement.

Also received message from Payoneer that they have processed my GSoC payment. Now I can order some equipments Like Audio Frequency Oscilloscope and amplifiers for my Project. These equipments will help me to try the experiments and achieve the same with ExpEYES later.

Things We Could Do….

  • Setup an experiment to obtain Lissajous Figures using Square waves with various values of phase difference. Repeated the experiment with sine waves. Phase difference can be added with a capacitor and resistor circuit.
  • Started working on an experimental setup to produce these pattern in 3 Dimensions using Laser and Speakers.
  • Submitted the midterm evaluation report.
  • Completed the  set-up of a mechanics experiment to study conservation of momentum.  Wrote  python code to get the data.
  • Designed an instrument using  a  pulley and a photo-gate to measure acceleration. ( thanks to open educational resources for the idea..)This can be used  for different experiments involving friction.
  • In an experiment  to study oscillations of a loaded spring, we could obtain position time data and plot graph.To determine the spring constant of the given spiral spring we need to measure frequency and time periodic time.I could get this done by fitting the data by using a python code.
  • Set-up for demonstration of Doppler effect is ready. I used A buzzer attached to a spiral spring and made it oscillate in-front of the mic.
  • Prepared the experimental set-up For Doppler Effect. I have used the linear air track and fixed the source of sound on the glider. the emitted sound waves can be detected by a microphone fixed in ExpEYES. We can determine the original frequency of the source using ExpEYES and then the source is set in to motion and again frequency is determined.  A photo-gate is used to measure the speed of the source.
Things To Do Next Week….
  • GUI for experiments with Friction
  • GUI for Doppler Effect
  • Documentation for all these Experiments
  • Python Code for a separate GUI for Plotting data from all channels of ExpEYES.

 

GSoC Weekly Report 5

The past week ( From Monday 16th to Sunday, 22nd June 2014) was really productive in terms of experimental setups and trials with python codes. My mentors offered all the help and guidance and were very  encouraging and helped me to speedup the things….

What We Could Do….

  • Started creating documents for experimental setups and procedures for mechanics experiments and a few sound experiments.
  • Made necessary changes in python programs for using SRF 05 sensor. Did the experiments on linear air track to obtain position -time plots.constant velocitypt graphconstantvelocitypt graphbounce
  • Ordered and received additional Ultrasonic sensors SRF 05. Did the testing work for all ten pieces of srf modules. They all are working good.
  • Wrote three programs for time measurement using photo-gates and explored the use of time measurement functions like r2rtime r2f time and multir2rtime and updated changes to Git repo.
  • On Wednesday, started giving finishing touch to the following experiments…. Frequency of Oscillations of Spiral Spring, Parallel and series combination helical springs and the resulting spring constant, Uniformly accelerated motion on an inclined plane, Conservation of momentum.
  • On Thursday, Continued working on giving finishing touch to the experiments..Had to spend a lot of time with photo-gates. The problem in accessing Light sensors (Photogates) is partially solved……… :) Now I am able to make time measurements using these light sensors.
  • Completed the setup and documentation for Spring oscillations experiments. Here are the screen shots of the experiment with spring oscillations..Screenshot from 2014-06-21 00:04:36Screenshot from 2014-06-20 23:55:05IMG_20140620_234908
  • One more positive development that has happened is…now we are able to access ExpEYES with android phone or tablets….Thanks to Jitin B.P. for this application.I could connect ExpEYES to my Micromax Canvas 4 Phone…the screen shots shows sine waves and square waves connected to different channels…. Now, our dream of providing an open source science pocket lab to every student has come closer to the reality.
  • Screenshot_2014-06-20-22-36-15Screenshot_2014-06-20-22-34-15
  • Wrote and commited some simple python programs required for time measurements and plots to git repo.
  • On Saturday, worked on an experiment to produce Lissajous figures using two square waves. Wrote Program in python and tested the same. Could obtain various Lissajous patterns.In the code we used Capture2 function from ExpEYES library to plot the figures. used two sine waves with a phase difference of 90 degrees.
  • lisawaveslissaellipse
  • On Sunday, continued to work on experiments to produce Lissajous Figures. Generated two square waves with a phase co relation between  them. Used Capture2 function to capture data and plot graphs. The figures are sensitive to phase difference and the ratio of frequencies.These are the patterns obtained……smooth curves can be obtained using sine waves…
  • lisa4lissa7lissa1lissa6lisa3lissa2
Difficulties Faced…
  • I was facing some difficulties in some experiments while using two photo-gates simultaneously for time measurements. The problem is partially solved. Need to fine a good and permanent solution. Ability to use two photo-sensors simultaneously can make many mechanics experiments easy.
  • For spring Oscillations experiment…difficulty in Fitting the curve to get frequency.
  • The smooth Lissajous Figures are expected if we use two sine waves instead of square waves. Working on the module to generate two sine  waves of variable frequency.

To Do………

  • Work on accessing Photo-sensors. Write necessary python code.
  • Write a code for fitting different curves.
  • Create a GUI where user can change the phase between the two waves and can obtain different Lissajous patterns.
  • My Next Step would be to produce these pattern in 3 Dimensions using Laser and Speakers. For this I need an amplifier to drive two speakers. Sine waves and the required phase difference can be obtained from ExpEYES with python code. Aiming at beautiful Laser Show with a lot of science in it…. 🙂
  • Documentation with experimental procedure for the experiments developed.
  • Taking Photos/Videos of set up and also upload screen shots.

Here is my git activity for this week   https://github.com/wavicles/Plugins-for-ExpEYES/commits/master

GSoC Weekly Report 4

This week ( From Monday 9th to Sunday, 15th June 2014) we really accelerated working with experiments and coding.

Constant encouragement and guidance from my mentors, Mario Behling and Dr. Ajith Kumar really helped me to keep going.

What We Could Do….

  • Attempted to use two Ultrasonic sensors simultaneously to detect position. Used two srf05 modules to plot graphs. Both the graphs were out of phase as expected. This is very much useful for momentum transfer  experiments involving collision. Uploaded the code to Github Repo.
  • Explored different methods of determining velocity and acceleration. Used the same set up of linear track in inclined position at about 45 degrees. Allowed vehicle to glide downwards and plotted position-time graph. Got straight line with positive slope as expected. For this used SRF05 module.
  • Then used photo-gate with ExpEYES kit and could make time measurements.
  • Designed a pickup device  for use with photogate. ( Thanks to Open Educational Resources on the web)
  • pickup for accelerationThis can generate a square wave as it passes through photogate. Acceleration can be determined  using the signal generated. Excited to see its working. Some proprietary closed source devices use this method……….( of course they come at a very high cost price). This will result in a very low cost setup
  • This is the photo gate used. (photo from www.expeyes.in)
  • light-barrier

 

 

  • Modified the photo-gate design  so that it will be easy to use with linear air track set-up.
  • Today tried to measure acceleration due to gravity using motion of glider on an inclined plane. Used the pickup i designed yesterday and photo-gate to measure acceleration. The results are very good and are in close agreement with theoretical calculations. For motion on an incline acceleration along the inclined plane is g’ = g sin(theta) where (theta) is the angle on inclination. wrote a small python code using time measurement functions of ExpEYES library.
  • Used these time measurement functions:
      • p.multi_r2rtime(3)  # time for 1 cycle
      • p.multi_r2rtime(3,2)  #time for  4 cycles, 2 rising edges are skipped
  • Now we can do the acceleration due to gravity measurement with two different methods
    1. By using motion sensor …. the data is recorded with uniform time intervals.
    2. By using Photo-gates …… the time intervals are not uniform. time taken for traveling different distances can be measured and data can be used to calculate acceleration.
  • Worked on  plotting 2D graphs using ‘matplotlib’ library.  Matplotlib is a python 2D plotting library which produces publication quality figures in a variety of formats and interactive environments across platforms. I found it to be a very powerful tool for teaching and learning physics.  Wrote code for plotting different graphs useful for mechanics experiments. Here are some screen shots….

ucm and shmgraph2

  • Data ( time and position) obtained from Ultrasonic sensor is stored in a file srf.dat and then plotted. I just moved a piece of paper to and fro, in-front of the sensor. Plot is reasonably good.  In another trial fetched  data from the file and plotted….matplotlib is amazing … :)

srf3graphssrfdataplot

  • Tried plotting Lissajous figures…..this code will be useful for my sound experiments……beautiful yet simple….its python… :)

liss

 

Difficulties Faced
  • Numerical Differentiation for calculation in mechanics
  • Acceleration Graphs  are scattered and lack accuracy in measurement.
  • Calculation of acceleration using Photo-gate and pickup device

To Do Next Week

  • Coming week I will be focusing giving finishing touch to the individual  experiments….
  • Documentation with experimental procedure for the experiments developed
  • Taking Photos/Videos of set up and also upload screen shots.
  • Develop code to Access all the experiments through single GUI
  • Finalize the codes for individual experiments on Github
  • Prepare for mid-term evaluation

 

here is my git activity for this week   https://github.com/wavicles/Plugins-for-ExpEYES/commits/master

GSoC Weekly Report 3

Third week of coding was very much productive.

We could plot position -time and velocity-time graphs using  the time and position data obtained from SRF 05 Sensor. I just moved  a notebook in-front of the sensor, up and down  and could plot position against time . But the plots were little noisy and giving unusable estimates of  the acceleration.

Therefore  I had to spend time to understand some filtering techniques. Google Search led me to the Kalman filter which is is a mathematical method that uses noisy measurements observed over time to produce values that tend to be closer to the true values of the measurements and their associated calculated values. With the inputs from my colleagues at FOSSASIA I could gather some good information about filtering techniques.

Experiment with Spring oscillations is also set up and could generate plots. GUI needs to be created for this experiment.

For experiments with Sound related phenomena we used two microHope boards to convert square wave into a sine wave. Wrote programs for two sound experiments. For reference, Used programs written by Dr. Ajith Kumar, the inventor of ExpEYES.

Tried the experiments with square waves SQR1 and SQR2 from ExpEyes kit. We are also working on preparing a stand alone board which can give variable frequency sine waves. This will be useful in  experiments like interference of sound, phenomena of beats and Lissajous figures.Uploaded these programs to Git repo.

This weeks work in points

  • Written python Codes for following mechanics experiments
  1. Study of One dimensional motion by plotting Position Time Graph
  2. Study of phase relation in graphs using two sensors.
  3. Plotting velocity-time and acceleration-time graph.
  • Code to use Two sensors simultaneously is ready to be tested tested. Used SQR1 and IN1 channels for accessing the second sensor.
  • Experimental set up to determine Spring Constant by method of oscillations is ready. Tested the code.
  • Set up for producing sine waves from square waves is ready. Using two MicroHope kits. We are working on a stand alone kit which can produce two variable sine waves.
  • Tried some filtering techniques for plotting smooth acceleration graphs.

To Do Next Week

  • Set up experiments involving collisions
  • Set-up experiment to determine acceleration due to gravity by motion on incline.
  • Write code for using photo-gates for determination of speed and acceleration.
  • Write code for plotting multiple graphs on a screen.
  • Main Focus Next week will be on completing documents on experimental procedures and uploading them on Gtt.

https://github.com/wavicles/Plugins-for-ExpEYES

GSoC Weekly Report 2

Last week I spent most of my time reading  documentation and tutorials on Git. Now little confident of my Git repository work.

After having  many trials and failed attempts of plotting acceleration graphs,  yesterday got it  working. feeling happy….

Now this program can be used in many experiments  in mechanics.  Spring oscillations experiment is also ready.

Need to polish the programs add user friendly details on the GUI. It will be a good idea If I can add schematic experimental setup on the GUI itself. It will help students to explore these experiments on their own.

This weeks work in points

  • Got the linear air track polished . problem of friction is partially solved.
  • Code to plot position time graph is completely ready. Need to add comments and commit on GITHUB.
  • First success with acceleration time graph. Need to work on GUI
  • Designed three new experiments with sound waves by manual methods.
  • We need TWO sine wave generators. Ajith Sir  has promised to help with the electronic design. Right now could get sine waves fro microcontroller board connected to expeyes. ( the code is from Kishore A)
  • Need to write detailed reports and daily commits.

Next week I must work more on the repository.

Here is the link

https://github.com/wavicles/Plugins-for-ExpEYES

 

GSoC weekly report 1

Its the time to write my first weekly report.
This week I continued working on linear air track. The set up is ready but giving some problems due to friction at some points.

Wrote a program  to access SRF05 ultrasonic sensor and could get the first positive result in my lab  [  at my home 🙂  ].

Ajith sir helped me with a call function ‘srfechotime’ to access srf sensor module.

I’d like to improve it and add many things to it to create  a GUI where all the three graphs ( position, velocity and acceleration ).

This week I could also set up experiment with oscillations of spring. Need to modify the srf code to plot Energy graphs from position.

Need to commit these code lines to Git.

 

Problems/goals

  • Motion sensor got spoiled ( may be due to wrong connection) need to find out the exact reason so that this can be avoided from happening again.
  • There is little friction at some points on linear air track. Need to get it polished.
  • Faced problems in calculating acceleration and plotting it against time.

Since I am a  beginner in the field of programming, I need to work really hard on the following things

  • Get familiar with  Github procedures.
  • Work on Designing GUI using python ( Currently not able to alter the graph scale )
  • Documentation of all experiments in detail.
  • Commenting in the code.