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.

How to make alogrith for a artificial intelligence line follower.

Status
Not open for further replies.

koolguy

Active Member
hi guys,

I have decided to make a line follower robot which sound easier but viewing the arena of it.
makes me confuse how to make control over robot for deciding the right path as give here in end.


any help will be appreciated,
thanks
 

Attachments

  • line follower.JPG
    line follower.JPG
    45.4 KB · Views: 337
Last edited:
Hi again,

Will LDR will be better than IR/Photo diode??
and the 5 sensors should be straight or in vee shape??
But how T junction will be sensed?
 
You can declare a 2 dimensional array in you're program.

Get each sensors value,normally is 1 or 0(Black is 0,White is 1),store in 2d array,then analysis it.

For example.
If your robot is running now and it have 5 sensors:

first time each sensors value: 1 1 0 1 1
second time each sensors value: 1 1 0 1 1 (Black is 0,White is 1)
third time each sensors value: 0 0 0 0 0
...
Then data in 2d array is:
{1,1,0,1,1}
{1,1,0,1,1}
{0,0,0,0,0}
...
Obviously we can know this's a T Junction.
So, you need to design a algorithm for your program,to compare those 1 and 0,let MCU know what those numbers mean,and to make control.
 
Last edited:
Here some CAD images please tell any changes to do........
 

Attachments

  • 1213.JPG
    1213.JPG
    74.5 KB · Views: 324
  • 12.JPG
    12.JPG
    68.9 KB · Views: 314
Last edited:
OK, sure what should be the size??
any thing more..........
That will be determined by the response time of your sensors and controling software.
Putting the drive wheels up frount and the caster in the rear will help.
Having the drive wheels in the center would be the best so it can "turn on a dime".
If the car is to long or the response time to long than it will not be able to follow the line around corners.
Have you looked at any of the hundrids of line followers on the web?
 
Last edited:
Updated images:-
 

Attachments

  • 12.JPG
    12.JPG
    87.2 KB · Views: 301
  • 13.JPG
    13.JPG
    100.1 KB · Views: 302
  • 14.JPG
    14.JPG
    94.2 KB · Views: 286
Will this model work fine for a line follower...??
 

Attachments

  • 31102011336.jpg
    31102011336.jpg
    143.7 KB · Views: 296
  • 31102011337.jpg
    31102011337.jpg
    136 KB · Views: 318
  • 31102011338.jpg
    31102011338.jpg
    130 KB · Views: 297
Hi,

I have got L298 chip for h- bridges the problem is what the use of logic supply pin 9voltage??
Is that mean at what logic the bridges will work If yes then i have connected to 5V..
and current sensing pin 1 to GND without any resistance...
Out put 1 and 2 to motor terminal just for testing small motor pin 2 and 3...
and input spin to GND and Vcc for testing pin 5 and 7...
till now i am not using output 3 and 4....
supply voltage is 12V 800mA max.

edited: the problem is the motor is not rotating...
 
Last edited:
Your chassis looks better.
Pin #9 on your L298 chip needs a 5 volt supply, 7 volt maximum so it will work off 6 volts. The Motor supply goes to pin #4 and that can be as high as 50 volts.
 
Pin #9 on your L298 chip needs a 5 volt supply, 7 volt maximum so it will work off 6 volts. The Motor supply goes to pin #4 and that can be as high as 50 volts.

But why motor is not running??
Is my pin connection are right??
 
OK, the output from pin 2 and 3 is rising properly but the current is very low when i connect the load like buzzer and motor the voltage level decrease to 1V or less and motor does not seems work...........
same with buzzer very less sound..!!
pls suggest me what to do??
I have connected pin 1 and 15 to gnd with resistance and with out it also but no changes were seen.
 
OK, the output from pin 2 and 3 is rising properly but the current is very low when i connect the load like buzzer and motor the voltage level decrease to 1V or less and motor does not seems work...........
same with buzzer very less sound..!!
pls suggest me what to do??
I have connected pin 1 and 15 to gnd with resistance and with out it also but no changes were seen.
 
What are you using for in input to control the motor?

After working on it the motor was running....
well
but after connecting it again on PCB the working of 298 chip not well as when i connect enable to GND the motor is still running .......
pls suggest me any other chip that work on 3.3V logic input...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top