Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

line tracking

Status
Not open for further replies.

hasanaziz008

New Member
hello every one im new here
i dont know any thing about line tracking robots im studing micro controllers what i need to understand is how should i place the emitter and receiver in the line tracking robot please help
 
There are many way to put the sensor on a line tracker. But the simplest way is that you put 2 sensors at 2 sides of the line like this

...............o
------------x----------------
------------x----------------
...............o

x is the receiver, and o is your transmitter. The point of reflexion will be at the middle of x and o and a small area between them. That is, at normal status, the sensor will see the floor. If one pair of sensors see the line, for example the left, you turn your robot to left then go on.

But this model is only used for forwarding robot because it's stable for linetracker only in case that the sensors is put in front of the robot.
 
On the diagram of the four sensors above, the two on the outside detect if the line turns. If the line turns left, the left most sensor will see it and move the bot to the left accordingly.
 
giaosucan said:
I not only want my robot to follow the while line ,but also want it to go forward ,go backward
as well as turn left ,and turn right
so how many sensors do I need ?
What do I dispose them ?
Thanks for your help
right ! i am also want my machine go forward , turn left , turn right , and go backward , i intend use four sensor like this ;
0 | |
-------------------------- (line)
0 0 (sensor)
--------------------------
0 | |

i wonder if it is avaiable.
thank u
 
m planning to use
4 IR sensors
photo transistors
AT89c2051 micro controller
l293d motor driver
can i use 12v 30rpm dc motors or high rpm motors
i didnt have much knwldg abt micro controllers
how can i write programme to these micro controllers
that is how to inter face keyboard to these micro controllers
Does H_Bridge L293d need any program?
why does i need crystral oscillator for micro controller?
plzzzzzzzzzzzzzzzzzzzzzzzzzz
help
iam cmpltly naive
 
#include d:\mc51\8051io.h
#include d:\mc51\8051reg.h
extern register unsigned char speedleft,speedright;
register unsigned char high,low,flag,time;

main()
{
P1=0x40;
P3=0xff;
high = 80;
low = 30;
flag = 0;
time = 50;
Start();
while(1) {
P3|= 0x0f;
Run();
}
}

Start()
{
char exit,key;
exit =1;
while(exit)
{
key = P1;
if((key & 0x40)==0) exit=0;
}
}

Run()
{
char sensors;
sensors = (P3 &=0x0f);

if((sensors & 0x01)==0) {
TurnRight();
flag = 1; }

else if((sensors & 0x08)==0) {
TurnLeft();
flag = 2; }
else if(sensors == 0x09) {
Forward(high);
flag = 0; }

else if(((sensors==0x0b)||(sensors==0x0d))&&(flag==0))
Forward(low);

}

Forward(char speed)
{
P1=0x64;
speedright = speed+10;
speedleft = speed;
delay(time);
}

TurnRight()
{
P1=0x68;
speedright = low+5;
speedleft = low;
delay(time);
}

TurnLeft()
{
P1=0x54;
speedright = low+5;
speedleft = low;
delay(time);
}

Reverse(char speed)
{
P1=0x58;
speedright = speed;
speedleft = speed+5;
delay(time);
}

i got this program from how can i feed this in micro controller plz helpme
plz give me program for h-bridge L293D
 
L293 is a motor driver not a MCU!!!

If you dont know how to program the microcontroller maybe you should start with something a bit easier, such as a 555 timer?
 
s29 said:
m planning to use
4 IR sensors
photo transistors
AT89c2051 micro controller
l293d motor driver (THIS IS NOT A MCU)
can i use 12v 30rpm dc motors or high rpm motors (IF you really want to)
i didnt have much knwldg abt micro controllers (I would try something easier)
how can i write programme to these micro controllers (I would try something easier)
that is how to inter face keyboard to these micro controllers (I would try something easier)
Does H_Bridge L293d need any program? (If you dont know then I would try something easier)
why does i need crystral oscillator for micro controller? (Wow...)
plzzzzzzzzzzzzzzzzzzzzzzzzzz
help
iam cmpltly naive


I would try something easier, this is obviously a big project already for you!
 
s29 said:
m planning to use
4 IR sensors
photo transistors
AT89c2051 micro controller
l293d motor driver
can i use 12v 30rpm dc motors or high rpm motors
i didnt have much knwldg abt micro controllers
how can i write programme to these micro controllers
that is how to inter face keyboard to these micro controllers
Does H_Bridge L293d need any program?
why does i need crystral oscillator for micro controller?
Good questions! Here's what I know:
- there are a lot of different kinds of IR sensors and phototransistors. What are you planning to have them do and/or what specific products are you planning to use?

- PIC brand mcus tend to be more popular on this forum, but not exclusively. If you're just starting out, you might try that route instead, since it's more likely that you'll get a greater variety of assistance from forum members with PICs. Is there any particular reason you're partial to the AT89c2051?

- the L293D would most likely be compatible with many 12V gearmotors, but try to figure what the actual stall current of the motors you're using is, or in cases where you know it's impossible that the motors might be stalled, what their greatest output current requirement will be. Check that against the datasheet for the the L293D, and make sure you're conservatively under specs.

- think about how fast you want your robot to go. In most cases, you'll want to use a gearmotor or some method of gearing a DC motor (pre-made gearbox, or something of your own design) to convert the high-speed motor into greater torque and better control.

- you need to program your microcontroller with something like the Inchworm+ from www.blueroomelectronics.com. That particular programmer is for PIC mcus, is a great value, and has great post-consumer support. blueroomelectronics is also a member of this forum - he and others here can be a great assistance to helping you get started with programming your first mcu.

- not to oversimplify, but the mcu programmer is kind of like an external CD burner, but to program integrated circuits instead of burning CDs. You connect your programmer to your computer (usually by USB), put your mcu chip inside the programmer, open the programming software on your computer, and then write the program on your computer onto the mcu chip. It's kind of like writing a file to an external hard drive, with the difference being that the program you write to your mcu will still be able to run independently i.e. even when it's no longer connected to your computer or the programmer.

- you don't need to program the L293D as such. What you'll do is program your mcu which will control the L293D. The mcu is the brains, the L293D is more like the muscle. The mcu won't be able to handle the high power output required for the motors, that's why you need the L293D. The mcu and L293D will be have logic power (usually 5v), but the power you need for your motors may be much greater (e.g. you mentioned 12V motors). If you think of your brain and finger like they're the mcu, then the L293D is like the light switch on the wall. Obviously it will be dangerous for you to actually hold and connect two bare wires everytime you want to turn on a light, so you have a switch. Because it's potentially harmful to the mcu to have it connected to the high power motors need, you have a high power switch-type device like the L293D as an intemediary. The handy thing about the L293D is that as an h-bridge it can not only take instructions from your program in the mcu to turn the motor on and off, but it can also take instructions telling the motor to change direction, and even to change speed. That's actually a bigger deal than it seems at first, you'll see!

- the oscillator for mcus works much the same way as a clock does for you. It helps the mcu keep track of time, so that the mcu knows what to do when, and how long to do something for. Many mcus don't need an external oscillator, and as such I think are a better choice for beginners. Even though these mcus don't use an external oscillator, they still need to keep track of time, but they can do it with built-in internal oscillators, or with something like an external RC circuit.

I know this might seem like I'm product-biased, but as an independent hobbyist I really have to recommend the Inchworm+ programmer and PIC microchips as the best start for beginning robot programmers. For PIC mcus, the best one to start with is the 16F88. It might not look like much, but it can do a lot (more than you'll need for your robot), and it's got an internal oscillator. Best wishes, and keep at it!
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top