Tuesday, July 21, 2009

ke alam cemerkap


dah lama rasenye aku berfoya-foya di alam fana ini.. rase nye dah sampai mase aku fikir mase depan aku... bile aku masuk je semester ni, aku rase aku dah cukup matang untuk fikir diri aku dan mase depan yang akan tiba tu.. x lame lg dah aku blaja ni...rasenye aku dah abeskan dekat separuh umur aku sebagai student, memang menuntut ilmu tu satu kewajipan, tapi ilmu itu bukan sekadar dibangku sekolah..ilmu itu datang mase kita menimba pengalaman, bahkan pengalaman itulah ilmu yg aku rase paling berharga dalm menempuh kehidupan di dunia ini.. cukup sakit bile aku dengar ceritera-ceritera dari senior2, yang kononnya sem enam ni susah bangat, bahkan bukan sebior yg bercerita sedemikian, lecturer pon same jugak..adoyai..susat sangat kah? bukan nak kata subjects like robotics, AI, Control system, Industrial networking, and embedded system tu senang, tapi aku rase selagi ade kemahuan disitu ade jalan. x banyak beza dengan kehidupan yang sebenar.. bile difikir-fikirkan, hidup aku sekarang jauh berbeza dengan hidup aku mase mude2 dulu(cewah..=p). tapi memang pon, mase aku kecik2 dulu, nak dapat sepuluh ringgit dalam tangan pon susah, pernah bile masuk mrsm, bile aku dpt duit rm50.00, aku rase cam hidup aku x selamt je, bnyk nye duit aku pegang, tapi rasenye sekarang ni, aku dah x pandang semua tu.. duit cam bukan masalah, mungkin rezeki anak-anak yang Allah kurniakan pada mak aku. tapi rasenye, perubahan itu berlaku dengan segala kepayahan.. macam tu jugak la aku fikir bile blaja dalam kepayahan ni, apa yang penting; Jangan cepat mengalah, berusaha keras tanpa lupa daratan, dan motivasi dari diri sendiri itu sangat penting. cukuplah aku dengar ceritera yang kurang enak pasal sem ni, aku mahu terus maju..

marilah berjuang!!

Q:what's my profession?
me: AUUM!! AUUMM!! AUUMMM!!

Q:apa yg penting?
wonderpets: Kerjasama~!!!

Wednesday, July 15, 2009

misi menyelamat yang gagal..


12.30 mlm: abang aku blk dr pekan mmbawa berita gembira.. dah bersalin...!! alhamdulillah. akhirnya eton dapat ank sulong. aku sgt teruja dan terus follow abg aku melawat eton. waktu tu aku sgt kagum melihat anak eton yang sgt cantek.
1.15 pg: anak eton mula berdiri teguh mencari-cari susu yang penting sebagai sumber tenaga untuk hidup. malangnya eton sgt tidak selesa dengan perlakuan anaknya. dia mengelak utk menyusukan anaknya. mungkin dia x biasa. abag aku cube membantu..
3.00 pg: aku masuk tidur dengan harapan semoga anak yang baru lahir itu hidup sehat.

6.30 pg: aku bangun, terus melawat anak eton. lega rase bile aku tgk die masih sehat..

10.30 pg: aku susukan anak eton. semoga die kenyang.

4.30 ptg: ini entah kali ke brape aku dtg melawat yaton,name yg aku berikan pd ank eton. nmpk mcm masih sehat. bagus la..

malam tu aku tido nyenyak, walaupon aku msh kecewa dgn eton yg masih x reti nak susukan anknya..xpe..aku lupekan seketika..

7.00 pg:"ipin, yaton tu dah terbaring je..dah mati", kata mak.. aku dengar perkataan mati dan aku terus sambung tidur..dlm hati, dah xde rezeki, dah leh nak wat pe....

8.00 pg:"ko klu nak slamatkan yaton masih boleh kot, mata sie masih gerak2", kata akak aku. aku bingkas bangun, segera melawat yaton, kmudian berlari masuk ke rumah, buatkn susu, aku suapkan die susu, aku rase die lapa kot sbb eton x bg susu..sampai abes 2 onz susu aku bg die..yaton dah boleh berdiri.gembire sikit..tapi x lame, die jatuh blk..then aku amek die, letak atas pangku aku dan aku selimutkan..die pon telentok dengan elok je.. "sah!!! ni msti x kne unggun mlm td, nmpk die menggigil...aduyai..ape la yg ang aku wat nih..x prihatin btol, sampai lupe nak wat unggun api..

