Search This Blog

Wednesday, May 24, 2017

Big science in my Kitchen !

Yesterday while cleaning my kitchen stove, i witnessed a wonderful physical phenomena happening in a complete different way than I would have expected.

A drop/ little blob of water fell into the concave center of the stove plate. The stove was still very hot at a temperature well above the boiling point of water. I knew about the thin layer/cushion of vapor that forms under the water in such case, insulating it from the stove's surface . (Later I found out its called leidenfrost effect) However i didnt expect the oscillations and the geometric patterns associated with it. And immediately my brain got on fire and i started seeing the common snowflake shape and thinking about crystallization of water and its dependency on temperature and humidity but realised quick enough that its the wrong place to start , then thought of the circular grooves in the surface of the stove and the cavity where the water sat as resonance cavities ..
It did not get clear till I learned about normal oscillations happening during the leidenfrost effect which take place at fixed frequencies.

With some degree of confidence one can say that these oscillations are responsible for the shapes seen in my video. Thinking of the water blob as being levitated by the vapor cushion and being excited by sound pressure from the air/vapor layer itself !?
See this video on shape oscillation of a levitated drop in an acoustic field. By W. Ran & S. Fredericks, Clemson university,

Still fascinated with the topic, so i went and recreated the experiment, filmed it and processed the video with imovie (crop, shadows, etc ) then processed it again in matlab and did some macgyvering on the video to get mathematical.
Its clear to me now that the excitation is not related to the acoustics of the environment but somehow  connected to the temperature. The critical temperature for the oscillation to start was above 200 and also above the limit of my IR temperature sensor.

Here is the processed video!

I had no idea how to treat shape oscillations in matlab, but two things came to mind; The peaks in the video and the frequency of the hiss sound i recorded in another video (mobile phone),
Plotting the Peaks would show me the number of modes (or at least that what i think) and the hiss would tell me something about the frequency of the oscillation.
The video processing in matlab was straight forward, creating a video object and getting its parameters then reading it in a struct. later on reading every single frame and getting its grayscale twin .. then calculating and plotting the peaks. Now peaks in matlab is a function of 2 variables, and it does return a 49 x 49 matrix with the maximas and minimas and the surf function displays the peaks in the z axis,  Check the next video for the matlab plot animation.

Now remains the question, what the excitation source excitation and relation to temperature.
A paper published by the American physical society (2012) states in the Abstract that "The geometry of the vapor pocket depends primarily on the drop size not the substrate temperature". In another place its states that "Larger drops have higher modes of amplitude variation. I look again at the plot animation of the peaks in matlab and i see 2 normal/orthogonal modes. Apparently you think of these problems in terms of Eigenvalues and Eigenvectors like good people do. The eigenvalues  representing the resonance frequencies of the amplitude peaks. In the matlab animation i only show the first 50 frames of the normal speed video.

Tuesday, May 16, 2017

Software PWM for the PIC16F84A (gitHub)

Finally got the time to re test the code and publish it to gitHub. Here is a simple implementation of PWM in software using C for PIC MCUs. The files make up MPLAB X project. Check out a previous post with another software implementation of UART functionality. Code here!

Friday, May 5, 2017

5 min to become a Facebook developer!

Here is my first Facebook app /Web integration. It took me exactly 5 min to set it up. (Its really not a big deal if you know your way around JS and HTML).

I got interested in this in order to test the "facebookads" Python package. I have a facebook Music page and it would be nice to start doing some crazy stuff with it :-) 

Start by visiting the Facebook Developer page and follow the straight-forward instructions in how to do that.

Thursday, April 27, 2017

Blynk WEMOS remote messaging & wake up call!

Interaction Design: storyboard -> digital prototype using Marvel

”I prefer drawing to talking. Drawing is faster and leaves less room
for lies.” – Le Corbusier

"Paper prototyping is a great way starting design work, but it's the 
wrong tool for testing. " – Jake Knapp of Google Ventures 

Marvel is ideal for creating fast, click-through prototypes for web and mobile apps. Prototypes can be easily shared through multiple channels, and teams can access and share projects with some of the upgraded plans.

Digital prototype Assignment: Prototyping Interaction by

Saturday, April 8, 2017

Raspberry Pi Web server & static IP trick!

To set a Raspberry Pi web server we need to install the popular web server (Apache).
Apache can serve HTML pages over HTTP but needs additional modules to handle dynamic pages using PHP.

To install Apache on the Pi run the following command in the command line:

sudo apt-get install apache2 apache2-doc apache2-utils
For the additional modules run:
sudo apt-get install libapache2-mod-php5 php-pear php5-xcache
For mysql server /PHP support:
sudo apt-get install php5-mysql mysql-server mysql-client
To test the web server enter in web browser

To give our Pi a static IP address we need to modify /etc/network/interfaces
sudo nano /etc/network/interfaces
and add the static IP information as follows:

iface eth0 inet static
address 192.168.0.x

Now we need to force the dhcpcd daemon to get the IP address we just specified, for that we need to modify/etc/dhcpcd.conf by running the command: 
sudo nano /etc/dhcpcd.conf 

at end of file add the following 
#Static IP address 
interface eth0 
static ip_address = 192.168.0.x 
static routers = 
static domain_name_server =

Saturday, April 1, 2017

Product Design: The Delft Design Approach!

here is my graphical thinking ... i hope it makes the idea more accessible !!

" ..7 modules  .. will take you through the Delft Design Approach. You will have the opportunity to learn about doing user research, defining a design challenge, idea generation, concept development and testing... 
 interesting course at

Friday, March 17, 2017

Low on tech. high on sound! Hard Drive speakers!

 Hard drive speaker connected to a bluetooth amplifier playing a synth sound from iPad.

Thursday, March 2, 2017

ESP8266, Youtube API and Subscriber count.

For this project you need an ESP8266 module with latest AT firmware CLICK HERE
Programming the ESP8266 will be done in the Arduino IDE so go ahead and set up your arduino to communicate with ESP8266 CLICK HERE 
We need the Youtube API arduino library DOWNLOAD FROM HERE
Download the JSON library for Arduino (From the Arduino IDE)
Get your Channel ID 
On your Channel, navigate to Settings -->  Advanced -->  Account Information 
Go to google developers console  and create a new project ---  CLICK HERE

Go to the credentials section and create a new API key

Now in the Arduino IDE navigate to the Youtube API library and open the example 
ChannelStatistics and add your API and channel ID

In the API manager you can view statistics from your projects and  also can check if it all works as expected!

Friday, January 13, 2017

OCD Performance art/Theater, DMX and effects Project Documentation.

It was a great pleasure to be part of a performance/Theater project that took place in Bern last December.  More:

The Egyptian/Swiss performance director Omar Ghayatt (Studio Moroni) approached me with an interesting task; to build a machine that interacts with the solo performer to control light and sound.
I hope that the following sequence of photos, descriptions and video can give a glimpse of the project.

The machine/Generator consists of a pulley system ( 2 pulleys, 30cm & 14cm in diameter) made out of wood.

A single optical encoder to register number of rotations in a forward direction and then send it to the microcontroller.
Nails have been positioned on the inner circumference of the smaller pulley. These nails cross the optical encoder to trigger an interrupt.

A DMX Controller built around Arduino Nano and SN75176 differential bus transceiver .

A program embedded on the microcontroller translates the signal from the optical encoder to DMX and also to a tuned PWM signal to control the Audio cassette player .

The effect of this translation is a fine tuned dimming of the light spot and an audio effect similar to tape recorders slowly running out juce.