Friday, August 12, 2011

World map with circles art work

I got the following image using "image processing and design toolbox" in Scilab environment to get the color of each pixel in the original image and drawing circles with random diameters. The color of each circle is the color of the pixel coincident with its center. Finally, I exported those circles to scalable vector graphics format which is easy to scale keeping the quality unchanged.


The code is time-consuming, so if I improved the code, I'll post it later. 

Tuesday, August 9, 2011

VAWT mounting layouts

Here you are two layouts for VAWT mounting and the required dimensions to be calculated for each layout. The rotor is drawn as a rectangle just for this schematic and the original rotor shape does not matter.



Monday, July 4, 2011

Spirograph

Spirograph is a geometric drawing toy that produces mathematical curves of the variety technically known as hypotrochoids and epitrochoids. The term has also been used to describe a variety of software applications that display similar curves, and applied to the class of curves that can be produced with the drawing equipment (so in this sense it may be regarded as a synonym of hypotrochoid). The name is a registered trademark of Hasbro, Inc.

The following figure shows the concept and geometric paraeters



The following are some curves drawn by the spirograph code I wrote in Scilab



Friday, July 1, 2011

Force meter with mechanical amplification




The amplification depends on the ratio between areas of pistons. Small force can produce large pointer displacement.

This force meter can work with both compression and tension forces. Also it can work as comparator

The spring here (in this design) will be compressed, but we can modify the design to make it elongating.

Low friction sealing is required for this device

Saturday, April 30, 2011

Controlling dc motor speed using pc

Steps:




[]  Generate a sound wave of certain duration (in my case 10 seconds) with high frequency (say 20000 Hz) using my Scilab toolbox for tone generation.

[] Cut a wire from an old pc headphone including the TRS connector

[]  Connect one end of the dc motor with a diode and the other end of the diode with any wire out from the sound card.

[]  Connect the second wire with the motor

[]  Run the sound file with any media player and control the speed via volume control slider






Note: wave rectification is done by hardware (diode) and is not going to work when done by software
Note: when motor is connected without diode it is not going to rotate and it will behave as a speaker (you can hear songs from the motor!)

Friday, April 29, 2011

Graphical presentation of RGB 3d matrix

When I was using Image Processing and Design toolbox IDP 8.0 in Scilab environment I came over what's called "3d matrix". This 3d matrix is called RGB matrix also. Each pixel in any image requires to be defined 3 information: pixel row, pixel column, and the RGB values of this pixel. So, this matrix defines pixel location and color components. The size of this RGB matrix is M x N x 3 where M is image height in pixels, and N is image width in pixels.




Friday, January 14, 2011

Simulating heat conduction using Scilab

Heat conduction is one of the simplest physical phenomena to simulate as it simply depends on the diffusion equation. I wrote a simple Scilab code that simulates the heat conduction process from a square block using the finite difference method for the spatial discretization and forward Euler (explicit) method for time integration. The code is going to show you how Scilab can be used for simulation and visualization.



  And here you are the code (tested and worked)


//Scilab code for simulating heat conduction to a square block
//Time step
dt=0.05;

//Ambient temperature
T_amb=100;     //degrees in Celcius

//Creat an empty matrix of the temperature
T=[];

//Lower boundary
for i=1:20,
T(i,1)=T_amb;
end

//Upper boundary
for i=1:20,
T(i,20)=T_amb;
end

//left boundary
for j=1:20,
T(1,j)=T_amb;
end

//right boundary
for j=1:20,
T(20,j)=T_amb;
end

for i=2:19,
for j=2:19,
T(i,j)=20;     //Initial condition
end
end

x=1:20;
y=1:20;

show_window(); clf()
f=gcf();
f.color_map=jetcolormap(256);
f.pixmap='on';

colorbar(0,100);
T_new=T;  //use this line to copy boundaries
for counter=1:60,
T=T_new;
for i=2:19,
for j=2:19,
T_new(i,j)=dt*(T(i-1,j)+T(i+1,j)+T(i,j-1)+T(i,j+1)-4*T(i,j))+T(i,j);
end
end
z=T_new;
Sgrayplot(x,y,z, strf="042",rect=[-5 2 25 40], zminmax=[0,100])
show_pixmap();
end

New Curie effect heat engine

I searched a lot for a Curie effect heat engine and found simple layouts that actually can not be called heat engines but toys. I thought about a Curie effect rotational heat engine (not oscillating) and got this result (see figure below). One of the most important features of this engine that it can be driven using concentrated solar energy and so the rotation of the rotor is not going to affect the heat source (like that in the case of using candles).



One important note is when using candles or flames for driving the Curie effect heat engine the magnet itself is going to be affected. Also, the ferromagnetic material used in the engine should have low specific heat and low Curie temperature. I tried to make this engine using a bottle cap and some twist ties and the engine revolved but due to some inaccuracies it did not work later. Also, I faced a problem that we did not have here in Egypt Neodymium magnets. I hope that anyone will use this method will refer to me first (contact me via email).

A method for reversing rotational direction using belts

The following method can be used for reversing rotational direction without using simple gear train (in fact I hate gears as they are costly and require lubrication). I don't think that this method has (or will have) an application, but I expect it may be used in robotic applications where small torques are exist. This method is not going to use the conventional belts but it uses a belt which I call "double-V" belt. The following figures show how to do so.



And the belt is going to be like the following