TCRT5000 as a sensor

The TCRT5000 is widely used throughout the world as a proximity sensor. It is nothing but a pair of a photodiode and a IR (Infrared) LED in a special packed form. This is set of transmitter (Infrared LED) and receiver (Phototransistor). In actual, the terminal diagram of this sensor is given by  As we see one of the edge of this sensor (Marked in Red). This is the key to recognize the terminology of pin diagram. Hold this sensor vertically...
1 Read More »

Position of sensors

                  In very last article, we have seen the circuit diagram of a infrared transmitter - Receiver pair. Apart from the circuit diagram for the sensors in an Autonomous Robotic system, the position of sensors is also an important thing. In this article, I will present the sensor position of an AR system with some explanation.
There are two examples for sensor position, as below


          In these examples, one thing is noticeable; around centered sensors, there are two vertical lines which are 3 cm apart. In the last article Circuit diagram for sensor, I have considered a case that an AR ( autonomous system )  has to follow a 30mm (3cm) line. That's why, centered sensor place is restricted between a 3 cm (30mm) line. One can restrict the place of sensors outward the vertical line also. There are number of possibilities to place sensors. Out of which I had used both these cases which are shown in the diagrams above, and it really works 100%  for programming an embedded system. It gives huge extension for programming.
          That's it for now, very soon I will explain working of widely usable sensor which is TCRT5000.

+++++++++++++++++++++++++++++++++++
WHEN YOU SOP CHASING THE WRONG THINGS, YOU GIVE THE RIGHT THINGS A CHANCE TO CATCH YOU.....
                                    - UNKNOWN 
+++++++++++++++++++++++++++++++++++










Circuit Diagram for Sensors in Autonomous Robot system

As one proceed for the development of circuit design for the Autonomous Robot (AR) system, there needs to be proper sensor arrangement. So, in this article we will approach to the sensor circuit diagram. I used the circuit diagram as below


             In this circuit diagram, there are 5 sensors used. One sensor consists of an Tx-Rx pair ( Tx- Transmitter, Rx- Receiver) . It is easily differentiated from figure that one of these two diodes is a IR LED (IR- Infrared) while another one is a photodiode. I am really very sorry that I haven't used sign of photodiode in this figure ( photodiodes- D10, 9, 8, 7, 6).More specification of this circuit is given below.
 Resistor connected to IR LED - 220 Ohm
 Resistor connected to Photodiode- 10 Ohm

              The purpose for connecting low resistance for the IR LED is to increase brightness of LED, if, in opposite case a higher value resistance connected to LED, then there is more possibility of light with low brightness.
              In case of photodiode, it can work properly when we connect a resistor having value of 10K because of favourable conditions in the DC load line of the photodiode, in short, it becomes highly sensitive.
  Power Supply Requirement - 5V ( which can provide min. current of 500mA for driving the LED's)

Now comes the question of sensor position, So for approaching this issue; We must have to consider width of the line ( Which AR should follow). Let's consider width of a line is 30mm(3 cm). According to the logic for our programming which I have explained in the last article of Robotics
A grid solver Robot  One can create the logic.

        Very soon, I will explain with some case, how a sensor position in an AR  matters. That's enough for now. Wish you have great day!

+++++++++++++++++++++++++++++++++++++++
"IF YOU DON'T LIKE WHERE YOU ARE, THEN CHANGE IT; YOU ARE NOT A TREE"
                       - JIM ROHN 
+++++++++++++++++++++++++++++++++++++++
            



Some facts of programming


            Friends, most of the time we prepare a program but on the other hand, we should know how to check the program on the software and what happens after the compiling the program. So today I will focus on the part of the program compilation.
            Before going to the part of compilation, I will introduce the basic types of programming. Basically the programming is divided in two parts

  1. Low level programs/ machine language which is also called as assembly language programming.
  2. High level programing like.
            C programming is high level programming. Now you may raise the question that, what is an machine language programming? Answer to this question is, the binary coded programming like 0's and 1's, or you can program with very sophisticated words like JUMP , MOV , ADD, etc. But machine programming becomes tedious when we want to build up a huge software for high level purposes, also machine language programming instruction set varies with different kinds of processors built up by different companies. That's why we generally use high level programming like C programming, Java, C++, python, etc.
             Now I will converge to today's topic, when we finish up typing a C program for a general problem like addition or slightly higher than that, we have to check up the program on the computer, whether it is correct in syntax or not. For this purpose we do the compilation of the program. But, instead of checking the syntax of the program, compiler does another work, which is nothing but converting the c program in binary form, i.e. converting in assembly program. When you will save your program at any location in your computer, after compilation you will find that there will be three kind of format of your programs. On windows OS these will be .exe, .obj, .asm . The .asm means an assembly program. Whenever you will compile any program, you can read the .asm file.
              Furthermore, when one will compile a program, sometimes he will find some syntax error, generally the common errors are 

  1. Missing a semicolon (;) after a instruction.
  2. Missing a close bracket "}" at the end of the function like main( ).
  3. Error in spelling of instructions.
So first try to find errors with the above most common set of errors. The following code is considered as a beginning of C program.

#include<stdio.h>
void main()
{
  printf("Hello World ");
}

I will explain about variables, operators, data types and format specifiers in upcoming days.

++++++++++++++++++++++++++++++++
The journey in between what you once were and who you are now becoming  is where the dance of life takes place....
                                 - Barbara De Angelis  

++++++++++++++++++++++++++++++++

           

C programming

                   Friends, Today I will explain the code which I have given in the last post. Understanding any code needs some basic skills, and generation of such skills is quite simple. Let's start the discussion.
                   The code for addition for two numbers is as follows.
#include<stdio.h>
void main() {

int A=2,B=3,C; // Initialisation
C=A+B; // Addition
printf("Output is %d",C); // print the output

}

#include<stdio.h> :- This line indicates inclusion of standard input output (stdio) library. As an example, for science side, there is an library in which there are several books like mathematics, electronics, biomedical, and so on. At the end, my point was this line includes some built in functions which are already provided with the compiler.You will get to know what is actual function of stdio in upcoming discussion.

void main() :- This instruction indicates, the main function is started. Again you will get to know the working of main function very soon. The "( )" indicates we are not passing any argument in the main function. Please do not worry about word argument,  you will come to know it in upcoming discussion. The { braces indicates the instruction under the function. Here" main ( ) {" is used , so in this case { indicates instructions are in main function.

int variable1, variable2,etc: This indicate we are declaring variables of type integer. This process is called as "Initialisation".

C=A+B : This simply indicates the addition of two numbers is going on. Please note that this process is not associative, i.e. we cannot write instruction like A+B=C . 

printf("----") :- As we have included standard input output library, printf is a function. Now you may raise a question that how to recognize a function in programming, the answer in rough words can be- any keyword when ends, there is (.....) pattern is used. In after the word printf we used ("Output is %d",C). So whatever is written in printf("...."), the word in "--" double quote will be printed on the output screen.

 As I have given this program as example, I won't directly touch the programming side too early. This program was just given as per the algorithm. So for any program, at the basic level, the algorithmic point of view is necessary.

After the termination of this program, you will find output in the following screenshot.

Now you have new facility that, even if you have any difficulties, you can contact me through C Programming tab , in which there is an forum, so you can discuss it there. Also I have given the sample code there.
      Thank you.

+++++++++++++++++++++++++++++++++++
You are always both the student and Teacher. Learn, Grow, Share.
                                                  -Unknown 
+++++++++++++++++++++++++++++++++++
 


Share English German French Arabic Chinese Simplified