DC motor interfacing to PICMicro | Anna university questions papers projects for EEE,ECE,IT,MECHANICAL,MBA,MCA Anna university questions papers projects for EEE,ECE,IT,MECHANICAL,MBA,MCA: DC motor interfacing to PICMicro Bank Exam question paper, GATE Papers,Combined Defence Service Examination papers ,TANCET,BSNL JTO,ISRO,EBOOKS,DRDO ,BARC, , NTPC ,BHEL ,BEL ,HAL,Anna University Papers,ECE , EEE , CSE , IT , Mech , BIOMEDICAL , Textile , MBA , MCA , Anna University Question Bank , Anna University Syllabus , Anna University 'Q' Papers , Gate Papers , 8051, AVR, 8051 projects, free 8051 microcontroller projects, AVR projects, AVR tutorial, AVR microcontroller projects, circuits, hobby electronics, microcontroller based projects, microcontroller projects, final year projects, electronic projects, electronics projects, circuit diagrams, pin diagram, pin description, interfacing with AT89C51, 8051 tutorials, embedded projects, serial port, sensor, Electronic Components, Electronic Circuits, circuits for hobbyist, electronic schematics, DIY projects, breadboard circuits, at89c51, 8051 code, advanced circuits, hobby projects, circuit ideas, embedded system, embedded C, microcontroller programming in C, LCD interfacing, ADC interfacing, circuit components, hobby circuits, seven segment display, 89c51 projects, circuit description, major projects, minor projects, projects for circuit branches, interrupt, 8051 programming, RS232, 8 bit microcontroller,Microcontroller Tutorials, PIC Tutorial, 8051 Microcontroller Tutorial Resource, Connect to the PIC, PIC Tutorials, Micro Controller Tutorials, PIC Micro controller Tutorial Resource, DALLAS 80C320, DS80C320, Connect to the PIC, PIC Tutorials, Dallas DS80C320, 8051 Introduction, Types of Memory, Special Function Registers, Basic Registers, Addressing Modes, Program Flow, Low Level Information, 8051 Timers, 8051 Serial Port Operations, 8051 Interrupts, Additional Features of 8052, 8052 Instruction Set, Computer Science Seminar Topics, Mechanical Engineering Seminar Topics,Electrical Seminar Topics,Electronics Seminar Topics,Seminar Abstract And Report Downloads,High-Speed Architecture, New Instruction Speed, Variable Length MOVX Instruction, Timer Considerations, Dual Data Pointer, Watchdog Kicking, The Watchdog Watchdog Interrupt, Watchdog System Resets, Power Failure Functions, Power Failure Reset, Power Failure Interrupt, Secondary Serial Port, Timed Access Protection, PIC16F877A Tutorial, Introduction to the PIC16F877A, How to hook up the PIC so it will run?, What do the pins mean?, How to program the PIC?, Miscellaneous Advice, LED Blinker, Photoresistor Input, Analog Input (Photoresistor, Sonar sensor, IR sensor, Digital Input (Switches), Output messages to computer screen, Servo Motor Output, DC Motor Output,Gate sample paper with solution , Engineering E-Books , Free ebook websites , Final Year Projects , Placement papers,anna university previous year question bank, previous year question paper,model question paper, two mark question paper,sex,adult,results,atmel humidity Assembly Language code, Digital Clock Employing Memory Mapping, Humidity Sensing, Microcontroller51,control solid state relays, decoded 74ls138, latech 73ls373, port expander, Solid State Relays,urn ON, turn OFF, Relay Driver, back EMF, holding, current, pullup, resistor, coil, BC547, ULN2003, ULN2803, npn, transistor, microcontroller, Technology, circuit,bharathidasan university,university,thanjavur,madurai,coimbatore,chennai,adult,porn,sastra,sastra university, placement and training cell,java,j2ee,ajax,c,c++,oracle,COMPUTER SCIENCE,embedded, embedded systems, j2ee, dotnet, j2me, dot net, jsp, vb, c#, c, c sharp, computer science, cse, information technology, it, Electrical, Electronics, communication,SURVEY,ONLINE JOB,PAY TO CLICK,SEBOSA, ece, eee, academic, college, instrumentation, control, control systems, best ,project centers, project centres, company, companies, software, telecommunication, telecom, networking, matlab, robotics, Artificial intelligence, automation, cloud computing, cryptography, data mining, dsp, database, digital, image processing, fuzzy logic, gsm, gps, gprs, mobile computing, networks, network security, php, power, systems, vlsi, hardware, web services, wireless, rf, rfid, microcontroller, ns2, 2010, titles, list, download, latest, free, advanced, low cost, placement, zigbee, Chennai, india, uk, SOFTWARE ENGINEERING, APPLIED ELECTRONICS, VLSI Design, M.E,EMBEDDED SYSTEMS, COMMUNICATION SYSTEMS,Memory Organization, Microcontroller to LCD, moving message display using 8051 microcontroller, MOVING MESSAGE DISPLAY USING ATMEL 89C51, PIN Configuration, Programming Aspects, POWER ELECTRONICS, 89c51, 89s51 moving message display board, microcontroller 8051,8051, AVR, 8051 projects, 8051 microcontroller projects, AVR projects, AVR tutorial, AVR microcontroller projects, electronics projects, free electronic circuits, circuit diagrams, circuits, schematics, hobby electronic projects, electronic projects, hobby electronic circuit diagram, final year projects, embedded projects, technical articles. Interfacing microcontroller 8051 with peripherals like ADC, LCD, EEPROM,solenoid valve atmel dc control triac,dimmer bt138,uln2003 microcontroleur interfacing a microprocessor to a power thyristor microcontrol based level mesurement 89c51 as pwm controller,at89c2051 sine wave pwm,8051 lift, circuit design for a elevator, Elevator Lift control for three stories with microcontroller 8051, microcontroller based lift controller for three stories, three stories lift,ericsson at command microcontroller, GSM/ EDGE Modem in PCI Interface, Interface of mobile phone with micro-controller, Supporting AT commands,embedded projects,8051,pic,arm,pic16f877a,qualifity,best project in thanjavur,relay design,product manufuring,dvd,vcd,service,free training,electrical and electronic circuits,pcb board design,help of embedded,earn money with embedded,part time job,home based job,vacancy,ieee transaction,optimization,website design,university, Chapter 2 Liquid Crystal Display, Character Generator RAM, DDRAM or CGRAM, Display on or off control, LCD, microcontroller interface with LCD, PIN Configuration, Pressure monitoring with microcontroller 8051, Pressure sensing and controlling, Pressure Sensing System, Programmable Peripheral Interface, RS-232 serial communication,diploma in embedded,matlab in thanjavur, seo,site design @2900 onwards, 8255 and RS232, 89s51 LCD display LM 35 ADC0804 measurment, construction of a pressure sensing system using 8051, designed pressure sensor and transducer,microcontroller based heart rate meter,8051 pin diagram,invention heart rate meter,heart meter watch,heart beat monitor project,8051,AVR,8051 projects,free 8051 microcontroller projects,AVR projects,AVR tutorial,AVR microcontroller projects,circuits,hobby electronics,microcontroller based projects,microcontroller projects,final year projects,electronic projects,electronics projects,circuit diagrams,pin diagram,pin description,interfacing with AT89C51,8051 tutorials,embedded projects,serial port,sensor,Electronic Components,Electronic Circuits,circuits for hobbyist,electronic schematics,DIY projects,breadboard circuits,at89c51,8051 code,advanced circuits,hobby projects,circuit ideas,embedded system,embedded C,microcontroller programming in C,LCD interfacing,ADC interfacing,circuit components,hobby circuits,seven segment display,89c51 projects,circuit description,major projects,minor projects,projects for circuit branches,interrupt,8051 programming,RS232,8 bit microcontroller,microcontroller based heart beat monitor,8051 isp programmer,heartbeat monitor and display on LCD,heart beat rate monitor with sensor,training heart rate monitor with comaprators ans sensor,8051 microcontroller application,optocoupler based sensor of runner heart rate monitor,how to measure heart beat, calculate heartbeat just in one second,8051 rtos,limitations of heart rate monitors, quick display of heart monitor,advantages of electronic medical records,electronic medical billing,used electronic test equipment,electronic document management solution,fetal heart rate monitor,wrist heart rate monitor,avr 8051,baby heart monitor,heart beat counter using microcontroller 8051, block diagram for ir led and ldr based heartbeat monitor with display on computer, MICROCONTROLLER AT89C2051 BASED HEART BEAT MONITOR (PULSE RATE wth assembly code),ir led and ldr based heartbeat monitor with display on computer,wireless biomedical monitoring system using 89S52 microcontroller,wireless biomedical monitoring system using 89S52 microcontroller,8051microcontroller based heart beat monitor,heart pulse system project,very cheap cost in india,lm35,temperature sensor,heart beat sensor,technology,solutions,sastra university,data base design,speed ,innovative centre,home security system model design, water level indicator for home,COMPUTER SCIENCE, SOFTWARE ENGINEERING, APPLIED ELECTRONICS, VLSI Design,IEEE Project center, IEEE 2010 Projects in Tanjore, trichy, Kumbakonam, Pudukkottai, Ariyalur, Pattukkottai, Best IEEE Projects, final year projects, Project Center in Trichy, Project Company in thanjavur, Project training @ tanjore, Free 8051 Microcontroller projects,8052 projects,microcontroller,projects, Datasheers,circuit diagram,Microcontroller,8051,AVR,8085 Microprocessor,BASCOM,projects,tutorials,codes,Libraries,interfacing examples,embedded projects,serial port,infrared remote controls,rf remote controls,home automation,Intel 8051 microcontroller,electronic projects,embedded systems,control systems,computers,technical books,software,assembly language,programming intels 8051,serial communications,rs232,Electronics Projects,Books,Home Automation,Computer Software,Assemblers,Compilers,applications Programming,Embedded Systems Design,8052,AT89C2051,robotics applications,visualbasic, Microsoft Visual Basic,system, based, solar, control, intelligent, motor, controller, vehicle, monitoring, pwm, detection, home, temperature, tracking, alert, blind, alcohol, automated, automatic, close,Robotics,Kits,Circuit Examples,8051,Robots,micro Code,AT89c51, Programmer,IEEE 2010 embedded systems, embedded programming, PIC Micro projects, Microchip Programming, AVR tutorials, PIC Micro tutorials, ATMEL, Microcontrollers based systems, Microcontroller Projects, Embedded projects, Embedded designing in C, Microchip Lab, Embedded systems tips, DIY Electronics,Project Detail,onlinejob, Data Entry, no fee, no investment, part time, home based,recuirements,job,consultancy,helpline,maths,power,ultimate knowledge,prodigy,trichy,mobile
100% FAT LOSS TIPS Click Here!

DC motor interfacing to PICMicro

, Posted by ADMIN at 11:17 AM

Description

Perhaps one of the most entertaining things to do with an embedded microcontroller is to get it to actually move something. Three very popular devices used to "make things move" include dc motors, RC servos, and stepper motors. This lab session will look at how you can interface a dc motor to a PIC microcontroller.

Required Theory

DC motors are simple two-lead, electrically controlled devices that convert electrical power into mechanical power through the interaction of two magnetic fields. One field is usually produced by a stationary permanent magnet (on the stator), and the other field is produced by an electric current flowing in the motor coil (on the rotor). The interaction of the two fields results in a torque that tends to rotate the rotor. For this experiment, a reversible, permanent magnet, brushed DC motor is selected. The term 'reversible' means the rotation of the motor can be reversed by simply flipping the terminals of the DC power supply. One such motor is shown below. I got it from my old broken printer. The dc motors are found in CD players, toy cars, cassette player, printers, etc.

Modes of a brushed dc motor

A brushed dc motor has four fundamental modes: clockwise mode, counter-clockwise mode, coast mode, and brake mode. In clockwise mode, the motor rotates in the direction of the clock, and the counter-clockwise mode is just the reverse of the clockwise mode. Switching between clockwise and counter-clockwise rotation is very simple. It can be done by simply flipping the terminals of either the power source or the motor itself.

The coast mode  refers to the free spinning mode of the motor. If you twist the motor shaft with your fingers, leaving both the terminals of the motor open, you will see the shaft continues to rotate for a short time, until the kinetic energy of the shaft is totally consumed through friction. Therefore, in coast mode, the terminals of a motor are left floating and the motor comes to stop slowly.

The brake mode is used to rapidly stop the motor, and is done by shorting both the terminals of the motor. The motor behaves as a generator when it is rotating, and if the terminals of the motor are shorted, it acts as an infinite load bringing the motor to a rapid stop. Now the energy in the motor is decayed much faster as it is consumed not only through friction but also in the motor's coil.

You can do a simple experiment to distinguish between the coast and brake mode. Take a brushed dc motor and try to spin the shaft with your fingers, leaving the leads floating. You will observe the shaft rotates freely (coast mode). Now try again with the leads shorted. You will find the motor has become more sluggish than in the coast mode.

Coast mode: Motor spins freely

Brake mode: Motor becomes more sluggish

Motor Driver

Microcontrollers are designed for data processing, which requires millions of skinny pathways and microscopic switches. On the other hand, motors are straight forward and power hungry. Because of the internal structure of microcontrollers, they cannot supply enough current needed to run a motor directly. Therefore, an external driver circuit is required to deliver the electrical power to a motor under the control of the microcontroller. Such a driver circuit can be as simple as a single transistor or as complicated as an integrated chip with some additional components attached.

Single transistor motor driver

The most basic motor driver circuit is a single transistor switch that can only turn a motor on or off. The single transistor can turn the motor on in one direction only, either clockwise or counterclockwise, depending upon how the motor is connected in the circuit. It also doesn't permit the motor to be electronically braked. The circuit diagram of a single transistor motor driver is shown below.

In this example, I have used an ordinary BC547, which is a general purpose NPN transistor. I picked this because it is inexpensive and commonly available. However, this transistor isn't very powerful, and can provide maximum driving current up to 100 mA. The objective of this tutorial is to explain the principles of motor drivers, and readers are suggested to select transistors with proper current ratings to fulfill their requirements. But this particular driver circuit is still good for driving small dc motors that require less than 100 mA current.

The working principle of this circuit is very simple. The transistor acts as a power switch for the motor. The switch can be controlled through the logic voltage applied at the On/Off terminal (see figure above). When the On/Off pin is at logic 1 (+5 V), the transistor is turned on and the motor is connected across Vcc and ground. The Vcc voltage could be greater than 5 V. Therefore, one benefit of this single transistor motor driver is that you can control a higher voltage motor (> 5 V) with a 5 V logic output from a microcontroller. The logic 0 at the On/Off terminal turns the transistor off and the motor is stopped. The 1K resistor connected in series with the base of the transistor limits the base current to a safe level.

The diode connected across the motor terminals is for the protection of the transistor. When the switch is turned off, the collapsing electromagnetic field inside the motor generates a high voltage across the motor terminals with reverse polarity. This voltage could be high enough to damage the transistor permanently. The diode provides a current path back through the motor coil, and hence prevents any high voltage formation. During normal condition the diode is reverse biased and doesn't affect the switching operation of the transistor.

In order to test this circuit, we will replace the LED in Lab 2 (Basic digital input and output) arrangement and connect the RC0 pin of PIC16F688 to the On/Off terminal of the above transistor driver circuit. Load the PIC16F688 with the same HEX code from Lab 2, and you will see the motor can be turned on and off by simply pressing the input switch. The direction of rotation could be clockwise or counterclockwise based on how the terminals of the motor are connected.

Controlling the on/off operation of a dc motor using a single transistor

H-Bridge Motor Driver

The single transistor motor driver has limitations. It can control a motor in only one direction and does not allow electronic braking too. A classic H-bridge motor driver provides all 4 operating modes of a dc motor. It is called H-bridge because its circuit looks like a capital letter H.

A standard H-bridge circuit consists of four transistors (two PNPs on top and two NPNs on the bottom as shown below). The left half of the circuit is mirrored form of the right half. The four inputs of the driver circuit are named as A, B, C, and D. When the terminal B is grounded and the terminal C is pulled high (+5 V), the transistors Q2 and Q3 conduct. This provides a path for current to flow from Vcc (+5 V), through Q2, through the motor, through Q3 to the ground. This turns the motor on in one direction. Next, if the terminals A and D are connected to ground and +5 V, respectively, Q1 and Q4 are switched on, providing a current path from Vcc (+5 V), through Q1, through the motor, through Q4, and to ground. This time the current through the motor is flowing in other direction and so the motor spins in the opposite direction.

Braking mode can be achieved either by applying logic 1 (+5 V) to pins C and D or by grounding A and B. In both the cases, the motor terminals are effectively connected.

The cost mode corresponds to when all the four transistors are turned off. This happens when A and B are at logic 1 (+5 V) while C and D are grounded. Then the motor can spin freely as the motor leads are connected to nothing.

This H-bridge will be tested with a dc motor and the PIC16F688 module. Four I/O pins of PIC16F688 are required to control the clockwise, counterclockwise, and braking modes of the dc motor. These four pins will output the appropriate logic levels at pins A, B, C, and D corresponding to the desired mode. Our test arrangement also includes 3 push buttons to provide selection inputs for clockwise rotation, counterclockwise rotation, and brake mode. The circuit diagram of the arrangement is shown below.

H-bridge setup on the breadboard

Important note

While implementing the H-bridge circuit, you must be careful about switching on the right transistors at right time. If you are not careful and switch on both Q1 and Q3 (or Q2 and Q4) simultaneously, that will result in a short circuit and the transistors may burn out. Out of 16 possible combinations for A, B, C, and D inputs, 7 results in short circuits, which must be avoided. You can also tie A with C (say, AC terminal), and B with D (BD terminal) so that now you will have only two terminals to control the motor. If you apply 1 at AC and 0 at BD, the motor runs in one direction, and switching the logic levels at AC and BD will turn the motor on in reverse direction. Applying 0 or 1 to both AC and BD will brake the motor. The important thing is you cannot leave any of the terminals AC and BD float. Let's look at the AC terminal in more detail. Since A and C are tied together, and if it is left float then there will be a path for current through the collector of Q1, through its base, through the base  of Q3, through its emitter to the ground. So, Q1 and Q3 are on resulting a short circuit. So, you must be careful if you are thinking about reducing the control pins by tying A with C and B with D. You just can't leave the tied terminals open or float. They should be either grounded or pulled high.

Once again, this circuit is just for testing a small motor under no load. If you need a more practical circuit for driving a motor with load then you should consider using transistors with higher current rating. Replacing BC557 with 2907A and BC547 with 2222A transistors can increase the driving capacity of the circuit up to 600 mA. If your requirement is still higher than that, it is suggested to use the MOSFET instead of BJTs.

Software for testing H-Bridge

/*
Lab 10: DC Motor control (H-Bridge)
Copyright @ Rajendra Bhatt, 2010.
Description: Forward and reverse motor control
MCU: PIC16F688
Oscillator: Internal clock at 4.0 MHz, MCLR Enabled
*/
sbit Forward at RA5_bit;
sbit Reverse at RA4_bit;
sbit Brake at RA2_bit;
sbit PinA at RC5_bit;
sbit PinB at RC4_bit;
sbit PinC at RC3_bit;
sbit PinD at RC2_bit;
void GetDelay(){
Delay_ms(300);
}
void main() {
CMCON0 = 0x07; // Disable comparators
ANSEL = 0b00000000;
PORTC = 0x00;
TRISC = 0b00000000; // PORTB all output
TRISA = 0b00111100; // RA5, RA4, RA2 inputs
 do {
if (!Forward){
GetDelay();
PORTC = 0;
GetDelay();
PinA = 0;
PinB = 1;
PinD = 1;
}
 if (!Reverse) {
GetDelay();
PORTC = 0;
GetDelay();
PinA = 1;
PinB = 0;
PinC = 1;
}
 if (!Brake) {
GetDelay();
PORTC = 0;
}
} while(1);
} // END main()

Download HEX file

The above H-bridge circuit has a major disadvantage that it cannot be used to drive a motor with voltage greater than 5 V (voltage for logic 1). This H-bridge circuit works because it is powered with the same voltage as that of a logic 1 voltage from the microcontroller. If you want to drive a 9 V motor and change Vcc to 9 V, then transistors Q1 and Q2 will still be on when the logic levels at terminals A and B are high (+5 V). In such a case you need an additional voltage translation circuit between the microcontroller and the H-bridge circuit that converts the logic 1 voltage (which is +5V) to 9 V. Or you can also use two additional NPN transistors to the H-bridge circuit to resolve this problem (shown below). Now the control pins are A', B', C and D. It is left for readers to figure out the appropriate logic levels at these pins for controlling the operation of the motor.

Reference:

Intermediate Robot Building by David Cook


--
With Regards,

s.m.sethupathy,
sms communication,
Tanjore -1.

mobile :9944 186 173           
      www.questionpaperlink.co.cc
      www.sethu-panguvarthagam.blogspot.com





Currently have 0 comments: