![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| 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 | |
| |
| | (permalink) | |
| Quote:
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!. | ||
| |
| | (permalink) |
| 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 | |
| |
| | (permalink) | |
| Quote:
Have a look at a simple discrete design by Bob Blick http://www.bobblick.com/techref/proj...e/hbridge.html, 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). | ||
| |
| | (permalink) | |
| Quote:
__________________ A rectangular bear is just a polar bear after a coordinate transform. -- I dunno who. A recent study shows that research causes cancer in rats. -- I dunno who said that one either. | ||
| |