|

This is my second line following robot.It has same circuits as the first but with expansion cards.It's interfaced with the PC's parallel port.Code is written in C.Each card has a particular function.Presently there are 3 cards:
- Parallel port interface
- Infra Red Sensor Board
- Regulator Board(5v,6v,9v)
Information on the sensor board circuit can be cound in the "Circuit Boards"section.
This is the first time I tried to make the machine as modular as possible,refraining from bundling together all the circuits into one board.This helped as the same boards could be used in other machines too.
Machine Base The machine base is primarily made of hylem.Two 60 Rpm DC motors on each side help in a low or zero turning radius.

A closeup of the gear arrangement:

Controller/Parallel Port The machine is controlled via a C program through the parallel port.The C program consisted of simple "IF" statements to analyse the sensor inputs.The following main inbuilt C functions were used:
Sample input monitoring program: #include #include #include
main() { int in; in=inportb(0x379); printf("%dn",in); return 0;
} This program scans the input pins of the parallel port and gives an integer number.
Outputting data sample program:
#include
#include
#include
main()
{
outportb(0x378,0x00); ---------STOP MOTOR
sleep(2);
outportb(0x378,0x01);---------MOVE MOTOR(CCW)
sleep(2);
outportb(0x378,0x02);---------MOVE MOTOR(CW)
sleep(2);
outportb(0x378,0x03);---------MOVE MOTOR(Break!)
sleep(2);
return 0;
}
There is a more detailed Tutorial on how to control you machine using the parallel port .See the "Tutorials" Section
Questions Please feel free to contact me if you have any queries.You can use the "Contact Me" page or mail me at gerryseq(at)rediffmail.com.Comments on this website are welcome |