Sticky Notes

This blog is officially closed. Do check out the new blog at

Thursday, August 25, 2011

Saturday, July 23, 2011

Grand Demo In Conjunction With International ABU ROBOCON 2011

Photo of our assistant manager and sponsors

Manual robot in action

Auto 1 robot
Manual operator trying to score

Auto 2 robot

Again, VIP for the grand demo

Changing side for next match

Preparing, preparating

Demo finished, time for speeches

Our assistant manager giving speech

This is that we aim to achieve in Bangkok

Members in action

Thanks to seniors for coming

Enjoying the food

Well, see you in Bangkok!

Wednesday, July 6, 2011

Thailand ROBOCON 2011

Finals in Thailand is different from Malaysia's. It consists of three match to determine the best is chosen to represent Thailand. Nevertheless, both teams get to represent Thailand because they are the host.

Here are the three matches, between
Dhurakijpundit University and Kamphaengphet Technical College

First match winner: Kamphaengphet Technical College

Second match winner: Dhurakijpundit University

Third match winner: Dhurakijpundit University

Saturday, July 2, 2011

China Best Time is less than 50 seconds

As expected. China game will be extraordinary. Anyway, this is the link to the videos. Of course you may search at Youtube, but the link here is from Youku.

Final: Winner Hua Zhong University of Science and Technology

Semi final: Winner Hua Zhong University of Science and Technology

Quarter final: Winner UESTC

Extraordinary performance by UESTC

Of course more videos are available at Youtube or any China video service provider

Friday, July 1, 2011

Phototransistor Line Finder with Fuzzy Logic Part II

In this discussion, I will write about the role of fuzzy logic in the line finder.

This a bit of introduction to fuzzy logic. It was first proposed by Zadeh; and Mamdani used it as a controller. Where the term Fuzzy Logic Controller came out.

Fuzzy logic is widely used in the field of soft computing and artificial intelligence. Basically there is two type, the Mamdani type and TS type. Let's not get into this.

Fuzzy logic can be used in place of digital logic. Well, we can call it analog logic. Imagine an AND gate using digital logic.
0 X 0 = 0
0 X 1 = 0
1 X 0 = 0
1 X 1 = 1

In analog logic, the example will be:
0.10 X 0.05 = 0.05
0.04 X 0.93 = 0.04
0.84 X 0.20 = 0.20
0.83 X 0.98 = 0.83
(Notice the result was based on MINIMUM function, we can use product function if we like)

Back to the line finder. What is the point of using analog logic, when digital logic could be used. It is used to create analog value from the reading.

So, example (analog range 0(left) to 100(right)):
Instead of 000001, we have 99;
Instead of 001100, we have 48;
Instead of 010000, we have 28;
Instead of 100000, we have 5;
et cetera.

Then why analog value instead of digital value?
Well, firstly, it is the resolution. Digital logic gives only limited resolution but in analog logic, the resolution is much higher. Secondly, using analog logic, better control algorithm could be devised. But in UTM ROBOCON, the control is still in the early stage and the current controller is only sufficient if the robots are straight in the first place.

This concludes the second part.

Wednesday, June 29, 2011

A Tough Competition

This year, it is going to be a tough game. Or Loy Krathong game. Whichever applies. Last year, barely any teams can achieve Robo-Pharaoh but this year, most teams can achieve Loy Krathong.

Is the standard of International ROBOCON is getting higher? Or the game is relatively easy compared to last year.

This is Hong Kong ROBOCON Final Video. Quite fast.

This is Mongolia ROBOCON Video. Quite fast too and with Loy Krathong winning.

And we have yet to see from the grandchampion of ABU ROBOCON, China...

Friday, June 24, 2011

Phototransistor Line Finder with Fuzzy Logic Part I

The secret to a good line following is to have a good sensor. In UTM ROBOCON, we have tried many kinds of sensors.

The first type is IR transmitters and receivers with operational amplifier as comparator. This is the most basic and simple type of line sensors. But this is also the most vulnerable to noise and light intensity changes. It is good to use this under florescent lighting but in spot light, not too good. And this sensor cannot cope with different floor colours. This page provides example of a comparator circuit.

The second type is industrial grade sensors. A good example is the FX301 digital fibre sensors. This type of sensors could easily be obtained from Cytron. This sensor is very common in the recent Malaysia ROBOCON 2011 game. Few teams uses RGB sensors that can detect multiple colour. I think it is a product from Keyence. This sensor is more robust than a IR sensors. The limitation of this sensor and the IR transmitter is that they only provide digital data. In other words, the line position was given in binary.

