Author Topic: My first robot - "WAR PIG" - Line-follower  (Read 6591 times)

0 Members and 1 Guest are viewing this topic.

Offline alessio136Topic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
My first robot - "WAR PIG" - Line-follower
« on: May 12, 2008, 01:01:23 PM »
Hello,
I'm proud to show you my first robot.
Its name is "War Pig" and it's a line follower.

PICTURE

You can see it in action in this video:

[youtube=425,350]5c3tC41lJxs[/youtube]

Now, I'll give you some technical specifications about the project.

Let's start from the schematic.

SCHEMATIC

The core of the circuit is the PIC18F4331. I know it's definitely over sized for the project, but since it came as a free sample, I didn't loose time to find a cheaper one.

Ground color is detected through two photoresistor. The signal is read in the middle of the serie between a 2-20k photoresistor and a 10k resistor: with this configuration the difference of voltage read from the adc is quite high, and can be easily treated like a digital input.

Motors are actioned by the L293D driver. PWM signals move the enable pins and set the velocity of the wheels through a simple algorithm.

Power supply is made with a 9V battery regulated by a standard 7805 voltage regulator. This is the worst part of the project, since I used the same power supply for the microcontroller and the project. I had some difficulties in avoiding the PIC to restart every time a motor was actioned and I finally did it putting a lot of decoupling capacitors near to the microcontroller.

I put the ICSP connector in the back in order to be able to program the robot without removing the PIC from the socket. Very useful idea.

White LEDS allow the robot to "see" the line in a dark room.

Structure is made with Plexiglas and long screws. It's light and simple but it took me a long time to make the several holes in it.

Here are some pictures:

RIGHT VIEW
LEFT VIEW
BOTTOM VIEW
FRONT VIEW
CIRCUIT
ROBOT IN ACTION
PANORAMA

Bill of Materials:
PIC18F4331 Microcontroller – FREESAMPLE
Resistors & Capacitors – €5 (approx.)
Sockets, Connectors & Wires - €3 (approx.)
2 * White Led - €0.80 ea.
2* 2-20k Photoresistors - €0.80 ea.
L293D - €2.5
MC7805 – 1€
9V rechargable battery - €4
2 * Wheels - €3 both
2 * DC Motors - €14 both
Ballcaster - €3.5
Plexiglas - €2.50
Screws - €0.50

Bill of Time:
Construction – 6 hours
Soldering – 6 hours
Programming – 4 hours
Prototyping the circuit on the breadboard – 10 hours

Personal comments:

+ it works
+ it's cheap
+ photodetectors work well even if not well shielded


- bad battery last
- bad power management
- dc motors are not very precise
- quite slow


Please, please post your comments here or on youtube and feel free to ask for any further information about the robot.

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: My first robot - "WAR PIG" - Line-follower
« Reply #1 on: May 12, 2008, 01:10:48 PM »
very nice job indeed really impressed , nice and clean where did u get the plexiglass from was it custom cut , was the gearing custom made ??

although try to make ur bot faster ,also power management is ok but battery supply mah should be higher as 9v batteries arent strong enough to drive motors and circuits  but really nice job ,very clean work good good !!!
« Last Edit: May 12, 2008, 01:17:15 PM by superchiku »
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline BANE

  • Supreme Robot
  • *****
  • Posts: 639
  • Helpful? 4
  • E=roboticsC^2
Re: My first robot - "WAR PIG" - Line-follower
« Reply #2 on: May 12, 2008, 05:11:48 PM »
Great job :).  You might find servos more precise and if you use muiltiple IR sensors you can follow a line much faster ;).

Bane

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: My first robot - "WAR PIG" - Line-follower
« Reply #3 on: May 12, 2008, 05:17:58 PM »
nice

very clean job!

I especially like what you did with the prototyping board

Did the circuit work first time ? or did it take a bunch of times to solder?
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline JesseWelling

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
Re: My first robot - "WAR PIG" - Line-follower
« Reply #4 on: May 12, 2008, 05:27:54 PM »
I like your idea with forcing your own lighting situation to the point where the level of extraneous light doesn't matter. Maybe you could go with IR LEDs and make it less obtrusive in the visual spectrum? this would of course necessitates IR photoresistors... and I don't recall seeing such a product recently...

Offline alessio136Topic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Re: My first robot - "WAR PIG" - Line-follower
« Reply #5 on: May 13, 2008, 11:03:57 AM »
thank you everybody for the comments :)

very nice job indeed really impressed , nice and clean where did u get the plexiglass from was it custom cut , was the gearing custom made ??

although try to make ur bot faster ,also power management is ok but battery supply mah should be higher as 9v batteries arent strong enough to drive motors and circuits  but really nice job ,very clean work good good !!!


