Wednesday, November 11, 2009

Who should Rule Egypt ? من يجب ان يحكم مصر ؟

يجب من يحكم مصر ان يكون دكتور في الهندسة و عالم في التكنولجيا و الالكترونيات و الاتصالات و الكلام ده ، او يكون عالم زي زويل ، لان نهضة الشعوب بالعلم الان و سلاح اي دولة هو العلم الان ، شوفوا الهند و ماليزيا عاملين ازاي ، مش محتاج اتكلم عنهم ، ولازم يكون عارف انه جاي علشان يصحي مصر من الغيبوبة اللي فيها في التعليم و الصحة و المستشفيات التعبانه ويطبق التكنولوجيا فيها و يقوي الصناعه و يستغل الايدي العامله ، و يمحي الفساد ازاي ؟ لان اي رجل عالم في التكنولجيا بيحب العمل و اللي مش هيعمل كويس هيشيله . مينفعش رئيس مصر يكون واحد في الاعلام زي عمرو خالد و بياخد فلوس علشان الكلام ده ، مينفعش هيفيد البلد بايه ؟؟يقدم برامجه علي القنوات المصرية ؟؟ هذا غير مؤهل علميا اطلاقاًًً و كل واحد و ليه مجاله !! مينفعش رئيس مصر يكون اكبر من 55 سنة ، احنا عايزين حد وصل لاعلي الدرجات العلمية في سن صغير وفي منهم كثير . مينفعش نرشح حد من الجيش و يكون كل همه و فكره في زياده مرتبات الظباط و الداخليه وولائه للجيش ،ونسيب التعليم و الصحة يخربوا بقي. هتقولوا عايزين الجيش قوي و بتاع ، اي حد عالم في مجال الصناعة و التكنولجيا هيقدر يزود الجيش باحدث المعدات و ان شاء الله تكون من صناعة بلدنا ولا نحتاج لاي معونات خارجيه .عايزين حد يقفل علي البلد و منشغلش بالنا بالناس اللي حوالينا انتم فاهميني ، حماس و مش عارف ايه ، لازم نركز ان اننا نبقي قوة عظمي و نهتم بحال البلد اكثر . رئيس ايران دكتور مهندس احمد نجاد ، و ايران عملت قمر صناعي و عملت ميكروبروسيسور و عندها مصانع الكترونيات و اتصالات و كل ما تتخيله ، زي ماليزيا ماسكها دكتور .. حاولوا تفهموا بقي !!! عمرنا ما هنتقدم غير لما يمسكنا حد فاهم في الكلام ده ، هيقدر فعلا يوفر لينا تعليم جيد ، و صحة . هتقولوا و الدين و الاخلاق و القيم ؟ قلك كل مشاكلنا تقريباً هي الفقر و الفقر يخلي الناس مش تشتغل و مش تتجوز و ده يخلي الشباب يتحرش ، يتعاطي مخدرات ..إلخ لما نوفر فرص عمل و مصانع ..إلخ هتلاقيهم مسكوا بيت و صانوا انفسهم ، و بطلوا السجاير علشان المصاريف و بدأوا يصلوا ..إلخ عايزين رئيس عالم يقدر يوفر العدالة الاجتماعيه ، مش معقولة شخص معاه عربية مرسيدس 2010 و ياخد بنزين مدعم بنفس سعر البنزين الي بياخده اللي معاه موتوسيكل !!! مش عايزين واسطه ولا محسوبية في التعيينات ، و ياريت بقي كل الناس اللي بقالها اكثر من 50 سنة تقعد معاش و القيادات يبقوا الشباب و هما اللي يمسكوا المناصب و من الشباب اللي واكل فول الصبح ، لانه هو الوحيد اللي بيحس الان لانه هو اللي حاسس بالمعناه و لما يلاقي شاب زيه فقير و كان في نفس وضعه و لا هيتعبر الواسطه و لا المحسوبية .
No need for english translation ,because that topic is written for only Egyptians :).

Wednesday, November 4, 2009

خواطر و حقائق Facts