The third type is a phototransistor / photocell / photodiode sensors. This sensor is very similar to the IR type but the data was fed directly into microcontrollers. Well, this is a bit of history regarding this sensor. It was initially developed in UTM ROBOCON 2009 where the old version uses photocell. Of course there are some limitation in photocell compared to phototransistors or photodiode. Development was halted in UTM ROBOCON 2010 but in 2011, it was revived back. Now with phototransistors version.

With the data directly fed into the microcontroller, line position can be obtained using self designed algorithm. We have tried fuzzy logic and it worked just fine. The advantage of this sensor is they can provide a continuous line position value compared to the first two type. But this sensors is not without disadvantage. They are hyper-ly sensitive to spot light.

Thursday, June 23, 2011

News - UTM won first and second place in the National Robocon 2011 Competition

UTM Robocon Team has once again proved their mettle in the National Robocon 2011 Competition when they secured first and second place in the competition held in the USIM on 13 to 18 June 2011.

ROBOCON is a robot design competition organised by the Ministry of Higher Education (MOHE), Radio Television Malaysia (RTM) and SIRIM Berhad which aims to provide opportunities for university students to develop their potential and creativity in the field of robotics.

The National Robocon 2011 Competition is themed “Hibiscus: Unity for 1 Nation”, in which each team had to create a hibiscus which is our national flower. The team which could build a complete hibiscus in three minutes was given a “Mekar” (Blossom). UTM 2011 Robocon team
consisted of 25 students from the Faculty of Electrical Engineering and Faculty of Mechanical Engineering.

UTM sent three teams to the Robocon 2011 Competition and all the teams qualified for the quarter-final round after winning in their respective groups and the game in the second round. In the semifinals, the UTM B team defeated teams from Multimedia University (MMU) and UTM C team defeated a team from the University of Petronas (UTP).

What is most encouraging is that both winnings achieved the “Mekar”. UTM B team managed to become champion by beating UTM C team at the end by doing “Mekar”.

During the Robocon 2011 Competition, only three teams from UTM were able to do “Mekar” with UTM B doing it six times out of eight games.

As a result, UTM B won a cash prize of RM10, 000, and UTM C winning RM 7,000 as runner-up. UTM B was also selected as the Best Engineering Award winning prizes worth RM 3,000.

The UTM 2011 Robocon team has once again been chosen to represent Malaysia at the International Robocon Competition in Bangkok, Thailand in August 2011.


Grabbed from NewsHub at UTM

Sunday, June 19, 2011

Congratulations to UTM

Champion: UTM B
First Runner up: UTM C
Best Engineering Award: UTM B

Thursday, June 9, 2011

Fuzzy Logic Controller for Motor Speed Control

Basic Setup
Motor speed control is the most important thing in navigation aside good feedback sensors. Here, the fuzzy logic controller is discussed to control the speed of motor.

Basic setup for this controller is a Vexta Brushless motor and a rotary encoder with 500 pulse per revolution. The controller output is actually the pulse width modulation duty cycle for the brushless motor.

The block diagram for the whole system is a position controller, fed into a fuzzy logic controller as speed control and then fed into an integrator before feeding into the vexta motor PWM.

Fuzzy Logic Controller 
To design this fuzzy logic controller, two inputs are needed; the error of speed and the derivative of error of speed. Then rules is developed to decide on the amount of "acceleration" to be fed into the integrator.

A 5 X 5 matrix rule is used to decide on amount of integration. These are few examples:

* IF desired speed to much more than actual speed, AND IF acceleration is zero, THEN integrate more positive value.
* IF desired speed is much less than actual speed, AND IF acceleration is negative, THEN integrate with less negative value.
* IF desired speed is equal to actual speed, AND IF acceleration is zero, THEN integrate with zero value.

A complete list of rules is setup and the typical fuzzy logic controller is designed. Some basic block are the fuzzifier, implication, inferencing, and defuzzifier.

The fuzzy logic controller was successfully implemented to control the speed of a vexta motor. The motion profile is depicted in the diagram below.

Figure 1: Data logged using PIC and MATLAB via RS232 connection.

* The controller will give the desired speed but the acceleration and deceleration profile is not really smooth. Better controller is needed to have a straight ramped acceleration and deceleration profile.
* This controller will give minor pole near the imaginary axis (seen from the oscillation at speed steady state value). This might also caused by quantization error from the encoder. Better filter is required to filter out this noise.

Tuesday, May 31, 2011

Winning Robot Criteria

Just three simple criteria.