9.00 pg: aku pndahkan yaton ke tempat lain, bawak die gi tmpt panas, ltk die kat situ, biar die panas..die berdiri, tapi x lame, jatuh terjelepuk lg..rasenye die masih demam kesejukan nih..

10.00 pg: abg aku keluarkn "kecik", die dah tiga bulan, pon mcm demam jugak..bangun dan jatuh semula..aku mula patah semangat, x tau dah nak wat pe lg.. aku kuar jap, pg tgk rambutan kat kebun..sbb mase tu aku nak cari idea utk selamatkan diorg nih..

12.00 t/hr: aku blk, aku tgk yaton makin lemah..abg aku dah bagi susu lg mase aku xde..tgk perut die pon dah besar, nampak sgt dah kekenyangan..tapi die makin lentok..aku rase air yg keluar dr mulut die..sejuk giler..rasenye mmg dah parah nih..dia dah x boleh bangun..sedih giler time tu..kecik plak..aku bwk die pg kat tmpt yg bnyk mknn..aku gembira bile tgk die dah kembali berdiri dan mkn dengan selera..tapi...

12.31 ptg: aku pg tgk yaton, aku tgk anak matanya dah membesar..mmg x salah lg.. die dah mati..!!!! aku mntak maaf sgt dgn yaton..aku dah x mmpu nak wat apa2..nak anta pg klinik kat yongpeng jauh sgt.. harap dosa aku diampunkan tuhan. hari ni aku x berjaya menyelamatkan nyawa makhluk tuhan yang cantek..mintak maaf yaton! mintak maaf eton!!Aku mohon ampun Ya Allah!! aku telah membazirkan nyawa makhluk lain...............................................................................


**********************************************************************************

sejak itu, aku semakin kurang bergiat dgn kambing2..aku hanya dtg menjengah skali skala..pernah juga aku jaga mase diorg mkn kat kebun, tapi rase lain bile kecik juga pergi meninggalkan dunia sehari selepas yaton.. hatiku rapuh..

kenape ni? ape yang x kena?


jawapannya senang: jangan bagi kambing-kambing anda kesejukan...lebih2 lagi yang baru lahir dan masih kecik..susu kne jaga, seelok-eloknya susu ibu die..

bile cuti sem semakin singkat, aku membawa diri lari ke bangi.. semoga aku dapat melupakan mereka yang aku slalu jaga tu.. namun dalam benak hatiku, aku berkata

"andai dapat, kuundurkan masa.."


Saturday, July 11, 2009

kuda hitam_my first line follower



Mini Race Car Background

This project requires combination of knowledge of mechanical, electronics, software, and automation system. Basically, the mini race car will be built by these three basics component:

1. Sensor

2. Motor

3. PIC 16F877A

These are the basic component to develop the project. The basic idea is that, when the sensor detects the line, motor will rotate, causing the race car to move in the desired path. The PIC16F877A will be the brain in controlling the motor, of which the direction the race car will go. Two sets of motor will be use, as right and left motor to enable the race car to turn right or left or even move backwards. We will discuss it more in motor segment.


The sensor technology

In this project, there are many ways in designing the sensor. Many types of sensor can also be used. However, the basic engineering concept is to design a product with minimum cost. Therefore, the most suitable sensor device that we will use is the Infra Red (IR) sensor. To develop these IR sensors, we need IR emitter and IR receiver. These two components will be put side to side in order to enable the IR receiver to receive the emitting signal from IR emitter. In this case, the IR sensors will detect white line. When the sensor detects white or reflective line, it gives low byte (0) to the PIC16F877A, while if it detects black or non reflective surface, it will give high byte (1) to the PIC16F877A.

In this project, we use three sets of IR sensors, which we place it at the middle, right, and left. These three sensors will determine the direction of the motor.



IR sensor mounted at the bottom of the race car

Each set of this sensor is connected to a pair or red LED as indicator. When sensor detects white line, LED will turn OFF. When sensor did not detect white line, the LED will turn ON.

These are the results of the sensor reading.

Sensor

LED

Motor response

Left

Middle

Right