إن من ابرء و اصدق الصداقات ، هي صداقة الطفولة ، الان احسست بقيمتها ، صداقة لا تعتمد علي المصالح الشخصية و لا اغراض دنياويه ، ليتني اعرف ذلك ، لكنت قتلت الزمن الذي جعلنا نتفارق الان. افتقدكم .. احمد
حب الطفولة من اجمل اللحظات التي يعيشها الانسان ،من منا لم ينس ملامح بنت او ولد كانت تدرس معه في فصله الدراسي ، او بفصله الاخر ، كان الحب هذا هو فقط انك تريد ان تري وجهها ، لم تر الغرائز و الشهوات النور في هذا الوقت ، كل ما تريده هو انك تراها و بكل برائه و خجل تتحدث معها ،فاين انت يا حب الطفولة فينا الان ، لقد اخمدتك الدنيا بملاهيها و لكن كلما طال الزمن ،ستظل الذكريات تُحييك .. لم انساك.. احمد
كلنا زوار في هذه الدنيا ، نقابل ناس و نفارقهم من الطفولة إلي الشيخوخه ، كل شخص قابلناه آثر فيك ايها الانسان ، فهل يتذكر اي انسان كم من الوجوه تعرفت عليها و تحدثت إليها منذ طفولته في المدرسة إلي شيخوخته ؟ هل فقدت اناسي تريد ان تراهم و لا تعرف كيف تصل لهم ؟ هذا هو حال الدنيا ، و كما قال الله عز و جل " و ما الحياة الدنيا إلا متاع الغرور" ، لا تقلق ، سيأتي يوماً نتقابل فيه جميعاً و لكن امام
الله ... احمد

Childhood friendship is the purest friendship ever , Now i feel its value , its a friendship which doesnt depend on Personal interests , nor purposes of secularization, i wish i knew these facts, i would kill the time that made us seperate now, I really missed you .. Ahmed Saleh .

Childhood love , is one of the most beautifull moments that the human live. Im sure no one had forgotton the features face a girl or a guy who was studying was her at the same class or another class . You just want to see her face , The Instincts and desires werent born yet , all you want is just to see her , and with a shy face you wanna talk with her . Where are you Childhood love now, that life killed you by its desires , but whenever the life passes , the memories will make you wake up ... Ahmed Saleh

We are all guests in this world, we meet people and leave them from childhood to old age, everyone we met influenced you, O man, does any human being remember how many faces he met with and talked to them since childhood to old age in school? Have you Lost people and want to see them and do not know how to reach them? This is how bad life is , and as the God Almighty says "and the pleasures of worldly life only vanity," Do not worry, we will meet one day , but under the hands of Allah... Ahmad

Tuesday, October 27, 2009

مرض الشيزوفرنيا !

لا تتعجب من مهندس و هو يتكلم عن الطب ، فاغلب المهندسين يحبون معرفه ما يسمونه بالميكانيزم و معرفه كيف يعمل الجسم ..إلخ من الهرطقات :) .
كثير من الناس في المجتمعات العربية يضحكون علي كلمة شيزوفرنيا و كأنها كلمة تعني انك مجنون رسمياً او انك تعاني من مرض فزيع ! و كما آثار الممثل احمد حلمي في فيلمه اسف علي الازعاج و هو يعاني من هذا المرض و جميع النقاد يقولوا انه اول من اثار هذا الموضوع في السينما المصرية ، و هم لا يعلمون ان فؤاد المهندس في افلامه لا اتذكر اسمها ذكرت الكلمة بين دكتورين اجانب ، يقول واحد للاخر ، شيزوفرنيا ،و الاثنين يختلفوا !
الشيزوفرنيا هو مرض الفصام ، و هو مرض يصيب اي شخص و هو يتوهم بأن هناك شخصيات تتحدث معه و تسمي هذه الاشياء بالضلالات delusion .
النقطه التي ارجحها هو سبب خلل كيميائي في المخ ، حتي ان بعض الادوية توصف عقارات تقلل نسبة الدوبامين في المخ و هذه الادوية تسمي مضادات الذهان Antipsychotic .
و انا اعرف بعض العقارات الناجحه في هذا الامر و الجرعه منها مثل الدوجماتيل 200 قرص يومي ، و عقار البيبريكس و لكنه غالي الثمن ، لا تستغرب كيف اعرف هذه الادوية ؟ لقد قابلت للاسف في حياتي حوالي ثلاث حالات منهم اصدقاء غير قريبين و جيران و هذا ما جعلني ابحث عن المرض و تفاصيله .

