## Monday, August 31, 2009

### Auto Car 06 - Output DC Motor Speed Control

Before going into speed control, we will first try to understand the working force behind it. We will use PWM or Pulse Width Modulation. But before going into PWM, we will look into the basics of wave.

Figure of a simple sine wave.

A wave is a signal in any form that can be plotted in terms of time. Periodic wave is a wave that repeats itself to form similar pattern. A periodic wave contains the period (like illustrated) and the amplitude (like illustrated). This sine wave too have the positive half and negative half.

Figure of a square wave.

In PWM, we will only use square wave. Square wave will have another property which is the duty cycle. The duty cycle is the ON time over the period. It is usually written in percentage. Therefore in the picture above, the duty cycle is 50%. By modifying the duty cycle, we are actually modulate the pulse width, thus creating PWM.

The DC average voltage for a certain square wave is given by

DC Voltage = Duty Cycle X Amplitude;

Figure of different duty cycle.

So to control the voltage given to the motor, we modulate the pulse width. For example in the piture above, first wave's duty cycle is 12.5%, so if the amplitude is 6 volts, the resultant voltage is 0.75 V. For the second wave, the duty cycle is 25%, resulting in 1.5 V. Third with 50 % result in 3V and final wave is 75%, result in 4.5 volts.

By modifying the duty cycle, we can modify the output voltage, and based on the previous entry for autocar, we can vary the speed by varying the voltage applied to the dc motor.

All the post on auto car can be viewed by clicking on the project label on the right side of the blog.

## Sunday, August 30, 2009

List of homework:

