Thursday, 9 February 2012

Quiz.

Yesterday I'm doing some quiz on C Programming. The question is straight forward but for me when it comes to programming than I'll blank. I try to do it myself but then seriously I'm surrendered. Dr Zul helps me to understand it, and I know when there are others help you then you can do it. As I said, the question is very simple and Dr Zul taught me in a easy way to see it. Thank you Dr, I truly appreciated what you have done to me.
Then today, I have planned to do some exercise on Programming. Try and error. I hope that I can mastermind it. InsyaAllah.

Friday, 3 February 2012

Sensor. Again.

Today I just remembered that I have asked Mr.Badrol (Electrical Section) about the sensor. Then he gave me some opinion, he said why not I used obstacle detection sensor? It's simple and easy to use. I have Google a few about the sensor but I do not found something that I think suitable for the little robot. I have been thinking, what would I show to Dr. Zul then?
Later on, Kak Yati come into the office to show her project outcomes. Then Kak Yati using a circuit called IR01A Medium range Infrared Sensor produced by Cytron Technology. Dr Zul want me to check this out and I have found a few information about the infrared. Also, I have downloaded the user's manual and this is the link : http://www.cytron.com.my/usr_attachment/IR01A%20User%20Manual.pdf

This is the circuit.

Dr Zul said he will buy the circuit and he wants me to test the component until I get the actual result. InsyaAllah I'll try my best :)

Thursday, 2 February 2012

Find a Sensor.

A few days ago, Dr.Zul ask me to find a sensor to put to his little robot. He wants a sensor that can sense object in front of the robot. Then, I make some research and I found a few types of sensor which is proximity sensor, infrared, photoelectric distance sensor and etc.
A proximity sensor is a sensor able to detect the presence of nearby objects without any physical contact. The sensor often emits an electromagnetic field or beam of electromagnetic radiation (infrared, for instance), and looks for changes in the field or return signal. The object being sensed often referred to as the proximity sensor's target. Different proximity sensor targets demand different sensors. For example, a capacitive or photoelectric sensor might be suitable for a plastic target; an inductive proximity sensor always requires a metal target. The maximum distance that this sensor can detect is defined ''nominal range''. Some sensors have adjustments of the nominal range or means to report a graduated detection distance. I think, proximity sensor is not suitable for the mini robot, cause the sensor is big and the function of the sensor itself not suitable for my dear robot. (mine?)..
Then, I read a little bit about the photoelectric distance sensor, a photoelectric sensor, or photoeye, is a device used to detect the distance, absence, or presence of an object by using a light transmitter, often infrared, and a photoelectric receiver. They are used extensively in industrial manufacturing. There are three different functional types: opposed (a.k.a. through beam), retroreflective, and proximity-sensing (a.k.a. diffused). Thru on my reading, I think that the function between proximity and photoelectric sensor are similar. So, the photoelectric sensor also doesn't suitable for the robot. 
I was wondering how about car's sensor? Does it suitable for the robot? Then, I'll update later on car's sensor. Still searching for the info. :)

Friday, 20 January 2012

Got the idea.

At last I got the idea but I do not know how and where to start it.
To fully test the device operationally, I should test each peripheral module, ADC, USART, Timers, Comparators, etc.
A test "jig" board which can provide various analog and digital stimuli combined with test results transmitted through a serial connection to a monitoring PC is an option.
The devices program can be designed to manipulate the various stimuli inputs recording the results as the test progresses.
Environmental testing requires subjecting the device to both its stated temperature range and operational voltage range while running the above tests.
This is usually performed with a test "jig" board which can be mounted in an environmental chamber where temperature and humidity can be precisely controlled.
However, I'll most likely need to utilize a freezer and oven which provide adequate control over the temperature levels.
It all depends on how well you need to test the device and compare your findings to the devices datasheet.
And I still been thinking how to start stimulate it. I hope next week I'll show some progress to Dr.Zul.

Wednesday, 18 January 2012

First class of C Programming

Yesterday, Dr.Zul ask me to join his programming class so I can learn more about programming. He said, actually on Monday is the first class but I'm on leave. So, I have left behind a class but it doesn't matter at all, I can learn slowly. In the class, I have learn how to swap the program, then compute because an important reason for using a computer - very fast calculation.
Arithmetic instruction format:
var = <var/const><arithmetic operator><var/const>
Among the arithmetic operators are:
+, -, *, /(division), %(mod)
Any formula can be translated into the arithmetic instruction format.
Computer can also make decision. We use keywords if, if-else, if-elseif, switch.
Conditional statement format:
<var/const><conditional operator><var/const>
where the conditional operators are:
>, <, >=, <=, == (equal), !=(not equal)
and the result of the conditional operation either 0(false) or 1(true). In fact, other than 0 is equal to true.

Using if statement:
*If using only one statement, use semicolon. If more tahn one statements, use block.Then, no need semicolon.

Using switch statement:
*no semicolon after the block
*without break, then if ans== Yes, the computer will print both Yes, No and Others.

Equivalent using if-else.

Wednesday, 11 January 2012

PIC16F877A..??


Today, I just studied on PIC16F877A. Try to understand more on the IC. About the device overview, memory organization, Data EEPROM and flash program, and etc.
Some of the basic features :
1) 200 nanosecond instruction execution
2) 35 single words instruction
3) CMOS FLASH-based 8-bit
4) 40 or 44 pins packages
5) Memory : RAM/ROM (EEPROM)
6) Timers (2X8 bit & 1X16bit)
7) ADC (8 channels, 10 bit)

This is PIC MIcrocontroller block diagram : 


The software for PIC16F877A can be written using :
1) Assembly language
2) Pseudocode
3) C Programming

C Programming is preferred. Allowing application to be written using syntax is easier to understand than using Assembly Language. C source code is converted into assembly language by compiler, then assemble using machine codes. The machine codes are stored in a hex file.

*** to be continue***