1) Stability
- Well, this is the first and most important criteria for a robot.At the beginning, most robot would fail to comply to the stability criterion.
- Usually the culprit is poor sensors, poor actuators and poor algorithms.
- This year's game need a lot of line following and for your information, line following seems to be an easy task, but it is not. It is actually a type of non-linear model where non-linear control is needed. But with proper tuning, it is not impossible.
- For a line following sensors, one of the mistake is to use an operational amplifier as comparator and get the digital value. One of a simple solution is to get an Auto Calibrating Line Sensor from Cytron. But seems Cytron admin does not recommend it for use in ROBOCON due to sensitivity to spot light. It is not easy to design a proper line following sensors. Even industrial grade sensors could not cope with different colour floor
- Another criterion that affects stability is algorithm. It is not easy to create a proper algorithm. Even professionals might make mistakes. Check out this example of computer bug.
2) Reliability
- After stability is tackled, secondly, reliability is the important issue.
- Did you know, in a game in Malaysia ROBOCON 2009, UTMA lost to MMU Cyberjaya due to reliability. An error with the robot occurred making the operator asked for a retry. This gave a big chance for the opponent team to win.
- To tackle this, usually more sensors and more fail safe algorithm is needed.
- For example, instead of one limit switch to detect an object, use two.
- Algorithm need not to be too complex. A simple logic AND (&&) is enough to make sure the robot is fail safe. Which means if both limit switches are clicked, then only the object is really within reach.
3) Speed
-In my opinion, currently, no Malaysian team is ready for the speedster of ABU ROBOCON, any team from China or Vietnam.China complete ABU ROBOCON 2009 in 17 seconds where the fastest record in Malaysia is around 50 seconds. China also complete Mankaura in ABU ROBOCON 2010 within 4 seconds, where the record in Malaysia level is about 10 seconds.
- For a robot to be speedy, they have to sacrifice some stability and reliability.
- To have all three criteria, it takes complex control algorithm, high grade sensors, and good quality actuators. For example, UESCT, champion of ABU ROBOCON 2010 used a high precision motor by MaxonMotor. A set of motor with encoder is not cheap.
- Besides, it takes hard work, perseverance and consistency to win.

Good luck to all for the Malaysia Games.

Saturday, May 21, 2011

ROBOCON Game Theory

Once a senior told, an important theory in ROBOCON, the game theory.

FAILURE (%) = 100% - (PREPARATION(%) / 3)

Therefore, if you only prepared for 100%, your failure rate is 66.67%

How much preparation is needed to have zero failure?
I guess you all can work out the math.

Monday, April 25, 2011

Good Luck in Examination

Wishing all students that are having their examination a good luck!

Monday, April 18, 2011

Implementing Analog PID

Another type of PID is in analog form. There are certain reasons to choose the analog form.One of the reason is it can implement continuous signal. Compared to digital control, the signal for analog is smooth and not discrete.
The controller was implemented in this box where it contains two controller. It has few potentiometer to implement the controller where the gain could be adjusted. By the way, the PID was implemented using operational amplifiers (op-amps). Op amp has all kind of application like linear gain, derivator, integrator, summing junction and the likes. Therefore, op-amps could be easily used to implement the analog controller.
This control box was used to control motors. The signal coming out of the op-amp are not strong enough to actuate motors. In other words, the current from the op-amp is not high enough. Therefore additional circuits need to be used to actuate the motors. Some of the simple circuit is the on-off relay circuit, or a B-Class amplifier.

Wednesday, April 13, 2011

Artificial Intelligence

This is quite an interesting topic to discuss. It does not seems to be a hard topic taking into account our superior technology in computing but it is not as easy as it sounds.

ASIMO was created by Honda and this shows that Man can create Machines no matter what the constrains are.

Artificial Intelligence actually are divided into several parts. And what is interesting about all those parts is, they mimic a human. How human acts, how human decide, how human learns so on and so forth.

Firstly, it is important to have a knowledge representation. Human learns everyday and they built up their knowledge. But how does robot represent the knowledge. How do they know that they knew something. This is the basic in AI where robot need to represent knowledge in form of something. One of the branch in research in this part is the first order predicated logic.

Secondly, human learns. And when human errs, they know it and will not repeat the mistake. Human learns by themselves and sometimes in aid of a teacher. Robot is the same. They need to learn in order to survive. But how do they know what is right and what is wrong? Artificial neural network is one of the research to mimic human learning.

Thirdly, human makes decision. In some points in life, human need to make decision, either it be big or small. For example, what to have for dinner? what to study tonight? what to wear for tomorrow? Robots sometimes need to decide. How much should they actuate to produce a desired outcome? What path should they go to minimize the effort to reach a location? Readers could search for fuzzy logic as a decision maker in this part of AI.

