wirelesspccontrolledmaneuveringusing8051microcontrollerandparallelportprogramming
TRANSCRIPT
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
1/38
Mini Project Report on
WIRELESS PC CONTROLLED
ROBOT MANOEUVRING
By
ARSH ARAFAAT (200412025)
ARUNABH MISHRA (200412026)
SAURABH SAH (200412109)
SHASHANK SHEKHAR (200412114)
In partial fulfillment of the requirements for the award of the degree
Bachelor of Technology in Electronics and Communication (2008)
Under the guidance of
Prof. Dr. R N Bera (HOD)
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGG.
SIKKIM MANIPAL INSTITUTE OF TECHNOLOGY
MAJITAR, RANGPO, EAST SIKKIM 737132
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
2/38
(A Constituent College of Sikkim Manipal University of Health, Medical & Technological Sciences)
CERTIFICATE
This is to certify that Mr. Arsh Arafaat (Regd. No. 200412025), Mr. Arunabh Mishra (Regd. No.
200412026), Mr.Saurabh Sah (Regd. No. 200412109) and Mr. Shashank Shekhar (Regd. No. 200412114)
students of Bachelor of Technology, VII Semester, Department of Electronics and Communication of
Sikkim Manipal Institute of Technology, have pursued the project titled Image compression using Discrete
Cosine Transformationunder the guidance and supervision of Prof. Dr. R N Bera (HOD) and the report
has been submitted in partial fulfillment of requirements for the award of the degree, Bachelor of
Technology in Electronics and Communication by Sikkim Manipal University of Health, Medical &
Technological Sciences in the Year 2008.
Prof. Dr. R N Bera Prof. Dr R. Bera
Project Guide Head of the department
Dept of E&C, SMIT.
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
3/38
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
4/38
vii) DC Motor
viii) DC Power Supply
ix) Voltage Regulator(7805)
x) Robot Body
9) Softwares Used
i) Keil C
ii) Dev C++
10) Programs and Flow Charts
i) User Terminal
ii) Transmitting Microcontroller
iii) Receiving Microcontroller
11) Conclusion
12) Bibliography
(2)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
5/38
ACKNOWLEDGEMENT
We take this opportunity to express great sense of gratitudeto Brig. Dr. S.N.
Mishra (Director, Sikkim Manipal Institute of Technology) and Prof. Dr. R.N.
Bera (HOD, Electronics and communication Engineering, Sikkim Manipal
Institute of Technology) for providing us the opportunity to carry out this
project.
Now we also extend our heartiest thanks to our project guide, Prof Dr. R.N.
Bera, for his invaluable guidance, support and encouragement during working
on the project wireless controlled Robot. His effective planning, coordination,
skill, knowledge and experience have made it possible to successfully
complete the project within the stipulated time. We are also indebted to all the
faculty members of ECE and SMIT as a whole and everything we got from
here.
Arsh Arafaat (200412025)
Arunabh Mishra (200412026)
Saurabh Sah (200412109)
Shashank Shekhar (2004120114)
(3)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
6/38
Introduction
In a laymans word, a robot is a body which performs a task which one wants
it to do. According to dictionary we can say :
A robot is a mechanical or virtual, artificial agent. It is usually an
electromechanical system, which, by its appearance or movements, conveys
a sense that it has intent or agency of its own.
While there is still discussion about which machines qualify as robots, a typicalrobot will have several, though not necessarily all of the following properties:
is not 'natural' i.e. artificially createdcan sense its environment, and manipulate or interact with things in it
has some degree of intelligence or ability to make choices based onthe environment, often using automatic control or a preprogrammedsequence
is programmable
moves with one or more axes of rotation or translation
makes dexterous coordinated movementsappears to have intent or agency
What about a robot which reaches the destination which you want it to reach
following the directions which you give it while comfortably sitting on your
computer terminal! That surely would be some relief to you. The system which
we have planned to design is meant for the same task.
This system can receive commands from the PC directly wherein the
commands are fed by the user specifying the directions in which the robot is to
move to reach its destination without bumping into any obstacle on its way.
(4)
http://en.wikipedia.org/wiki/Machinehttp://en.wikipedia.org/wiki/Virtualhttp://en.wikipedia.org/wiki/Artificialhttp://en.wiktionary.org/wiki/agenthttp://en.wikipedia.org/wiki/Electromechanicalhttp://en.wikipedia.org/wiki/Systemhttp://en.wikipedia.org/wiki/Intentionhttp://en.wiktionary.org/wiki/agencyhttp://en.wikipedia.org/wiki/Naturalhttp://en.wikipedia.org/wiki/Sensorhttp://en.wiktionary.org/wiki/environmenthttp://en.wiktionary.org/wiki/manipulationhttp://en.wikipedia.org/wiki/Interactionhttp://en.wikipedia.org/wiki/Intelligencehttp://en.wikipedia.org/wiki/Computer_programhttp://en.wikipedia.org/wiki/Axis_of_rotationhttp://en.wikipedia.org/wiki/Translation_%28geometry%29http://en.wikipedia.org/wiki/Dexterityhttp://en.wikipedia.org/wiki/Motion_%28physics%29http://en.wikipedia.org/wiki/Motion_%28physics%29http://en.wikipedia.org/wiki/Dexterityhttp://en.wikipedia.org/wiki/Translation_%28geometry%29http://en.wikipedia.org/wiki/Axis_of_rotationhttp://en.wikipedia.org/wiki/Computer_programhttp://en.wikipedia.org/wiki/Intelligencehttp://en.wikipedia.org/wiki/Interactionhttp://en.wiktionary.org/wiki/manipulationhttp://en.wiktionary.org/wiki/environmenthttp://en.wikipedia.org/wiki/Sensorhttp://en.wikipedia.org/wiki/Naturalhttp://en.wiktionary.org/wiki/agencyhttp://en.wikipedia.org/wiki/Intentionhttp://en.wikipedia.org/wiki/Systemhttp://en.wikipedia.org/wiki/Electromechanicalhttp://en.wiktionary.org/wiki/agenthttp://en.wikipedia.org/wiki/Artificialhttp://en.wikipedia.org/wiki/Virtualhttp://en.wikipedia.org/wiki/Machine -
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
7/38
BASIC BLOCK DIAGRAM
BASIC CONCEPT
The basic concept is just the overview of the above basic block diagram. As
we can see in the above block diagram we take the the commands from the
user through a computer and generate some signals. We send these signals
to the transmitter through a microcontroller. Transmitter sends these signals to
the receiver. The receiver receives the signal and sends it serially to the
receiving microcontroller. The receiving microcontroller interprets the signal
and generates respective commands. These commands are sent to the motor
driving circuit. The motor driver circuit consists of two motors and two H-
Bridges connected to each motor. H-Bridge is a circuit used to drive the motor
in both directions without reversing the polarity.
So this way we are trying to control the motion of the robot. This a basic way
by which we can control the motion.
(5)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
8/38
ALGORITHM
1. START
2. Get the input from the user.
3. Compare the user input with the respective command.
4. According to the command, generate a signal.
5. Send the generated signal to the parallel port of the computer.
6. Receive the signal from the parallel port of the transmitting
microcontroller.
7. According to the input generate signals to be transmitted in the
microcontroller.
8. Send the generated signal to the transmitter from the serial port of the
microcontroller.
9. Receive the signal from the serial port of the receiving microcontroller.
10. Check the signals according to the transmitted data and generate
commands for the motor.
11. Send generated signal to the motor driving circuit from the
microcontroller.
12. If command is to exit go to STEP 14 else go back to the STEP 2.
13. STOP
(6)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
9/38
BASIC BLOCKS
Mother controller(Pentium 4) In the computer
Transmitter unit
1) Transmitting Microcontroller
2) Transmitter
Receiver unit
1) Receiving Microcontroller
2) Reciever
Motor unit
1) H-Bridge
2) DC Motors
On-board power supply
1) DC Battery
2) Voltage Regulator
Robot body
(7)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
10/38
DETAILED BLOCK DIAGRAM:
(8)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
11/38
DETAILS OF THE COMPONENTS
1) Mother controller (Pentium 4)
Produced:From 2000 to2008
Manufacturer: Intel
CPU speeds:1.3 GHz to3.8 GHz
FSB speeds: 400 MT/s to1066 MT/s
Instruction set: x86 (i386),x86-64
Microarchitecture:
Net Burst
The Pentium 4 brand refers to Intel's single-core mainstream desktop andlaptop CPUs introduced on November 20, 2000 (August 8, 2008 is the date oflast shipments of Pentium 4s). They had the 7th-generation architecture -called NetBurst - which was the company's first all-new design since 1995,when the Intel P6 architecture of the Pentium Pro branded CPUs had beenintroduced. The NetBurst differed from the preceding Intel P6 - of CPUs
branded Pentium III, II, etc. - by featuring a very deep instruction pipeline toachieve very high clock speeds (up to 4 GHz) limited only by max. powerconsumption (TDP) reaching up to 115 W in 3.63.8 GHz Prescotts andPrescotts 2M (a high TDP requires an additional cooling that can be noisy orexpensive). In 2004, the initial 32-bit x86 instruction set of the Pentium 4branded microprocessors was extended by the 64-bit x86-64 set.
(9)
http://en.wikipedia.org/wiki/Central_processing_unithttp://en.wikipedia.org/wiki/Hertzhttp://en.wikipedia.org/wiki/Hertzhttp://en.wikipedia.org/wiki/Front_side_bushttp://en.wikipedia.org/wiki/MT/shttp://en.wikipedia.org/wiki/MT/shttp://en.wikipedia.org/wiki/Instruction_sethttp://en.wikipedia.org/wiki/X86http://en.wikipedia.org/wiki/I386http://en.wikipedia.org/wiki/X86-64http://en.wikipedia.org/wiki/Microarchitecturehttp://en.wikipedia.org/wiki/Microarchitecturehttp://en.wikipedia.org/wiki/NetBursthttp://en.wikipedia.org/wiki/Intelhttp://en.wikipedia.org/wiki/CPUhttp://en.wikipedia.org/wiki/November_20http://en.wikipedia.org/wiki/2000http://en.wikipedia.org/wiki/August_8http://en.wikipedia.org/wiki/2008http://en.wikipedia.org/wiki/NetBursthttp://en.wikipedia.org/wiki/Intel_P6http://en.wikipedia.org/wiki/Pentium_Prohttp://en.wikipedia.org/wiki/CPUhttp://en.wikipedia.org/wiki/NetBursthttp://en.wikipedia.org/wiki/Intel_P6http://en.wikipedia.org/wiki/CPUhttp://en.wikipedia.org/wiki/Pentium_IIIhttp://en.wikipedia.org/wiki/Pentium_IIhttp://en.wikipedia.org/wiki/Instruction_pipelinehttp://en.wikipedia.org/wiki/Thermal_Design_Powerhttp://en.wikipedia.org/wiki/Thermal_Design_Powerhttp://en.wikipedia.org/wiki/Watthttp://en.wikipedia.org/wiki/List_of_Intel_Pentium_4_microprocessors#.22Prescott.22_.2890_nm.29_2http://en.wikipedia.org/wiki/List_of_Intel_Pentium_4_microprocessors#.22Prescott_2M.22_.2890_nm.29http://en.wikipedia.org/wiki/X86http://en.wikipedia.org/wiki/Instruction_sethttp://en.wikipedia.org/wiki/Microprocessorhttp://en.wikipedia.org/wiki/X86-64http://en.wikipedia.org/wiki/X86-64http://en.wikipedia.org/wiki/Microprocessorhttp://en.wikipedia.org/wiki/Instruction_sethttp://en.wikipedia.org/wiki/X86http://en.wikipedia.org/wiki/List_of_Intel_Pentium_4_microprocessors#.22Prescott_2M.22_.2890_nm.29http://en.wikipedia.org/wiki/List_of_Intel_Pentium_4_microprocessors#.22Prescott.22_.2890_nm.29_2http://en.wikipedia.org/wiki/Watthttp://en.wikipedia.org/wiki/Thermal_Design_Powerhttp://en.wikipedia.org/wiki/Thermal_Design_Powerhttp://en.wikipedia.org/wiki/Thermal_Design_Powerhttp://en.wikipedia.org/wiki/Instruction_pipelinehttp://en.wikipedia.org/wiki/Pentium_IIhttp://en.wikipedia.org/wiki/Pentium_IIIhttp://en.wikipedia.org/wiki/CPUhttp://en.wikipedia.org/wiki/Intel_P6http://en.wikipedia.org/wiki/NetBursthttp://en.wikipedia.org/wiki/CPUhttp://en.wikipedia.org/wiki/Pentium_Prohttp://en.wikipedia.org/wiki/Intel_P6http://en.wikipedia.org/wiki/NetBursthttp://en.wikipedia.org/wiki/2008http://en.wikipedia.org/wiki/August_8http://en.wikipedia.org/wiki/2000http://en.wikipedia.org/wiki/November_20http://en.wikipedia.org/wiki/CPUhttp://en.wikipedia.org/wiki/Intelhttp://en.wikipedia.org/wiki/NetBursthttp://en.wikipedia.org/wiki/Microarchitecturehttp://en.wikipedia.org/wiki/Microarchitecturehttp://en.wikipedia.org/wiki/X86-64http://en.wikipedia.org/wiki/I386http://en.wikipedia.org/wiki/X86http://en.wikipedia.org/wiki/Instruction_sethttp://en.wikipedia.org/wiki/MT/shttp://en.wikipedia.org/wiki/MT/shttp://en.wikipedia.org/wiki/Front_side_bushttp://en.wikipedia.org/wiki/Hertzhttp://en.wikipedia.org/wiki/Hertzhttp://en.wikipedia.org/wiki/Central_processing_unit -
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
12/38
2) 8051 Microcontroller
Intel 8051 is CISC architecture which is easy to program in assembly
language and also has a good support for High level languages. The memory
of the microcontroller can be extended up to 64k. This microcontroller is one
of the easiest microcontrollers to learn.
The 8051 microcontroller is in the field for more than 20 years. Intel 8051 is
CISC architecture which is easy to program in assembly language and also
has a good support for High level languages. The memory of the
microcontroller can be extended up to 64k.
Architecture of 8051
Architecture is must to learn because before learning new machine it is
necessary to learn the capabilities of the machine. This is some thing like
before learning about the car you cannot become a good driver. The
architecture of the 8051 is given below.
The 8051 doesnt have any special feature than other microcontroller. The
only feature is that it is easy to learn. Architecture makes us to know about the
hardware features of the microcontroller.
(10)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
13/38
The features of the 8051 are
4K Bytes of Flash Memory
128 x 8-Bit Internal RAM
Fully Static Operation: 1 MHz to 24 MHz
32 Programmable I/O Lines
Two 16-Bit Timer/Counters
Six Interrupt Sources (5 Vectored)
Programmable Serial Channel
Low Power Idle and Power Down Modes
The 8051 has a 8-Bit CPU that means it is able to process 8 bit of data at a
time. 8051 has 235 instructions.
Some of the important registers and their functions are
ACCUMULATOR- All logical & arithmetical operations
B-Mainly used in Multiplication & Division
Program Status Word (PSW)- Keeps current status of ALU
Stack Pointer (SP) -Points the Stack
Program Counter (PC)- Location of the next instruction
Data Pointer (DPTR) -Points the Location of the Data
Every microprocessor & microcontroller uses clock signals. The clock signals
are used to synchronize CPU with other peripherals in the CPU. Clock signals
are very much important for a time critical jobs. If the oscillator used is not of
good quality we will be surely loosing lots of data in serial communication.
(11)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
14/38
Pin diagram
(12)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
15/38
Power supply
8051 can handle power supply of 3.5 volts to 7 volts with no problem. Always
use a Decoupling Capacitor between the Power supply and the Ground.
Decoupling capacitors are used to avoid the spikes. Pin 40 is for VCC and Pin
20 is for Gnd.
Reset Circuitry
As soon as you give the power supply the 8051 doesnt start. You need to
restart for the microcontroller to start. Restarting the microcontroller is nothing
but giving a Logic 1 to the reset pin at least for the 2 clock pulses. So it isgood to go for a small circuit which can provide the 2 clock pulses as soon as
the microcontroller is powered.
This is not a big circuit we are just using a capacitor to charge the
microcontroller and again discharging via resistor.
CrystalsCrystals provide the synchronization of the internal function and to the
peripherals. Whenever ever we are using crystals we need to put the
capacitor behind it to make it free from noises. It is good to go for a 33pf
capacitor.
We can also resonators instead of costly crystal which are low cost and
external capacitor can be avoided. But the frequency of the resonators varies
a lot. And it is strictly not advised when used for communications projects. The8051 operates based on an external crystal. This is an electrical device which,
when energy is applied, emits pulses at a fixed frequency. One can find
crystals of virtually any frequency depending on the application requirements.
When using an 8051, the most common crystal frequencies are 12 megahertz
and 11.059 megahertz--with 11.059 being much more common.
(13)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
16/38
3) Parallel port
We have used the parallel port of the computer to send the signal from
the mother controller(Pentium 4) to the transmitter unitThe pins from 2-9 were used to send the signal to the transmitter and18-25 pins were grounded
The pin configuration and register orientation of parallel port is givenbelow:
Parallel communication
In telecommunications and computer science,parallel communications is amethod of sending several data signals over a communication link at one time.It contrasts with serial communication; this distinction is one way of severalways of characterizing a communications channel.
The basic difference between a parallel and a serial communication channel is
the number of distinct wires or strands at the physical layer used forsimultaneous transmission from a device. Parallel communications impliesmore than one such wire/strand, in addition to a ground connection.
(14)
http://en.wikipedia.org/wiki/Telecommunicationshttp://en.wikipedia.org/wiki/Computer_sciencehttp://en.wikipedia.org/wiki/Serial_communicationhttp://en.wikipedia.org/wiki/Channel_%28communications%29http://en.wikipedia.org/wiki/Physical_layerhttp://en.wikipedia.org/wiki/Physical_layerhttp://en.wikipedia.org/wiki/Channel_%28communications%29http://en.wikipedia.org/wiki/Serial_communicationhttp://en.wikipedia.org/wiki/Computer_sciencehttp://en.wikipedia.org/wiki/Telecommunications -
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
17/38
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
18/38
Amplitude modulation (AM) is a technique used in electroniccommunication, most commonly for transmitting information via a radio carrierwave. AM works by varying the strength of the transmitted signal in relation to
the information being sent.
In its basic form, amplitude modulation produces a signal with powerconcentrated at the carrier frequency and in two adjacent sidebands.
(16)
http://en.wikipedia.org/wiki/Radiohttp://en.wikipedia.org/wiki/Carrier_wavehttp://en.wikipedia.org/wiki/Carrier_wavehttp://en.wikipedia.org/wiki/Sidebandhttp://en.wikipedia.org/wiki/Sidebandhttp://en.wikipedia.org/wiki/Carrier_wavehttp://en.wikipedia.org/wiki/Carrier_wavehttp://en.wikipedia.org/wiki/Carrier_wavehttp://en.wikipedia.org/wiki/Radio -
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
19/38
5) Reciever
The RX3310A is a fully integrated, amplitude-shift-keying (ASK) modulation,
single chip receiver. It is designed to operate in a variety of low power radio
applications. All popular radio frequencies from 250 MHz to 450 MHz may be
supported by simply choosing the appropriate external components. Particular
emphasis has been placed on low current consumption. Average current
consumption is 2.6 mA in normal operation mode and 25 mA in power down
mode under VCC=3.0volts.
Features
Wide frequency range: 250 MHz to 450 MHz
High sensitivity
Low power consumption
Automotive temperature range
High integration level requiring few and inexpensive externalcomponents
SOP 18L package or SSOP 20L package
(17)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
20/38
Pin diagram
(18)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
21/38
6) H-Bridge
To control a dc motor we have to first convert digital output to a signal whichcan run motors so we have used the H-bridge. Here we have a simple H-bridge circuit. The motor is denoted by M and the input signals are provided at
A and B respectively.
An H-bridge is an electronic circuit which enables DC electric motors to berun forwards or backwards. These circuits are often used in robotics. H-bridges are available as integrated circuits, or can be built from separatecomponents.
Structure of a H-bridge (highlighted in red)
The two basic states of a H-bridge.
The term "H-bridge" is derived from the typical graphical representation ofsuch a circuit. An H-bridge is built with four switches (solid-state ormechanical). When the switches S1 and S4 (according to the first figure) areclosed (and S2 and S3 are open) a positive voltage will be applied across themotor. By opening S1 and S4 switches and closing S2 and S3 switches, this
(19)
http://en.wikipedia.org/wiki/Electronic_circuithttp://en.wikipedia.org/wiki/Electric_motorshttp://en.wikipedia.org/wiki/Roboticshttp://en.wikipedia.org/wiki/Integrated_circuitshttp://en.wikipedia.org/wiki/Integrated_circuitshttp://en.wikipedia.org/wiki/Roboticshttp://en.wikipedia.org/wiki/Electric_motorshttp://en.wikipedia.org/wiki/Electronic_circuit -
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
22/38
voltage is reversed, allowing reverse operation of the motor. Using thenomenclature above, the switches S1 and S2 should never be closed at thesame time, as this would cause a short circuit on the input voltage source. Thesame applies to the switches S3 and S4. This condition is known as shoot-through. A solid-state H-bridge is typically constructed using reverse polarity
devices (i.e., PNP BJTs or P-channel MOSFETs connected to the highvoltage bus and NPN BJTs or N-channel MOSFETs connected to the lowvoltage bus).
The most efficient MOSFET designs use N-channel MOSFETs on both thehigh side and low side because they typically have a third of the ONresistance of P-channel MOSFETs. This requires a more complex designsince charge pump circuits must be used to drive the gates of the high sideMOSFETs. However, integrated circuit MOSFET drivers like the HarrisSemiconductor HIP4081A make this easy.
Often 2 transistors are connected together in a similar configuration as the 2transistors connected to one end of the motor. Such a configuration is called a"half bridge". A half bridge is used in some switched-mode power supply thatuse synchronous rectifier, in switching amplifiers -- and of course, 2 halfbridges are used to make a whole H-bridge.
(20)
http://en.wikipedia.org/wiki/PNP_transistorhttp://en.wikipedia.org/wiki/Bipolar_junction_transistorhttp://en.wikipedia.org/wiki/MOSFEThttp://en.wikipedia.org/wiki/Charge_pumphttp://en.wikipedia.org/wiki/Switched-mode_power_supplyhttp://en.wikipedia.org/wiki/Synchronous_rectifierhttp://en.wikipedia.org/wiki/Switching_amplifierhttp://en.wikipedia.org/wiki/Switching_amplifierhttp://en.wikipedia.org/wiki/Synchronous_rectifierhttp://en.wikipedia.org/wiki/Switched-mode_power_supplyhttp://en.wikipedia.org/wiki/Charge_pumphttp://en.wikipedia.org/wiki/MOSFEThttp://en.wikipedia.org/wiki/Bipolar_junction_transistorhttp://en.wikipedia.org/wiki/PNP_transistor -
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
23/38
(21)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
24/38
7) DC Motor
We have used two DC geared motors with power ratings 5-12V.
The two motors are placed opposite to each other in a straight alignmentwhich means we will have to provide them with opposite polarity to movethe body in a straight line.
To turn the body we have to provide power to one of the motor at a timedepending on the left or the right turn
8) DC Battery
Lead Rechargeable BatteryWorking Voltage : 12V
1.3 Ampere (less than 0.99amp at startup)
20 Hours Backup
Approximate weight : 500 gms (feasible to be mounted on the body).
(22)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
25/38
9) Voltage regulator(IC 7805)
IC 7805 is a voltage regulator which gives us constant 5V provided it is givena voltage more than 5V. It is a three terminal device with one pin ground oneas input voltage and one as output voltage i.e. 5V.
A voltage regulator is an electrical regulator designed to automaticallymaintain a constant voltage level.
It may use an electromechanical mechanism, or passive or active electroniccomponents. Depending on the design, it may be used to regulate one ormore AC or DC voltages.
Electronic symbolfor Voltage regulator
With the exception of shunt regulators, all modern electronic voltageregulators operate by comparing the actual output voltage to some internalfixed reference voltage. Any difference is amplified and used to control theregulation element. This forms a negative feedback servo control loop. If theoutput voltage is too low, the regulation element is commanded to produce ahigher voltage. For some regulators if the output voltage is too high, theregulation element is commanded to produce a lower voltage; however, many
just stop sourcing current and depend on the current draw of whatever it isdriving to pull the voltage back down. In this way, the output voltage is heldroughly constant. The control loop must be carefully designed to produce thedesired tradeoff between stability and speed of response.
(23)
http://en.wikipedia.org/wiki/Electricityhttp://en.wikipedia.org/wiki/Regulator_%28automatic_control%29http://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Alternating_currenthttp://en.wikipedia.org/wiki/Direct_currenthttp://en.wikipedia.org/wiki/Electronic_symbolhttp://en.wikipedia.org/wiki/Negative_feedbackhttp://en.wikipedia.org/wiki/Control_theoryhttp://en.wikipedia.org/wiki/Control_theoryhttp://en.wikipedia.org/wiki/Negative_feedbackhttp://en.wikipedia.org/wiki/Electronic_symbolhttp://en.wikipedia.org/wiki/Direct_currenthttp://en.wikipedia.org/wiki/Alternating_currenthttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Regulator_%28automatic_control%29http://en.wikipedia.org/wiki/Electricity -
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
26/38
10) Robot Body
It is a three wheel body with two wheels attached to two DC Motors at the
posterior of the body and a castor wheel in the front. The three wheels are
attached to a polyacrlic sheet. Polyacrlic sheet is a light plastic sheet with high
tensile strength which makes it advantageous to use to make robot bodies.
The motors used are DC Motors with specifications as mentioned above. The
wheels attached to the motors are plastic wheels which are light and tough.
The can be easily attached to the motors shaft using a adhesive. The wheel in
the front is a castor wheel. The castor wheel is a free rotating wheel with two
dimensional degree of freedom i.e. it can move in any direction depending on
the direction of force on a plane.
The body of the robot should be levelled with respect to a plane surface andwheels should placed according to the centre of the mass of the body. So that
the robot can move in a specified direction with optimum speed without
changing its direction due to imbalance.
Below is a diagram how a robot body will look like:
Fig: ROBOT BODY
(24)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
27/38
SOFTWARES
Softwares used:
1. KEIL C
Keil development tools for the 8051 Microcontroller Architecture support every
level of software developer from the professional applications engineer to the
student just learning about embedded software development.
The industry-standard Keil C Compilers, Macro Assemblers, Debuggers, Real-
time Kernels, Single-board Computers, and Emulators support all 8051
derivatives and help you get your projects completed on schedule.
The Keil 8051 Development Tools are designed to solve the complex
problems facing embedded software developers.
When starting a new project, simply select the microcontroller you usefrom the Device Database and the Vision IDE sets all compiler,assembler, linker, and memory options for you.
Numerous example programs are included to help you get started withthe most popular embedded 8051 devices.
The Keil Vision Debugger accurately simulates on-chip peripherals(IC, CAN, UART, SPI, Interrupts, I/O Ports, A/D Converter, D/AConverter, and PWM Modules) of your 8051 device. Simulation helpsyou understand hardware configurations and avoids time wasted onsetup problems. Additionally, with simulation, you can write and testapplications before target hardware is available.
When you are ready to begin testing your software application withtarget hardware, use the MON51, MON390, MONADI, or FlashMON51Target Monitors, the ISD51 In-System Debugger, or the ULINK USB-
JTAG Adapter to download and test program code on your targetsystem.
(25)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
28/38
2. DEV C++
Dev-C++is a full-featured Integrated Development Environment (IDE) for the
C/C++ programming language. It uses Mingw port of GCC (GNU Compiler
Collection) as it's compiler. It can creates native Win32 executables, either
console or GUI, as well as DLLs and static libraries. Dev-C++ can also beused in combination with Cygwin or any other GCC based compiler.
Dev-C++ features are:
Support GCC based compilers (Mingw included)
Integrated debugging (with GDB)
Support for multiple languages (localization)
Class and Debug variable Browser
Code Completion
Function Listing
Project Manager
Customizable syntax highlighting editor
Quickly create Windows, console, static libraries and DLL
Support of templates for creating your own project types
Make file creation
Edit and compile Resource file
Tool Manager
Find and replace facilities
(26)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
29/38
PROGRAMS USED:
USER TERMINAL PROGRAM
RECEIVING MICROCONTROLLER PROGRAM
TRANSMITTING MICROCONTROLLER PROGRAM
(27)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
30/38
1) USER TERMINAL
Flow Chart:
YES YES YES YES
NO
YES
DELAY
SEND X TO PARALLEL PORT
X= 1000 X= 0100 X= 0010 X= 0001
EXIT
INPUT
BACKWARD
INPUT
FORWARD
INPUT
LEFT
INPUT
RIGHT
START
GET THE INPUT
FROM USER
STOP
NO
NO
NONO
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
31/38
Program:
#include
#include
#include "pt_ioctl.c"
int __cdecl main()
{
OpenPortTalk();
char input;
printf("start");
while(1){
input=getch();
if(input=='w')
{
outportb(0x378,128);
sleep(100);
outportb(0x378,255);}
if(input=='z')
{
outportb(0x378,64);
sleep(100);
outportb(0x378,255);
}
if(input=='a')
{
outportb(0x378,32);
sleep(100);
outportb(0x378,255);
}
(29)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
32/38
if(input=='d')
{
outportb(0x378,16);
sleep(100);outportb(0x378,255);
}
if(input=='s')
break;
}
ClosePortTalk();
}
(30)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
33/38
2) TRANSMITTING MICROCONTROLLER
Flow Chart:START
GET THE INPUT
FROM USER
INPUT
0100?
INPUT
1000?
INPUT
0010?
INPUT
0001?
SBUF=l SBUF=a SBUF=h SBUF=z
SEND SBUF TO SERIAL PORT
YES YES YES YES
NO
NO
NONO
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
34/38
Program:
#include
#include
Main ()
{
TMOD = 0x20;
TH1=0xFD;
SCON=0x50;
TR1=1;
while(1)
{
if(P0_0==1)
{
SBUF='1';
while(TI==0);
}
TI=0;
if(P0_1==1)
{
SBUF='a';
while(TI==0);
}
TI=0;
if(P2_0==1)
{
SBUF='h';
while(TI==0);
}
TI=0;
if(P2_1==1)
{
SBUF='z';
while(TI==0);
}
TI=0;
}
}
(32)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
35/38
3) RECEIVING MICROCONTROLLER
Flow Chart:
SBUF=h
SBUF=a
SBUF=z?SBUF=l?
START
GET I/P FROM
SERIAL PORT
YES YES YES YES
NO
NO
NONO
PORT2=0X0D PORT2=0X07PORT2=0X0APORT2=0X05
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
36/38
Program:
#include
#include
void main(){
unsigned char mybyte;
long int i;
TMOD=0x20;
TH1=0xFD;
SCON=0x50;
TR1=1;
while(1)
{
P2=0xFF;
while(RI==0);
mybyte=SBUF;
P1=mybyte;
RI=0;
if(mybyte == '1')P2=0x05;
else if(mybyte == 'a')
P2=0x0A;
else if(mybyte == 'h')
P2=0x0D;
else if(mybyte == 'z')
P2=0x07;
}}
(34)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
37/38
CONCLUSION
The system was working properly and ninety percent was implemented. The
user interface at the computer successfully generated the signals according to
the user commands. These signals were successfully transmitted and
received at the robot end and checked at the oscilloscope. The received
signal was interpreted by the microcontroller at the receiving end and
corresponding commands were sent to the motors.
The problems faced were in the serial communication at the microcontrollersat both receiving and transmitting side. As the signal was to be synchronized
and proper baud rate was to be set.
And secondly since we did not include any signal amplification or signal
processing block at the receiving side. The signal we received had some
noise and more importantly was weak. Due to this there was interrupted
motion and it also caused some delay in processing at the receiver side.
(35)
-
8/4/2019 WirelessPCControlledManeuveringusing8051microcontrollerandparallelportprogramming
38/38
BIBLOGRAPHY
BOOKS
1. The 8051 microcontroller and embedded system.M.A. Mazidi and J.G.
Mazidi
2. Electronic devices and circuit theory.Boylsted and Nashelsky
3. Electronic Communication Systems.Kenedy and Davis
4. Linear integrated circuits and systems.Gaykwad
5. The 8051 Microcontroller.K.J. Ayala
6. C and 8051.T.W. Schulz
INTERNET
1. http://en.wikipedia.org
2. http://www.ieee.org
3. http://www.atmellabs.com
4. http://www.appinlabs.com
5. http://www.smartdata.com
6. http://www.vegakit.com
7. http://www.smartdata.com
(36)
http://en.wikipedia.org/http://en.wikipedia.org/http://www.ieee.org/http://www.ieee.org/http://www.atmellabs.com/http://www.atmellabs.com/http://www.appinlabs.com/http://www.appinlabs.com/http://www.smartdata.com/http://www.smartdata.com/http://www.vegakit.com/http://www.vegakit.com/http://www.smartdata.com/http://www.smartdata.com/http://www.smartdata.com/http://www.vegakit.com/http://www.smartdata.com/http://www.appinlabs.com/http://www.atmellabs.com/http://www.ieee.org/http://en.wikipedia.org/