النقطة الغريبة في الموضوع هو ان هذه المعلومات تعتبر معلومات هامه ، فالمجتمع الامريكي معظمهم يكونوا عارفين بالمصطلحات الطبية و حتي انواع الامراض ، و لديهم معرفه ليست بكثير ، علي عكس المجتمع العربي ، و المصري بالخصوص ، الذي يفتي كثيراً حتي تجد في العيادات إناس يفتون في مرضهم و هذا ما يجعل الاطباء ضعاف النفوس في استغلالهم ، يجب ان تعرف ما هو مرضك و ما هي الادوية المرجحه له و هذا متوافر علي الانترنت .
Many people just laugh at the word schizophrenia , and they think that your totaly a crazy person when they describe you that ur a schizphornic ! . This sickness has been filmed in a movie called " Asef ala el ez'ag" by ahmed helmy , however the criticizers of the movie said its the first movie in the egyptian cinema which described that sickness , its not true ! . That word has been said in Fouad el mohanes movies , by a Comedy thing . This word is spread in the egyptian community and many people dont know what it really means , and as you know , egyptians like to talk too much and never say the word I DONT KNOW THIS .
Schizophrenia is sickness in the brain , In my humble opinion its a problem in the chemics of the brain , especially the increase in the dopamin , the patient feels or sees some delusions something like that he /she talks with persons that aren't actually there . Medicines are called Antipsychotic are usually described for the treatment of that sickness , which decreases the dopamin in the brain . Something like Dogmatil or Alpiprix which is really an expensive medicine .
The strange point in this topic is that information are really important , and most people in the usa community whatever patients or healty people really know about that sickness or the symptoms , and that's really a good point , unlike here in the egyptian community where patines just take the medicine and they dont know what they actually take or from what they suffer , althought understanding the sickness is the FIRST step to be able to be cured !.

Monday, October 26, 2009

Monday, October 19, 2009

Line Tracking using PID using 89S52

First I'd like to thank So ChikMan From Hong kong HKU, he is a pioneer in control engineering besides, he has repersented his country many times in Robocon contest, he has a great impact on teaching me the theory and operation of PID Control.

Hi, In robocon 2008, i've tried to implement the well-known algorithm in Control engineering the PID ( Proportional -integeral -derivative), I was having a great experience using the microcontroller from ATMEL 89S52 , plus I've already designed a complete board using it at the past years of the contests , and due to low fund, I've used it again. The problem is that uC doesnt have a PWM Hardware module so you've to write your own Software PWM, also it doesnt have an ADC ( anlogue to digital converter), and i've solved this by using a crude way of doing an ADC which is using a compartor like LM324.

The idea is there are 6 sensors (some people uses 8 or 16,or 32! depends on your complexity of design and speed you want to achieve), These sensors will give you the position of the robot from the line which it follows considring that the output from the sensors are Digital , so you've to define some numeric values to enumrate for the posssibilites of the position of the robot on the line to be tracked.

Consider that 1 is the value on white which means your on the line, and 0 is the value when your away from the line. Consider The sensor arrangement as this xxxxxx, let it be L1L2L3R3R2R1
Consider that L3, R3 have been positioned to be on the line , and the other sensors are seprated by 10mm.
The Pid algorithm calculates the error from the feedback element which is our 6 line sensors , when L3,R3 are on the white line, which means the robot is going straight and it also means the the Error is 0, which is our desired value or what's always called in control engineering text books ( Set Point ).
pseudo code :
error = setpoint- measured value .
If you've a control engineering textbook, you will see many figures of the well-known control loop which is familiar to many engineers.
The measured value should be a predfined numeric values because we dont have an ADC here.
We will define it like in the code.

Code List using 89S52

void init_timer0(void)
{
EA=0; // disable gloabl interrupts

TMOD=0x02; // 0000 0010
TH0=0x9B; // Timer values
TL0=0x9B; //
PWM=0;
ET0=1; // Enable timer interrupt 0

EA=1;
}


The Software PWM Code
// Motor1_2 , is the enable pin of the motor for PWM
// pwm_l , r are the values of the PWM which be sent to the motor , from 0 > 11
void timer0(void) interrupt 1 using 0
{
TR0=0;
PWM++;
TL0=0x9B;TF0=0;
if (PWM==11) PWM=0
if (PWM <= pwm_l) Motor1_2=1; else Motor1_2=0; if (PWM <= pwm_r) Motor2_2=1; else Motor2_2=0; TR0=1; }



// Do this in a 20ms (sampling time) control loop