- Engineering Mathematics
- Differential Equation Assignment
- Control Assignment
- Creative Thinking Essay (Nation's Wealth Contribute to Creative Thinkers)
- Creative Thinking Assignment (Method of Creating New Idea)
- Creative Thinking Activity (Activity that Enhances Creativity)

It is just after the test season, then come the assignment season. As they say 'it never rains but it pours'. As for the activities, suddenly, everything halts. Auto Car is almost complete, just need some minor tweaking. Mechanism assignment is also finished, just need to change the position of a limit switch and rearrange the breadboard. Suddenly feel like nothing to do.

## Wednesday, August 19, 2009

### Auto Car 05 - Output DC Motor

This is going to be a short post because it is a simple actuator. A Direct Current Motor (DC Motor). DC motor is a transducer to transfer from electrical energy to kinetic energy.

DC Motor consists of 2 pin. If you put one pin with + voltage and another with 0 voltage, it will turn one side and if you reverse the poles, it will turn the other side. Simple.

Another concept of DC Motor is the speed. If you want the speed to be faster, just put in more voltage. Ideally you can put as much voltage to a DC Motor to produce very high speed.

If you put the voltage to a certain voltage (we put it as D volts), it will produce S radian per seconds (rad/s is a unit for angular speed). If we put D volts but there is a load, it will produce a speed less than S rad/s, the motor will keep on drawing more and more current until it reach S rad/s.

Therefore, if the load is significantly large, if you still put D voltage, the motor still won't move but it will keep on drawing current. If the voltage is increased, until a threshold, the current will be very large and the motor will burn.

The nature of a DC motor to reach the required speed according to the voltage given by drawing more current is considered an Integrator.

In the auto car, we will control the direction and speed. Direction can be controlled by a motor driver and speed will be controlled by PWM.

## Thursday, August 13, 2009

### Auto Car 04 - Input Infra Red 02

In this part, we shall look into analog and digital and how to change our infra red signal into digital form.

Figure of example of Analog.

Analog is something that has a continuous value like height of a human, weight, where the value if placed in a range. Some of the stuff the stuff that uses analog is the cassette and film camera. Our Infra Red Signal Output too is an analog value.

Figure of example of discrete.

Discrete which is different from Analog, is a system which has values that is fixed like Number of Member in a Family, Blood Type, Number of Rooms in a House. This is not a digital value but it can be used to transform from Analog to Digital in Z-Transform which involves Digital Control.

Figure of example of Digital.

While Digital is a system where it can only posses 0 and 1. 0 means NO, or LOW, or OFF while 1 means YES, or HIGH, or ON.

Next, we shall move on to the Infra Red.

Figure of When facing the Black Surface.

This figure shows the ray when hitting Black surface, which is our line in the field. When it hit black line, it will be absorbed and leave less ray back to the receiver.

Figure of When facing the White Surface.

While in this figure, then ray hits a white surface and it could reflect almost all of the ray. Therefore the receiver will receive maximum ray.

Figure of Signal Voltage versus Ray Brightness.

This is the graph of signal voltage produced when hitting different surfaces. In 'a', the surface is black thus it will produce Higher Voltage. In 'b', the surface is white, thus producing Lower Voltage. This Graph is only applicable for this type of connection. If the 4.7kOhm resistor and IR Receiver is switched place, it will produce different graph.

Figure of the analogy of Operational Amplifier as a Comparator.

So to produce a '1' on black surface and '0' on white surface, we need an Operational Amplifier as a Comparator. In this mode, we shall take the input as Digital. So we need to convert Black into '1' and White into '0' although the Signal Voltage is an Analog Value.

In the figure, when Operational Amplifier act as a Comparator (and only comparator, the diagram is applicable). When 'a' voltage is higher than 'b' voltage, the hand will turn on the upper part switch thus letting the voltage at the upper part to flow to the output. On the contrary, when 'b' voltage is higher than 'a' voltage, the hand will turn down to switch on the lower part switch thus making the voltage at the lower part flow to the output.

Figure of the Comparator.

Therefore, the Digital is actually coming from 0 Volt and 5 volts in the Operational Amplifier. Anything from Black to 50% Gray will produce 5 volts at the output (HIGH) and anything from 50% Gray to White will produce 0 volt at the output (LOW). the gray value is 50% because we are using 2.5Volts comparing value.

This shall not be confused to Analog to Digital where for example 10 Volts will be converted to 1010 Binary Volts where an Analog to Digital Converter is needed. In our case, it is more like converting a Range to '0' and another range to '1'.

To view previous posts about the Auto Car Project, you could click on the 'Project' Label at the right sidebar.

### The story of a pencil

A boy was watching his grandmother write a letter. At one point he asked: 'Are you writing a story about what we've done? Is it a story about me?’ His grandmother stopped writing her letter and said to her grandson: ‘I am writing about you, actually, but more important than the words is the pencil I’m using. I hope you will be like this pencil when you grow up.’

Intrigued, the boy looked at the pencil. It didn’t seem very special. ‘But it’s just like any other pencil I’ve ever seen!’

'That depends on how you look at things. It has five qualities which, if you manage to hang on them, it will make you a person who is always at peace with the world.

First quality: you are capable of great things, but you must never forget that there is a hand guiding your steps. We call that hand God, and He always guides us according to His will.

Second quality: now and then, I have to stop writing and use a sharpener. That makes the pencil suffer a little, but after wards, he’s much sharper. So you, too, must learn to bear certain pains and sorrows, because they will make you a better person.

Third quality: the pencil always allows us to use an eraser to rub out any mistakes. This means that correcting something we did is not necessarily a bad thing; it helps to keep us on the road to justice.

Fourth quality: what really matters in a pencil is not its wooden exterior, but the graphite inside. So always pay attention to what is happening inside you.

Finally, the pencil’s Fifth quality: it always leaves a mark. in just the same way, you should know that everything you do in life will leave a mark, so try to be conscious of that in your every action.'

Forwarded by Puan Hamizah from UTM International Campus

## Wednesday, August 12, 2009

### Auto Car 03 - Input Infra Red 01

This is the post to discuss about the input section of the auto car. The team provide us with infra red sensors. Actually the eye of the robot is not limited to this only. There are several type like Light Detecting Resistors (or Photocells) and optic sensors (which might costs RM 400.00 each).

Before going further, this is an analogy of how the infra red (IR) sensors will work.

Figure of the analogy of IR sensors

Let's say there is a hand there and the hand wants to push the button so it will be switched on. If the hand is there, it will keep pushing so the switch is closed (electricity will conduct). If the hand is not there, switch will be open (electricity won't conduct).

Figure of symbol for IR transmitter and receiver

In this pair of infra red sensors, when the transmitter emits IR ray, as long as the receiver receives the ray, the electricity will flow in the receiver. Of course in this, the electricity if not measure by ON or OFF like the hand analogy. There is a range from full current to zero current. The current can be any value from zero to the maximum depending on the strength of the IR ray. The stronger the ray, the more current will pass through.

Figure of IR transmitter and receiver connection.

To connect, we will use 5 volts, 330 Ohm resistor and 4.7 kOhm resistor. The signal we are getting is voltage. When the ray is present, meanings the 'switch' is closed, therefore signal will be close to 0 volts. If the ray is absent, the 'switch' is opened, therefore the signal will be close to 5 volts.

Figure of IR transmitter and receiver.

This is the sample of the IR transmitter and receiver. The polarity, '+' and '-' must be connected correctly in the circuit. Shorter leg for transmitter is negative while shorter leg for receiver is positive.

Now the output from the signal is in analog. Meanings the voltage can be ranged from 0 volt to 5 volts. We shall see the way to change the analog signal to digital signal.

### Look to the skies tonight: Annual Perseid meteor shower peaks

