Saturday, July 18, 2015

Log 15 July

Fixed the Ultra_real class from freezing and synced it with the algorithm of Ultra_virtual class. Bifurcated the Ultra_real thread from the Ultra_virtual to improve code efficiency  and speed.
Updated the Readme with link to new video.

Commits:

Tuesday, July 14, 2015

Log July 14

Tested the circuit again today with linear arrangement. The decibel meter held about 1cm above the array showed a 1000 fold increase in comparison to the previous result.

Reasons:

The 1000 fold increase as per my conjecture can be attributed to a code fix wherein instead of sending the phase delays as they are to the transducers as done in the previous trial ,this time i sent the differences in the phase delays. This should make sense ,since all the delays that were computed were done so relative to the transducer closest to the focal point, hence while generating delays since the program at this stage is not multi-threaded it runs sequentially therefore adding up the delays generated at each stage. For example consider a linear array of transducers numbered 0-10, where 0 is excited first and let x0,x1,x2.. and so on be the phase delays computed for each transducer succeeding the 0th transducer relative to the 0th transducer. Therefore the delay x0 is added up with x1 for the 2nd transducer is the phase delays are sent, instead sending the difference of x1-x0 makes the delay for the 2nd transducer as (x0+x1-x0)=x1 which is what is required .

If delays are sent as they are then delay for 2nd transducer = x0+x1
If the difference of x1 and x0 is sent then the delay for the 2nd transducer= x0+(x1-x0)=x1

Therefore by sending the difference the correct phase delay is sent .

Apart from testing ,there were other code fixes included 
commits:

Also added Readme regarding project aim and usage:
commits:

Log July-12,13

Added method to implement Rayleigh-Sommerfeld-Integral

Rayleigh-Sommerfeld Integral

An Integral used to describe the diffraction of light or sound due to many elements constituting an aperture. It gives an almost perfect computation of the radiation pattern on a focal plane parallel to the plane containing the aperture.


The integral models the transducer taking into account everything right from attenuation to frequency.













Saturday, July 11, 2015

LOG - July 11

Today was basically spent on updating the code with other important and vital features .

Features Include:


Near Field Length: 

Method was added to compute the near field length. This is very essential since, ultrasonic waves emitted by transducers show uniform properties and attain maximum sound pressure level just beyond the near field length. Before this due to the intense proximity of the wavelets they tend to interfere among themselves and hence give distorted output,and so any tactile sensation must be programmed to be felt so that they are just beyond this length. Commit: https://github.com/1sand0s/Inter_Haptics/commit/559bcb16a5258592e04fbd6828d752f1a7da8074
 deals with this implementation.

As shown in the diagram , in the nearfield the amplitude variations are very abrupt in contrast with the far field variation.

Diffraction Angle

Added diffraction angle measurement for beam emitted by  a single transducer. This helps in accommodating different  transducers with ease if the need should arise. Commit : https://github.com/1sand0s/Inter_Haptics/commit/9aaf565e007dde547cf4e44d4292e8fb55db4057
deals with this implementation 



Sound Pressure and Acoustic Force 

Added method to dynamically calculate the sound pressure and acoustic force on the canvas at the point where the mouse is currently positioned and display it on the canvas. This helps in speculating and designing the type of array best suited for achieving different results like either a rectangular grid array or an annular array etc. Commit https://github.com/1sand0s/Inter_Haptics/commit/28b4c295b3e49f1143cd5d54c8dfb892dc23a88e 

deals with this implementation 














Friday, July 10, 2015

LOG - JULY 10th

Read up on the concepts required for the grid implementation. Added numerical integration to the code. Depending on the step count( number of terms) ,performance and accuracy required the code chooses the most optimum one suited for the purpose at hand.
Commits :  
https://github.com/1sand0s/Inter_Haptics/commit/4ca5fc5fa3a42b2df267d63afdb12ae493753a8d

1. Trapezoidal 

     Best suited for small step counts and generally when the stress is on performance rather
     than accuracy. Approximates the function curve using trapezoids.


2. Simpson's 1/3

    Best suited when the step count is even. Greater accuracy than that computed using trapezoidal.
    Approximates the function curve using quadratic polynomials(parabolas).



