Project Report of Micro

Embed Size (px)

Citation preview

  • 7/31/2019 Project Report of Micro

    1/13

    B.S. Computer Science, Batch 2009

    5th

    Semester

    SUBJECT:MICROPROCESSOR AND MICRO CONTROLLER

    PROJECT REPORTTOPIC: COMPUTER CONTROLLED RC CAR

    SUBMITTED BY: SUBMITTED TO:

    SAIMA MASOOD SIR BADI-UR-REHMAN

    SOOFIA SYED SEC: B

    HINA KHURSHED

  • 7/31/2019 Project Report of Micro

    2/13

    ACKNOWLEDGEMENT

    With a deep sense and profound gratitude we take this opportunity to

    convey our sincere thanks to ALMIGHTY ALLAH for giving us courage

    and strength to reach this stage of life. We also thank our parents who

    gave us great moral support at every step. We also convey thanks to all

    of those who gave us valuable support to complete this challenging

    project. We are highly indebted to respected Sir Badi-ur-rehman for

    their sincere help and guidance throughout the work. We also wish to

    express our gratitude to all the staff in the university who have been

    our source of inspiration throughout the university years and have

    shared their knowledge and skills with us.

  • 7/31/2019 Project Report of Micro

    3/13

    SYNOPSIS

    After working on this project, we've finally managed to control the RCcar with my computer. I didn't go for high-end cars because, apart from

    being expensive, they use analogue signals to give precise speed and

    direction control. Cheap cars have a digital controller that uses switches

    for controlling left/right/forward/backward movements, and not

    potentiometers.

    The first step was to modify the car's controller so that it could be

    interfaced with my computer. The buttons on my car's controller simply

    push down upon some micro-switches on the board, closing the circuit

    for controlling forward/backward/left/right movements. After

    identifying the 0 V ground and the active (control) points on the

    controller, I soldered wires to each of those points.

    The next step was to build a circuit for connecting the car's controller to

    my computer's parallel port. Our circuit is little bit difficult as I use

    relays. I used relays as switches. These relays, in effect, ground the

    controller's active points when they get a signal from the computer's

    parallel port.

  • 7/31/2019 Project Report of Micro

    4/13

    TABLE OF CONTENTS

    TOPICS PAGE NO.

    Introduction 4

    Remote Control 4

    Remote Control Cars Principle Of Operation

    4

    5

    Parallel Port 5-6

    Relay 6-7

    Tools And Materials Required 7

    Steps Of Procedures 7-10

    Working 10-11

    Program 11

    Pictures 12

    References 13

  • 7/31/2019 Project Report of Micro

    5/13

    INTRODUCTION:

    The Mini RC Car Project has been one of our favorites to do. If you haven't checked that project

    out, please read through that one before starting on your own. I thought up the idea that it

    would be really cool to control a remote control car controlled by the parallel port.

    REMOTE CONTROL:

    The control of an activity, process, or machine from a distance, as by radioed instructions or

    coded signals.

    OR

    A device used to control an apparatus or machine from a distance.

    REMOTE CONTROL CARS:

    Radio-controlled (or R/C) cars are self-powered model cars or trucks that can be controlled

    from a distance using a specialized transmitter. The term "R/C" has been used to mean both

    "remote controlled" and "radio controlled", where "remote controlled" includes vehicles that

    are connected to their controller by a wire, but common use of "R/C" today usually refers to

    vehicles controlled by a radio-frequency link.

  • 7/31/2019 Project Report of Micro

    6/13

    PRINCIPLE OF OPERATION:

    Radio-controlled cars use a common set of components for their control and operation. All cars

    require a transmitter, which has the joysticks for control, or in pistol grip form, a trigger for

    throttle and a wheel for turning, and a receiver which sits inside the car. The receiver changes

    the radio signal broadcast from the transmitter into suitable electrical control signals for the

    other components of the control system. Most radio systems utilize amplitude modulation for

    the radio signal and encode the control positions with pulse width modulation. Upgraded radio

    systems are available that use the more robust frequency modulation and pulse code

    modulation. The radio is wired up to either electronic speed controls or servomechanisms

    (shortened to "servo" in common usage) which perform actions such as throttle control,

    braking, steering, and on some cars, engaging either forward or reverse gears. Electronic speed

    controls and servos are commanded by the receiver through pulse width modulation; pulse

    duration sets either the amount of current that an electronic speed control allows to flow into

    the electric motor or sets the angle of the servo. On the models the servo is attached to at least

    the steering mechanism; rotation of the servo is mechanically changed into a force which steers

    the wheels on the model, generally through adjustable turnbuckle linkages. Servo savers are

    integrated into all steering linkages and some nitro throttle linkages. A servo saver is a flexible

    link between the servo and its linkage that protects the servo's internal gears from damage

    during impacts or stress.

    PARALLEL PORT:

    The Parallel Port allows the input of up to 9 bits or the output of 12 bits at any one given time,thus requiring minimal external circuitry to implement many simpler tasks. The port is

    composed of 4 control lines, 5 status lines and 8 data lines.

    Newer Parallel Ports are standardized under the IEEE 1284 standard first released in 1994. This

    standard defines 5 modes of operation which are as follows:

  • 7/31/2019 Project Report of Micro

    7/13

    1. Compatibility Mode.

    2. Nibble Mode.

    3. Byte Mode.

    4. EPP Mode (Enhanced Parallel Port).

    5. ECP Mode (Extended Capabilities Mode).

    The aim was to design new drivers and devices which were compatible with each other and also

    backwards compatible with the Standard Parallel Port (SPP). Compatibility, Nibble & Byte

    modes use just the standard hardware available on the original Parallel Port cards while EPP &

    ECP modes require additional hardware which can run at faster speeds, while still being

    backwards compatible with the Standard Parallel Port.

    Compatibility mode or "Centronics Mode" as it is commonly known, can only send data in the

    forward direction at a typical speed of 50 kbytes per second but can be as high as 150+ kbytes a

    second. In order to receive data, you must change the mode to either Nibble or Byte mode.

    Nibble mode can input a nibble (4 bits) in the reverse direction. E.g. from device to computer.Byte mode uses the Parallel's bi-directional feature (found only on some cards) to input a byte

    (8 bits) of data in the reverse direction.

    RELAY:

    A relay is an electrically operated switch. Current flowing through the coil of the relay creates a

    magnetic field which attracts a lever and changes the switch contacts. The coil current can be

    on or off so relays have two switch positions and most have double throw (changeover) switch

    contacts as shown in the diagram.

    Relays allow one circuit to switch a second circuit which can be completely separate from the

    first. For example a low voltage battery circuit can use a relay to switch a 230V AC mains circuit.

    There is no electrical connection inside the relay between the two circuits, the link is magnetic

    and mechanical.

  • 7/31/2019 Project Report of Micro

    8/13

    The coil of a relay passes a relatively large current, typically 30mA for a 12V relay, but it can be

    as much as 100mA for relays designed to operate from lower voltages. Most ICs (chips) cannot

    provide this current and a transistor is usually used to amplify the small IC current to the larger

    value required for the relay coil. The maximum output current for the popular 555 timer IC is

    200mA so these devices can supply relay coils directly without amplification.

    Relays are usuallly SPDT or DPDT but they can have many more sets of switch contacts, for

    example relays with 4 sets of changeover contacts are readily available. For further informationabout switch contacts and the terms used to describe them please see the page on switches.

    Most relays are designed for PCB mounting but you can solder wires directly to the pins

    providing you take care to avoid melting the plastic case of the relay.

    The supplier's catalogue should show you the relay's connections. The coil will be obvious and it

    may be connected either way round. Relay coils produce brief high voltage 'spikes' when they

    are switched off and this can destroy transistors and ICs in the circuit. To prevent damage you

    must connect a protection diode across the relay coil.

    The animated picture shows a working relay with its coil and switch contacts. You can see a

    lever on the left being attracted by magnetism when the coil is switched on. This lever moves

    the switch contacts. There is one set of contacts (SPDT) in the foreground and another behind

    them, making the relay DPDT.

    The relay's switch connections are usually labelled COM, NC and NO:

    COM = Common, always connect to this, it is the moving part of the switch. NC = Normally Closed, COM is connected to this when the relay coil is off. NO = Normally Open, COM is connected to this when the relay coil is on.

  • 7/31/2019 Project Report of Micro

    9/13

    TOOLS AND MATERIALS REQUIRED:

    - Mini RC Car & Remote

    - (5) Wires 1-2ft long

    - Misc. small wires

    - Drill- Wire Stripper (or knife)

    - Screwdriver(s)

    -Scissors or Wire Cutters

    - Soldering Iron

    - Solder

    - (8) Relays(6v DC)

    - (1) Bred board

    - Male Parallel Port(DB25) Connector

    STEPS OF PROCEDURE:

    1. Open remote and expose PCB.2. Drilling the remote case.3. Connect the parts on bred board.4. Build the PC interface.5. Reattaching the wires.

    Step One: Open Remote and Expose PCB

    With the antena unscrewed, remove the 3 screws from the back of the remote. You will need afairly small screwdriver.

    1 - Screw Hole Locations

    Remove the screws and the remote face should come off easily.

    2- Take note of the button locations and remove the bottom right screw holding the PCB in

    place.

    3- The PCB is still attached. Snip the wires close to the circuit board, but leave enough of the

    wire to identify the colour, for when re-attaching later.

    4- The PCB should now be free, making it easier to work on.

    Step Two: Drilling the Remote Case

    In order to get a cable that goes from the back of the remote's PCB to the computer, we need

    to make a hole in the remote's plastic case for the wires to go through. Any size hole will do, as

    long as it's big enough for your wires to fit through. Drill the hole closer to the back of the

    remote, if possible. That just makes it so the cable won't have to bend as much.

  • 7/31/2019 Project Report of Micro

    10/13

    Step Three: Connect the parts on the bred board

    Now connect all the parts on bred board with some wires. We use two relays for a particular

    function i.e (forward, reverse, right and left). We connect two relays in series for performing

    single operation at a time.

    Step Four: Build the PC Interface

    This is the most challenging part of the project.

    Before you start building the cable, feed the wires you soldered, through the hole you drilled

    earlier. This will allow you to put it all back together again at the end.

    Take the male parallel port connector and solder short wires to pins 2,3,4,5,23. Pins 2-4 will

    carry the data (forward, reverse, left, right) and pin 23 is ground. Side note: when doing any pc-

    parallel port interfacing, pins 2-9 are easily controlled data pins and pins 18-25 are all ground.

    Other pins have specialty functions and can be used in interesting ways.

    The rest consists on building a circuit, using the schematic (diagram) we have made up. For this

    we need, a bunch of small wires, bred board, (8) relays. (Note: the ground is the Parallel Port

    Pin 23 and Remote Negative Terminal connected together, there is no 'third' ground.)

    Step Five: Reattaching the Wires

    In the first step, you cut some wires. Those will now need to be re-attached. I would suggest

    replacing them with your own wires and use longer ones. The factory wires are very cheap and

    it's a lot easier just to use wires double as long, so you have enough room to solder them to

    where the old wires use to be. You can always just strip the old wires are re-attach using

    electrical tape.

    WORKING:

    In this circuit we use eight relays for operating our car operations i.e (forward, reverse, right

    and left). The relay works as a switch therefore it acts on logic 1 or 0. If we send logic 1 through

    parallel port the switch close and act for a particular operation as it is connected in the parallel

    port. We use two relays for a particular function i.e (forward, reverse, right and left). The two

    relays are connected in series. In parallel port there are 8 data pins from 2 to 9. Pins 10 to 17

    are use as printer pins for different purposes. Pins 18 to 25 are GND. In parallel port we use

    pins 2,3.4 and 5 for transferring data to the relays through logic from parallel port and pin 23

    http://www.jbprojects.net/articles/rc/parallel_p.jpg
  • 7/31/2019 Project Report of Micro

    11/13

    for GND. At pin 2 forward function is perform, at pin 3 reverse function, at pin 4 left and at pin

    5 right function is perform. And we have controlled our car through programming on MASM611

    using out command.

    PROGRAM:

  • 7/31/2019 Project Report of Micro

    12/13

    PICTURES:

    http://www.jbprojects.net/articles/rc/solderport.jpghttp://1.bp.blogspot.com/_R7o3lst9P4U/RcmoPIQx2bI/AAAAAAAAADs/Shz33ypXG3g/s1600-h/car1.JPGhttp://www.jbprojects.net/articles/rc/solderport.jpghttp://1.bp.blogspot.com/_R7o3lst9P4U/RcmoPIQx2bI/AAAAAAAAADs/Shz33ypXG3g/s1600-h/car1.JPGhttp://www.jbprojects.net/articles/rc/solderport.jpghttp://1.bp.blogspot.com/_R7o3lst9P4U/RcmoPIQx2bI/AAAAAAAAADs/Shz33ypXG3g/s1600-h/car1.JPG
  • 7/31/2019 Project Report of Micro

    13/13

    REFERENCES:

    1. "Learn More About R/C Cars". Team Losi. http://teamlosi.com/learnmor/index.htm. Retrieved 1August 2007. ( http://www.answers.com/topic/radio-controlled-car#ixzz1MZilmItu)

    2. "Radio Controlled Cars Do's And Don't's Beginners Guide". Radio Controlled Machines.http://www.radiocontrolledmachines.com/article_info.php?articles_id=4. Retrieved 1 August

    2007. (http://www.answers.com/topic/radio-controlled-car#ixzz1MZj1Emg3)

    3. http://www.jbprojects.net/projects/rc/4. http://www.jbprojects.net/articles/rc/