July 31, 2009: Earth is entering a stream of dusty debris from Comet Swift-Tuttle, the source of the annual Perseid meteor shower. Although the shower won't peak until August 11th and 12th, the show is already getting underway.

Brian Emfinger of Ozark, Arkansas, photographed this early Perseid just after midnight on Sunday, July 26th:

A Perseid Fireball

"I used an off-the-shelf digital camera to capture this fireball and its smoky trail," says Emfinger. "It was a bright one!"

Don't get too excited, cautions Bill Cooke of NASA's Meteoroid Environment Office. "We're just in the outskirts of the debris stream now. If you go out at night and stare at the sky, you'll probably only see a few Perseids per hour."

This will change, however, as August unfolds.

"Earth passes through the densest part of the debris stream sometime on August 12th. Then, you could see dozens of meteors per hour."

For sky watchers in North America, the watch begins after nightfall on August 11th and continues until sunrise on the 12th. Veteran observers suggest the following strategy: Unfold a blanket on a flat patch of ground. (Note: The middle of your street is not a good choice.) Lie down and look up. Perseids can appear in any part of the sky, their tails all pointing back to the shower's radiant in the constellation Perseus. Get away from city lights if you can.

There is one light you cannot escape on August 12th. The 55% gibbous Moon will glare down from the constellation Aries just next door to the shower's radiant in Perseus. The Moon is beautiful, but don't stare at it. Bright moonlight ruins night vision and it will wipe out any faint Perseids in that part of the sky.

Above: Looking northeast around midnight on August 11th-12th. The red dot is the Perseid radiant. Although Perseid meteors can appear in any part of the sky, all of their tails will point back to the radiant. Image copyright: Spaceweather.com, used with permission.

The Moon is least troublesome during the early evening hours of August 11th. Around 9 to 11 p.m. local time (your local time), both Perseus and the Moon will be hanging low in the north. This low profile reduces lunar glare while positioning the shower's radiant for a nice display of Earthgrazers.

"Earthgrazers are meteors that approach from the horizon and skim the atmosphere overhead like a stone skipping across the surface of a pond," explains Cooke. "They are long, slow and colorful—among the most beautiful of meteors." He notes that an hour of watching may net only a few of these at most, but seeing even one can make the whole night worthwhile.

The Perseids are coming. Enjoy the show.

## Monday, August 10, 2009

### Auto Car 02 - The Task

First of all, before making our auto car, we need to take a look at the task given. Task given by the UTM ROBOCON Team to us minors to enter their team.

Figure of the game field layout. (Click for enlargement)

Specification:
The field will be white and the line will be black.
Base 1 and Base 2 will be 1 cm X 1 cm X 1 cm and are loaded with a ping pong ball.
Center Base will be 5 cm X 5 cm X 1 cm and is empty.

Rules:
1.4) Start zone is at A as in the game field.
1.5) The maximum number of ping pong ball allowed on auto car is 3. Reload is not allowed after the game started.
1.6) Participants' auto car must complete 1 round first before dropping ping pong ball or score center basket.

Points:
1.1) 1 mark will be awarded each time an auto car completes 1 round and passes point A (at own or opponent's side).
1.2) 4 marks will be awarded if an auto car drops ping pong ball from its base (at own side).
1.3) 6 marks will be awarded if an auto car drops ping pong ball at opponent side from its base.
1.4) 7 marks will be awarded if an auto car manages to put a ping pong ball into the center basket.
However this 7 marks will be forfeited in the case of opponent's autocar manage to remove the ping pong ball.

Winner
Participants who manage to collect 10 marks first before 3 minutes game will be declared as the winner. Otherwise, auto car that accumulated the highest mark after 3 minutes game will be declared as the winner.

Taken from the task sheet provided by the ROBOCON Team.

Interpretation:

Continuing from Auto Car 01, it seems that we already have out input and output. The lines on the field is our input. As an analogy, we humans can see where the line goes and go according where we want using our leg. Similarly, our robot need to 'see' where the line is and follow the line. This is called line following robot.

The output would be the motors themselves. We need to have the microC to read or 'see' the line and interpret and go according to the task provided. The device used are already provided by the team. We would just use them.

### Auto Car 01 - An Introduction to Microcontroller

Robotics is a very interesting topic to talk about. One of the famous competition in robotics is ROBOCON organized by Asia Pacific Broadcasting Union (ABU). When we are dealing with robots, it can be divided to the type of control which is autonomous or manual human control.

Robot is like a human which needs parts to survive. The most vital is the brain. Humans without a brain is like zombie. They cannot think, they cannot react to certain impulses, and they cannot decide for their own.

Therefore, the brain in our robot is called a microcontroller.

Figure of simple concept of microcontroller.