Fourthly, human reproduces and evolves. This idea of evolution was from Charles Darwin. In evolutionary programming, robots need to keep evolving to create the best. This does not necessarily mean that one robot creates another robot but rather the evolution of methods. One of the topic in research is genetic algorithm.

Of course there are many more ways and parts in artificial intelligence, the possibilities is limitless. With on going research in this topic, one can never imagine what will be produced in the future.

[Fuzzy logic was implemented on UTM's robot to decide on the amount of acceleration to achieve a certain speed of robot]Edit: Link to the article.
Picture credit goes to their respective owners in the link of the picture itself.

Thursday, April 7, 2011

Vietnam never fails to surprise

Again, Vietnam did surprise us all. Lac Hong University, having the greatest team in ROBOCON in Vietnam, manage to score the Candle Flame. Seems that Lac Hong will be representing Vietnam again in Bangkok.

Wednesday, March 30, 2011

News - Third Demonstration

Event: Third Demonstration
Date: April 1st, 2011
Time: 5.00 p.m.
Venue: E05 - Faculty of Mechanical Engineering, UTM

Good luck to all members!

Saturday, March 12, 2011

UTM ROBOCON Programming Library

Department of Programming is introducing its open source policy, and with this the UTM ROBOCON programming library could be viewed at Source Forge via this link. You will need SVN to check out the codes.

Note that not all the library will be uploaded and note that uploaded library might be outdated.

The library was released with the GNU General Public License 3.0

Sunday, March 6, 2011

Matrix Keypad

      Matrices is actually a way of interfacing that is commonly used to interface input such as keyboard and also interface output like LED. Matrix keypad applying the concept of matrices to interface multiple input with limited pin count. Imagine the matrices connection for keypad as figure below.

 The circuit has a 4 x 4 = 16 button that connect any two lines at the intersection point @node once it is pressed. In order to detect which button is pressed, for example, you pressed button[1,1] ,you set pin A as output High, and set pin 1 as input, and you will readily detect the the high at pin 1 which indicate that button one is pressed.

Consequently, you can produce a scanning function, that changes any output pin high at a time, and detect one input pin at a time. This scanning function can be perform routinely to scan whether a button is pressed.

Multiple Pressed Detection
      Lets imagine there is three button pressed. The three button is respectively button node (2,B), node (3,B), and node (4,B). So the scanning can be done by applying logic high at output B, and then input 2, 3 and 4 will detect a logic high, thus the button pressed is known.

      Lets imagine again, three more button is pressed, but this time, node (2,B), node (2,C) and node (2,D). The scanning can be done by setting pin 2 as output, and applying logic high at pin 2, with pin B, C and D as input, you will readily detect the three button is pressed.

      But there is a problem with this kind of scanning. This effect is also commonly known as ghosting.

      Let say 4 button is pressed, respectively is node (2,B), node (2,C), node (3,B) and node (3,D). If you apply the scanning method as mention before, you will be able to detect there is four button pressed. But if you leave any button among the four, you will notice that you still detect four button pressed !
This is because all the button that are pressed connect all the lines and row that are connected, thus as long as any one of the row is high, the row or column will also be high.

To overcome this problem, adding extra circuitry will solve the problem easily. By adding an diode in series with all the button side by side is said to solve the problem well enough.
So when the button is released, the diode block the current flow due to reverse bias of the p-n junction inside the diode, thus only button of the specific row is detected.

Using voltage ladder to read button input : Keypad using ADC method
ADC for short stand for Analog-Digital-Converter. To detect button pressed, you can also utilize ADC peripheral which is commonly available in microcontroller. The advantages of using this kind of configuration is that it only use up 1 pin, with condition that pin from the particular microcontroller must support ADC peripheral. This configuration can also be used to detect multiple pressed, but with appropriate value for each resistor. The circuit is shown as below.
But this kind of configuration is nasty as the all the value of the resistor must be different so that every single button pressed will give unique voltage to the microcontroller.
To make life easier, you can also form a 'REAL' resistor ladder.

The connection is as the figure on the left. By this way you can have same value for all resistor and also add as much segment as you like, but be sure not to add too much resistor and 'starve' your microcontroller. The only weakness with this kind of connection is you can only have one button pressed on a time.

So, what are you waiting for, if you want to try one of those method why not go prepare the hardware now after reading such a looooong article. Stay tuned for more updates.

For more information, please visit the link below.
Most of the picture above are also taken from the website below.
You might also find this site informative.

Inspiring Creative and Innovative Minds

Chai Jun Kong
Faculty of Electrical Engineering
Universiti Teknologi Malaysia
Related Posts Plugin for WordPress, Blogger...