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.

Student needs help with final year project

Status
Not open for further replies.

Gondwana

New Member
Hello !
i'm a final year student in computer systems and software enginnering and for my final year project i have to build a robot. basically the robot will be tracking a line and avoiding obstacles and display some form of artificial intelligence. i am quite familiar with programming languages ( java, c, c++, assembler) but not god at electronics. the programming language i will use i c. those are the components i am going to use for the robot: Pic 16f876 microcontroller, ultrasonic transducer( transmiter and receiver both have got 2 pins) for collision avoidance, infrared detectors for tracking the line ( the detector has got 3 pins), a motor driver( l293d) , 2 cordless drill motors (12v), a voltage regulator 5v ( 7805) ,a 4mhz crystal and capacitor for the clock pulse, and various resistors. i am in need of assistance with regards to putting it all together. i need to know how to allocate pins for the board. this will allow me to configure the pic properly. any input on building this interface will be greatly appreciated


thanks
 
Gondwana said:
Hello !
i'm a final year student in computer systems and software enginnering and for my final year project i have to build a robot. basically the robot will be tracking a line and avoiding obstacles and display some form of artificial intelligence. i am quite familiar with programming languages ( java, c, c++, assembler) but not god at electronics. the programming language i will use i c. those are the components i am going to use for the robot: Pic 16f876 microcontroller, ultrasonic transducer( transmiter and receiver both have got 2 pins) for collision avoidance, infrared detectors for tracking the line ( the detector has got 3 pins), a motor driver( l293d) , 2 cordless drill motors (12v), a voltage regulator 5v ( 7805) ,a 4mhz crystal and capacitor for the clock pulse, and various resistors. i am in need of assistance with regards to putting it all together. i need to know how to allocate pins for the board. this will allow me to configure the pic properly. any input on building this interface will be greatly appreciated

Personally I think the 16F876 is an excellent choice for your robot, in particular because it has two PWM outputs, these are ideal for providing the outputs for your motors - there's sample assembler code for doing this in my PIC tutorials at www.winpicprog.co.uk - which I added in response to questions about motor control for small robots.

The two PWM channels use specific pins (check the datasheet), so those pins have to be allocated for that purpose. Otherwise you could pretty well use any pins you want, bear in mind PortA has the option of being analogue inputs - you may find a use for those!. Likewise the 16F876 has a hardware USART built-in, this could be very useful for programming the device in-circuit using a 'bootloader', and also for debugging purposes, this uses two more specific pins.

Apart from those you can allocate the rest as you need.

One point in your list of parts I'm a little dubious about - the L293D and two 12V drill motors, the L293D is probably a little on the weak side for motors as powerful as those - usually a discrete H bridge is used for those sorts of powers.

Good luck, and have fun! - if you do plenty of searching on the net you will find lots of small robot projects doing almost exactly what you are looking to do!.
 
Thank you Nigel for your reply ! The reason i have chosen to use the L293D due to financials limitations most students experience. i would have loved to use something like a Victor 883 speed controller, or Vantec RDFR or perhaps a 4QD maybe if you know of any other affordable alternative that would be great .just like you mentioned, i will use Pin 12 and 13 ( port C) of the pic16f876 to output the PWM to the speed controller. i was thinking of connecting the ultrasound transducer that i want to use for detecting obstacles to pin 2 (RB0) to generate an interrupt if the robot is about to hit something. the infrared detector and infrared light wil be just connected to portA ( analogue). Do i connect those sensors directly to the pic or do i need to use other components between the microcontroller and the sensors.


thanks
 
Gondwana said:
Thank you Nigel for your reply ! The reason i have chosen to use the L293D due to financials limitations most students experience. i would have loved to use something like a Victor 883 speed controller, or Vantec RDFR or perhaps a 4QD maybe if you know of any other affordable alternative that would be great .just like you mentioned, i will use Pin 12 and 13 ( port C) of the pic16f876 to output the PWM to the speed controller. i was thinking of connecting the ultrasound transducer that i want to use for detecting obstacles to pin 2 (RB0) to generate an interrupt if the robot is about to hit something. the infrared detector and infrared light wil be just connected to portA ( analogue). Do i connect those sensors directly to the pic or do i need to use other components between the microcontroller and the sensors.

You hardly need to go as far as Vantec or 4QD :)

Have a look at a simple discrete design by Bob Blick **broken link removed**, which he uses for drill motors.

As for the IR sensors, you need to provide a voltage output from them, this basically requires a pull-up resisitor, you can find the correct value from experimentation (and document all the tests as part of your project).
 
you can find the correct value from experimentation (and document all the tests as part of your project)

I just finished my senior deisgn project, and our instructor basically told us over the period of 12 months that if you found ANY values from experimentation instead of calculation you were incompetant (sp). Thats the ONLY thing I hated about that course work.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top