3. Simpson's 3/8

     Best suited when the step count is multiple of 3. Greater accuracy than that of trapezoidal.
     Approximates the function curve using cubic polynomials.

Thursday, July 9, 2015

Trial -1


I tested the circuit today. However , though the transmitters are working and the circuit is executing as it is designed to, no perceivable Haptic sensation was felt.

Possible Reasons


These are some of the possible reasons that might provide a plausible explanation for the failure.

1. I was unable to procure the MAX44250 20V opamp as earlier described , and hence had to resort 
    to the one I had in possession which was 741- 12 V opamp. Therefore since the murata MA40S4S 
    datasheet states the max voltage to be around 20V(peak to peak) for the transmitters, it might be
    possible  that the voltage after amplification fed to the transmitters, being of 12 V range was 
    insufficient for them to emit waves of SPL(sound pressure level)of required amplitude to be felt.

2. Secondly, the present algorithm is designed to calculate phase delays for a line of transmitters
    rather than for a grid and since atleast 16 transmitters are required for the amplitude pertaining to
    the constructive interference to be large enough to be felt, this was nearly impossible to achieve          
     using a line of 16 transmitters ,since as stated by the murata MA40S4S datasheet,they have a 
    directivity of about 60 degrees and hence get heavily damped towards the lateral direction ,
    therefore by the time the wave from the 16th transmitter reaches the first ,its barely strong enough
    to complement to the interference.

Possible Solutions


1. Firstly , replace the present 741 12V opamp with MAX44250 20V opamp and hence increase the      
    supply voltage to the transmitters.

2. Secondly, implement the algorithm for a grid of transmitters thereby cutting short the distance
    each wave has to travel to the point of convergence thereby ensuring the amplitude does not get 
    damped heavily. 

Saturday, July 4, 2015

Circuit :-


555-Timers

We use two 555's to generate the 40KHz square wave and 200Hz square wave, the 40khz is required to excite the transmitter with its resonant frequency of oscillation and 200hz to modulate the 40khz wave so that our hands can feel the pressure point. 
                So basically Tlow for the first 555 producing 200hz is= 1/(2*200hz)=2.5 ms
so 2.5ms=0.69*R1*C, choosing C as 0.1uf, R1=36k ohms approx.In order to get symmetric wave the charging and the discharging time constant of the capacitor should be the same therefore R1=R2=36k ohms, and during charging from 5v source ,both R1 and R2 is in path of C, therefore we bypass R1 with a diode , now the during charging ,C charges only through R2 since the diode acting as short bypasses R1. 
                The same goes for The second 555 timer, except here Tlow =1/(2*40khz)=12.5us,so 
12.5us=0.69*R1*C, choosing C as 0.1uf, R1=180 ohms approx.

AD633

The square wave outputs from the two 555's are then fed into the inputs of AD633 analog multiplier ,which amplitude modulates the two waves, meaning, the amplitude of the carrier(40khz) is modulated with the 200hz wave.

MAX44250

This is an high precision,low noise,minimal dc offset 20V rail-rail op-amp with bandwidth of about 10Mhz well above the required 40Khz. The timers produce an output wave of 5Vp, we need to amplify this to about 20Vp in-order to attain maximum sound pressure level from the transmitters, therefore for non-inverting config 
                                              1+(Rf/Ri)=Vout/Vin, Vin=5Vp,Vout=20Vp,
Therefore 1+(Rf/Ri)=4,or Rf/Ri=3, therefore choosing Rf as 3K ohm and Ri as 1k ohm, we obtain the desired gain.

Clamper

Although the wave is alternating, yet it has a peak voltage of 20V rather than a peak-peak voltage of 20V with peak voltage of 10v, therefore we employ a clamping circuit to increase the negative dc bias, in other words we shift the positive 20V peak ,10V below ,so that we have 10V peak symmetric wave with 20Vp-p


where 'V' is 10V,

BJT Switch

The output from the clamper ,is then fed to the transmitter via a bjt switch monitored by the digital pins of the arduino. When the digital pins are high, they forward bias the p-n junction between the base and emitter respectively therefore allowing collector voltage to reach the emitter or the transmitters.


Finished Circuit, haven't included the base and collector resistance for the transistor due to lack of
clarity, however they must be added or else the 5v supply from the digital pins of arduino will fry the transistors