void Line_Track(void)
{
int mpos;
float error,Rate,Deriv,previous_error;
pwm_r_=11;
pwm_l_=11;
TR0=1;
Walk(1); // move forward
if((Sensor_1==0)&&(Sensor_2==0)&&(Sensor_3==0)&&(Sensor_4==0)&&(Sensor_5==0)&&(Sensor_6==0))
{
mpos=0;
}
if ((Sensor_1==1)&&(Sensor_2==1)&&(Sensor_3==1)&&(Sensor_4==1)&&(Sensor_5==1)&&(Sensor_6==1))
{
mpos=0;
}
if ((Sensor_1==0)&&(Sensor_2==0)&&(Sensor_3==1)&&(Sensor_4==0)&&(Sensor_5==0)&&(Sensor_6==0))
{
mpos=-1;
}
if((Sensor_1==0)&&(Sensor_2==0)&&(Sensor_3==0)&&(Sensor_4==1)&&(Sensor_5==0)&&(Sensor_6==0))
{
mpos=1;
}
if((Sensor_1==0)&&(Sensor_2==1)&&(Sensor_3==0)&&(Sensor_4==0)&&(Sensor_5==0)&&(Sensor_6==0))
{
mpos=-2;
}
if((Sensor_1==0)&&(Sensor_2==0)&&(Sensor_3==0)&&(Sensor_4==0)&&(Sensor_5==1)&&(Sensor_6==0))
{
mpos=2;
}
if((Sensor_1==1)&&(Sensor_2==0)&&(Sensor_3==0)&&(Sensor_4==0)&&(Sensor_5==0)&&(Sensor_6==0))
{
mpos=-5;
}
if((Sensor_1==0)&&(Sensor_2==0)&&(Sensor_3==0)&&(Sensor_4==0)&&(Sensor_5==0)&&(Sensor_6==1))
{
mpos=5;
}
if((Sensor_1==0)&&(Sensor_2==1)&&(Sensor_3==1)&&(Sensor_4==0)&&(Sensor_5==0)&&(Sensor_6==0))
{
mpos=-4;
}
if((Sensor_1==0)&&(Sensor_2==0)&&(Sensor_3==0)&&(Sensor_4==1)&&(Sensor_5==1)&&(Sensor_6==0))
{
mpos=-4;
}
if((Sensor_1==0)&&(Sensor_2==0)&&(Sensor_3==0)&&(Sensor_4==1)&&(Sensor_5==1)&&(Sensor_6==1))
{
mpos=3;
}
if((Sensor_1==1)&&(Sensor_2==1)&&(Sensor_3==1)&&(Sensor_4==0)&&(Sensor_5==0)&&(Sensor_6==0))
{
mpos=-3;
}
// PID Equations

error=-mpos; // error = 0 - feedback , 0 is the center
error=error*2.2; // KP*ERROR , Kp=2.2
Rate = error-previous_error;
Deriv = Rate * 2.0; // KD = 2.0
previous_error=error;
error=error+Deriv; // PD Terms

// CUT Terms
// error is negative , robot is going to right
if (error < pwm_r =" plus"> 0){
pwm_r_+= ABS(error);
pwm_l_-=ABS(error);
}
if(pwm_r_>11)pwm_r_=11;
if(pwm_l_>11)pwm_l_=11;


}


Videos

Fast line follower
http://www.youtube.com/watch?v=g2_9nDmEmPo

Doing a task
http://www.youtube.com/watch?v=kiqopmLjFjE



Eng.Ahmed Saleh Mohammed
El Shorouk Acadmey
Electronics and communications engineering department

My Quotes

Ahmed Saleh's Quotes
Written by Ahmed Saleh

1. Electronics Engineering + Computer Science + Mathematics == A Computer scientist
2. Both Gates and Einestien created an evoultion In software and physics, Although they had belived trinity ..etc .
3. Love is a Power measured in the number of pulses of your heart when you see her eyes,its unit is Watt

4. Engineering is the science which i love, but my love to you is another science which adore - Ahmed Saleh

5.My love to you is like blood flowing in my body, if its ended  ÷would die . - Ahmed Saleh

6. If u wanna "Feel" the real love, then "Watch" two blind couples - Ahmed Saleh

7. Physics concern with how things work, chemistery concerns with how things are constructed, mathematics concern with why things actually work. - Ahmed Saleh

8.If you wanna be a very talent designed engineer, Don't put your hands in your poket and design from used materials.

The Start

This blog is mainly about Electronics engineering, and Software Engineering, Also it reflects few viewpoints in my life.