Microcontroller or we shall call it microC is actually a integrated circuit (IC) which have a lot of function in it. It can count, determine logic and control the whole process done in the brain. This is what we call Central Processing Unit (CPU). Further divided in the CPU is the Arithmetic and Logic Unit (ALU) and Control Unit (CU). Let's not talk to much about this.

There are a lot of types of microcontroller manufactured by tremendous companies. Like the famous Microchip produces Peripheral Interface Controller (PIC). Others are like 6800 family by Motorola and 8051 by Intel.

Referring to the diagram, a microC will be connected to inputs and outputs. Like our human brain, it needs the basic five senses (sight, taste, feel, hear, smell) and the moving parts (arms, legs, mouth, etc).

In microC, they are not really fortunate to have the basic five senses (although with advance technology, they do can have it). Therefore, we have some simple inputs like limits switches, buttons, sensors, etc. And microC's output is not as good as human's arm and legs (again, advance technology conquers all). They have actuators like motors, light emitting diode, etc.

What controls the output? The microC's CPU of course. With the CPU, microC can determine what type of output we want to have. A simple example is when we push a button, an LED will light on. The microC will read from the input. If the button is pushed, it will light up the LED and if the button is not pushed, the LED will be turned off (this is an example of simple logic).

Of course the auto car's logic is not that simple. It needs more complex algorithm (steps to do things) so it can work nicely.

## Sunday, August 2, 2009

### Sejahtera Malaysia

This is a Soprano Alto Tenor Bass version of Sejahtera Malaysia compiled by Fruity Loop Demo Version. Just some music notes and quite simple.

Kedamaian kemakmuran
Malaysiaku bahagia

Kami junjung cita-cita luhur

Seia sekata sehati sejiwa
Kami setia kami sedia
Berkorban untuk negara

Bersemarak Malaysia tercinta
Kibarkan panji kebesarannya
Kami rela menjaga namamu
Sejahtera Malaysia

The music score belongs to Unit Kebudayaan of Universiti Teknologi Malaysia
And here is the music.

Khinhooi

## Saturday, August 1, 2009

### PPSMI

i think science and mathematics should be taught in English.

it is just much more convenient for further studies or even career.

all the terms outside is in english now.

and i don't think malay will fade just like that.

we have bahasa malaysia for one's sake.
____________________________________________________________

I, out of many would support the use of English in Science and Mathematics. Even the syllabus in UTM itself is in English. The course outcome, the program outcome, program educational outcome, the teachings, the modules and the text books.

When we are out there in the community of science and technology, we are bound to use English because of the exchange and sharing of technology from other country like Japan, German, etc.

So if there is a difference in language, how the information is going to be transferred. Take for example the use of 'feedback' in a simple closed loop control system. In Malay, it would be 'suap balik'. Who in the world from other country would understand that? Not all words are directly translated from English but with much similar spelling.

And who are you to comment on the percent things. And where do you even get the data of 1% every year.

Kita masih belajar Bahasa Malaysia dalam banyak matapelajaran contohnya Seni, Sejarah, Pendidikan Moral, Kemahiran Hidup, Geografi, Akaun, Perdagangan, Muzik (untuk sekolah rendah), BAHASA MALAYSIA, dan lain-lain. Bukankah BAHASA MALAYSIA itu satu subjek yang diwajibkan oleh pelajar untuk lulus untuk mendapat Sijil Pelajaran Malaysia.

Dengan penggunaan Bahasa Malaysia dalam begitu banyak matapelajaran dan kewajiban lulus, saya tidak rasa yang Bahasa Malaysia akan pupus atau hilang ditelan zaman.

Kerajaan kita perlu lihat kepada pandangan rakyat seperti dalam undian dalam blog chedet.co.cc. 86% menyokong penggunaan Bahasa Inggeris dalam pengajaran dan pembelajaran Sains dan Matematik.

Saya menyatakan hujah ini bukan saya prejudis akan penggunaan Bahasa Malaysia. Saya amat bangga dengan Bahasa Malaysia dan negara kita. Tetapi fikirlan demi masa depan negara kita dalam penbangunan teknologi...
_______________________________________________________

This is the matter I would refer to as Utilitarianism Versus Deontology.

This is the theory of action and effect.

Utilitarianism says that no matter what action you take, as long as the effect is good, the action is good too. Example Robin Hood robs the King (is bad) but he gave the money to the poor (makes this a good deed)

Deontology on the other hand says that doesn't matter what is the effect, as long as your action is good, it is considered good.

In my opinion, teaching in Science and Maths is the utilitarianism case and teaching in Malay is the deontology case. Students who is strong in English is capable of fighting in the global market but you need to sacrifice the use of Malays (by a tiny amount) while learning it in Malay will preserve the language as our National Language.

In the other hand, it is the matter of small mind versus big mind. Thinking outside of the box or inside the box.