Left

Middle

Right

0

0

0

off

off

off

Go Straight

0

1

1

off

on

on

Turn left

1

1

0

on

on

off

Turn Right

1

1

1

on

on

on

Sharp turn clockwise

Table 1: The result of sensor reading.

This is the concept of a line following robot. We can see that when the middle sensor detects the line, the robot will move forward. This is because the line is in the center of the robot. But when the left sensor or the right sensor detects the black line, this means that the robot have strayed from the line. If the robot strayed to the right, the left sensor will detect the line and the brain will react by turning left to go back to the line. As for the right sensor, it reacts in the opposite way.

Before we can use the sensor, we have to teach the sensor so that it can give us the desired result. Firstly, we have to ensure that the LED will response to the sensor. Secondly, we have to adjust the variable resistor, in order to get the correct distance of the sensor. This is done by looking at the LED. LED should turn off when sensor detects white line. If this does not happen, adjust the variable resistor so that LED will turned off, that means, the sensor is at the correct distance.

We also design the sensor to make sharp turn of the race car. This will happen when the race car strayed from its path, giving high byte (1) to the PIC16F877A from all three sensors. We will discuss more about the motor rotation in the motor section.

Mechanical Parts:

Tamiya Double Gearbox


The Tamiya #70168 double gearbox is a compact unit with two independent motors and gear trains. The kit includes two motors and all gears and parts to build any of the four possible gear ratio configurations (12.7:1, 38:1, 115:1, and 344:1). Although it is not typical, it is possible to assemble each side with different gear ratios. There are two possible output axle locations (for any given gear ratio, only one output location is possible). The output shafts are 3 mm hexagonal axles that are 10 cm (about four inches) from tip to tip. The axles work with of the wheels we carry, giving many options for the race car’s speed.

Tamiya Ball Caster

The Tamiya 70144 ball caster from Tamiya’s educational construction series is a small steel ball that rests on metal rollers inside a plastic housing. The caster can be assembled in two different ways, so that it has a total height of either 25 mm or 35 mm. The kit contains two complete ball casters and various types of mounting screws as well as spacers for small height adjustments.

Tamiya Tire Set

Use the pair of tires in the Tamiya 70145 narrow tire set for mechatronics race car that must make precise movements. With a 58 mm diameter and solid, rounded, 16 mm treads, these wheels will let your robot turn with little friction, even on rough surfaces like carpet.


the program

The programming:

#include

__CONFIG(0x3F32);

void main()

{

/* Sensor: L M R

RD0 RD1 RD2

Traffic light: RD3

sensor

Start button= RB0

Motors: L R

PWM RC1 RC2

RB5 RB7

RB4 RB6

*/ unsigned char j;

TRISB=0b00000001;

PORTB=0b00000000;

TRISC=0b00000000;

PORTC=0b11111111;

TRISD=0b11111111;

PORTD=0b00000000;

for (;;)

{

if (RB0==0) //check start button

break;

}

for(;;)

{

if (RD3==0) //check traffic light sensor

{

PORTB=0b00001111; //stop both motor

j=0b00001111; //save memory

}

else if (RD1==0) //check middle sensor

{

PORTB=0b10011111; //move forward

j=0b10011111; //save memory

}

else if (RD0==0) //check left sensor

{

PORTB=0b10001111; //move right motor

j=0b10001111; //save memory

else if (RD2==0) //check right sensor

{

PORTB=0b00011111; //move left motor

j=0b00011111; //save memory

}

else

{

PORTB=j; //read memory

}

}

}

The figure above is part of the program. If the robot is not moving in the direction that is supposed to, change the value for Port B that is circled in the program above. The four values represent RB7, RB6, RB5 and RB4 respectively. So to change the direction of the right wheel, change the value for RB7 and RB6 (first 2 digit) from 01 to 10. For the left wheel, change the value for RB5 and RB4 (next 2 digit) from 01 to 10. If the value is 00, that means that the motor stops. The value for ‘j’ has to be the same as Port B.


it's simple actually, just follow what cytron tells you to do, download mplab and picc lite, then you can finished the project in less than a week, trust me, but it has to be followed by great deal of efforts!!!


some other pictures of my kuda hitam..


my final product<>


control circuit


this is where u put ur creativity, hide the batteries, make it simple but absolute beauty



<>