I bought the plexiglas from a tool shop. It was a 1*0.5 m2 plate. I cut it myself engraving the surface with a cutter and breaking it using the edge of the table. Cutting approximately 1/5 of the the thickness on both side is enough to get a very good break. I made the holes using screwdrivers... very long and tiring work, but I couldn't use a drill and the result was even better.

This is the gear set I used:
http://www.pololu.com/catalog/product/114
Unfortunately I paid it twice in Italy.  >:(

Great job :).  You might find servos more precise and if you use muiltiple IR sensors you can follow a line much faster ;).

Bane

What about stepper motors? I should be able to get some of them more easily than good servos and they should be very precise... don't they?

nice

very clean job!

I especially like what you did with the prototyping board

Did the circuit work first time ? or did it take a bunch of times to solder?


It was the first time for me soldering on such type of board. I had problems with some accidental short circuits, but the concept of the circuit was correct from the beginning (I wrote some weeks ago in the electronic part of the forum, trying to explaing the idea). Moreover, I tested it on a breadboard before soldering.

The only problem with it was the lack of decoupling capacitors. I was quite disappointed the first time I turned it on: pic restarted at each motor activation!! 4*100nF and 2*1uF capacitors solved the problem providing the mucrocontroller enough charge to resist to sudden current peaks.  ;)


I like your idea with forcing your own lighting situation to the point where the level of extraneous light doesn't matter. Maybe you could go with IR LEDs and make it less obtrusive in the visual spectrum? this would of course necessitates IR photoresistors... and I don't recall seeing such a product recently...

Never eard about IR photoresistors! I'll look for something, otherwise I guess proper photodiodes will work fine. Is any other device available on the market?

What about IR generation? Still LEDs are the better solution?


Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: My first robot - "WAR PIG" - Line-follower
« Reply #6 on: May 13, 2008, 12:45:54 PM »
u have to use ir leds with ir phototransistors like the tsop , try to use ic 555 to make 38 khz signal for ur ir transistor and led . Use the 555 in astable mode , any doubt abt u can contact me ...

Also how did u drill using a screw driver ????????????????

did u drill  both ur circuit board and glass with screwdriver ???????

If yes tell me how and which size scredriver u used????
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline alessio136Topic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Re: My first robot - "WAR PIG" - Line-follower
« Reply #7 on: May 13, 2008, 01:33:37 PM »
u have to use ir leds with ir phototransistors like the tsop , try to use ic 555 to make 38 khz signal for ur ir transistor and led . Use the 555 in astable mode , any doubt abt u can contact me ...

Also how did u drill using a screw driver ????????????????

did u drill  both ur circuit board and glass with screwdriver ???????

If yes tell me how and which size scredriver u used????

haha that's simpler than you can think... just take a small screwdriver and point it in the plexy... then start rotating it... slowly plastic will be consumed and with a bit of patience you will have a perfect circle hole. always start with a small screw driver, then enlarge the hole with a bigger one... I have a 0.5mm dimeter philips screwdriver wich was perfect for leds and structure screws.

be careful, your finger will hurt if you drill any holes in a short time!  :P

for the circuit a used a board like one of these:
http://images.google.it/images?hl=it&q=millefori&um=1&ie=UTF-8&sa=N&tab=wi
unfortunately I don't know how you call it in english (italian "mille fori" literaly means "thousend holes" in english) but you will easily find one in every electronic shop.

(probably you just referred to the structure holes in the circuit board... then, yes, I made them with the screwdriver... same rude technique)



btw, thanks for the advices regarding IR detectors... I'll look for some information about phototransistors and I'll let you know.
« Last Edit: May 13, 2008, 01:40:08 PM by alessio136 »

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: My first robot - "WAR PIG" - Line-follower
« Reply #8 on: May 13, 2008, 10:06:21 PM »
ya i was asking abt the holes on the board for the screws not the small ones lol  ;D ... and those boards are known as VEROBOARDS for prototyping circuits

yes ill be glad to help u in IRs
« Last Edit: May 13, 2008, 10:08:11 PM by superchiku »
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline BANE

  • Supreme Robot
  • *****
  • Posts: 639
  • Helpful? 4
  • E=roboticsC^2
Re: My first robot - "WAR PIG" - Line-follower
« Reply #9 on: May 14, 2008, 04:26:45 PM »
Screw driver!   *****cough, drill press or hand drill, cough***** :P

Offline goatfish

  • Full Member
  • ***
  • Posts: 114
  • Helpful? 1
Re: My first robot - "WAR PIG" - Line-follower
« Reply #10 on: May 15, 2008, 02:21:44 AM »
i really like that,who cares if its slow,its a working robot,my question is could you you make that a tutorial,or makea schematic for it like this one http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198:D

 


Get Your Ad Here