DC motor control with SCR
In this project we will on/off the DC motor using TV remote . we are using RC5 standard of remote to control it. We are using Philips TV remote.
Its a low cost control system. We will press keys 1,2,3---- and will control devices and stepper motor. We are using TSOP1738 in this project. It works on 38 KHz. It give serial data at pin no 14(p3.3) of 89s51 microcontroller. We are using microcontroller 8051 which we studied in 8085 microprocessor. We can do programming of microcontroller to control in C or assembly or other language. We are doing programming in assembly because its easy.89s51 is Atmel company’s IC. Its also low cost IC
Philips RC-5 Protocol
The RC-5 code from Philips is possibly the most used protocol by hobbyists,
probably because of the wide availability of cheap remote controls.
The protocol is well defined for different device types ensuring compatibility with your whole entertainment system. Lately Philips started using a new protocol called RC-6 which has more features.
· 5 bit address and 6 bit command length (7 command bits for RC5X)
· Bi-phase coding (aka Manchester coding)
· Carrier frequency of 36kHz
· Constant bit time of 1.778ms (64 cycles of 36 kHz)
· Manufacturer Philips
The protocol uses bi-phase modulation (or so-called
Manchester coding) of a 36kHz IR carrier frequency. All bits are of equal length
of 1.778ms in this protocol, with half of the bit time filled with a burst of
the 36kHz carrier and the other half being idle. A logical zero is represented
by a burst in the first half of the bit time. A logical one is represented by a
burst in the second half of the bit time. The pulse/pause ratio of the 36kHz
carrier frequency is 1/3 or 1/4 which reduces power consumption.
The drawing below shows a typical pulse train of an RC-5 message. This example transmits command $35 to address $05.
The first two pulses are the start pulses, and are both logical "1". Please note
that half a bit time is elapsed before the receiver will notice the real start
of the message.
Extended RC-5 uses only one start bit. Bit S2 is transformed to command bit 6, providing for a total of 7 command bits. The value of S2 must be inverted to get the 7th command bit though!
The 3rd bit is a toggle bit. This bit is inverted every time a key is released
and pressed again. This way the receiver can distinguish between a key that
remains down, or is pressed repeatedly.
The next 5 bits represent the IR device address, which is sent with MSB first. The address is followed by a 6 bit command, again sent with MSB first.
A message consists of a total of 14 bits, which adds up to a total duration of 25 ms. Sometimes a message may appear to be shorter because the first half of the start bit S1 remains idle. And if the last bit of the message is a logic "0" the last half bit of the message is idle too.
As long as a key remains down the message will be repeated every 114ms. The toggle bit will retain the same logical level during all of these repeated messages. It is up to the receiver software to interpret this auto repeat feature.
PS: I had rather a big error on this page for quite some time. For some mysterious reason the LSB and MSB of the address and command were reversed. I can recall correcting this error before, but somehow an old version of the description must have sneaked its way up to the internet again.
Philips has created a beautiful list of "standardized" commands. This ensures
the compatibility between devices from the same brand.
A very nice feature, often to be missed with other brands, is the fact that most devices are available twice in the table allowing you to have 2 VCRs stacked on top of each other without having trouble addressing only one of them with your remote control.
I can only show a limited list of standard commands, for this list is about all I know right now.
These are the motors that are commonly found in the toys and the tape recorders. These motors change the direction of rotation by changing the polarity. Most chips can't pass enough current or voltage to spin a motor. Also, motors tend to be electrically noisy (spikes) and can slam power back into the control lines when the motor direction or speed is changed.
Specialized circuits (motor drivers) have been developed to supply motors with power and to isolate the other ICs from electrical problems. These circuits can be designed such that they can be completely separate boards.
A very popular circuit for driving DC motors (ordinary or gear head) is called an H-bridge. It's called that because it looks like the capital letter 'H' on classic schematics. The great ability of an H-bridge circuit is that the motor can be driven forward or backward at any speed, optionally using a completely independent power source
Sensor:-In this project we will connect three pin
Sensor have three pins one VCC, ground and out. It works on 38Khz. Signal decoded by 89s52 at pin no p3.3. output of microntroller will be connected at port1.ports 1st and 2nd pin is connected to isolator circuit. Isolators are optocoupler pc 817. pc 817 is 4 pin ic. In PC 817 contain LED and phototransistors in built. When led work then transistor work. Negative of in built LED in pc 817 is connected to microcontroller. Positive of microcntroller is connected to VCC 5v. 3 pin of PC 817 is connected to ground. Output of PC 817 is pin 4 . 4.7k ohm is connected to VCC. Output of pin 4 is connect to bases of transistors npn and pnp. H bridge circuit contain transistors. Hbridage circuit work as current and voltage amplifier.
Bases of transistors connected to output of pc817. and emitters are output to motors. We are using DC geared motors..
DC geared motors are of 100 RPM and 12 v.
It take 50 to 100 mA current.
In relay drive drive circuit we will control the 12v Dc relay. It can control device of 220v AC-7Ampere. Its called cube type relay in market. Many qualities available in the market. It will have five pins.
Two for coil ,three for switch.
For relay drive circuit we will take active low output from microcntroller . when pulse come from microcntroller. It will go to BC 558. collector of BC 558 is connected to npn transistors . npn transistor will give low signal to relay coil. Other end of relay is already connected to VCC 12v. when current will flow from relay then connections will change . in this way relay will work as a switch.
Figure 6 - Schem WELCOME TO THE WORLD OF THE MICROCONTROLLERS.
Notice the smart “intelligent” systems? Be it the T.V, washing machines, video
games, telephones, automobiles, aero planes, power systems, or any application
having a LED or a LCD as a user interface, the control is likely to be in the
hands of a micro controller!
Measure and control, that’s where the micro controller is at its best.
Micro controllers are here to stay. Going by the current trend, it is obvious that micro controllers will be playing bigger and bigger roles in the different activities of our lives.
These embedded chips are very small, but are designed to replace components much bigger and bulky In size. They process information very intelligently and efficiently. They sense the environment around them. The signals they gather are tuned into digital data that streams through tributaries of circuit lines at the speed of light. Inside the microprocessor collates and calculators. The software has middling intelligence. Then in a split second, the processed streams are shoved out.
What is the primary difference between a microprocessor and a micro controller?
microprocessor, the micro controller can be considered to be a true “Computer on
In addition to the various features like the ALU, PC, SP and registers found on a microprocessor, the micro controller also incorporates features like the ROM, RAM, Ports, timers, clock circuits, counters, reset functions etc.
microprocessor is more a general-purpose device, used for read, write and
calculations on data, the micro controller, in addition to the above functions
also controls the environment.
8051 micro controller
The 8051 developed and launched in the early 80`s, is one of the most popular micro controller in use today. It has a reasonably large amount of built in ROM and RAM. In addition it has the ability to access external memory.
The generic term `8x51` is used to define the device. The value of x defining the kind of ROM, i.e. x=0, indicates none, x=3, indicates mask ROM, x=7, indicates EPROM and x=9 indicates EEPROM or Flash.
A note on ROM
The early 8051, namely the 8031 was designed without any ROM. This device could run only with external memory connected to it. Subsequent developments lead to the development of the PROM or the programmable ROM. This type had the disadvantage of being highly unreliable.
The next in line, was the EPROM or Erasable Programmable ROM. These devices used ultraviolet light erasable memory cells. Thus a program could be loaded, tested and erased using ultra violet rays. A new program could then be loaded again.
An improved EPROM was the EEPROM or the electrically erasable PROM. This does not require ultra violet rays, and memory can be cleared using circuits within the chip itself.
Finally there is the FLASH, which is an improvement over the EEPROM. While the terms EEPROM and flash are sometimes used interchangeably, the difference lies in the fact that flash erases the complete memory at one stroke, and not act on the individual cells. This results in reducing the time for erasure.
Different microcontrollers in market.
· PIC One of the famous microcontrollers used in the industries. It is based on RISC Architecture which makes the microcontroller process faster than other microcontroller.
· INTEL These are the first to manufacture microcontrollers. These are not as sophisticated other microcontrollers but still the easiest one to learn.
· Atmel Atmel’s AVR microcontrollers are one of the most powerful in the embedded industry. This is the only microcontroller having 1kb of ram even the entry stage. But it is unfortunate that in India we are unable to find this kind of 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. There are lots of books and study materials are readily available for 8051.
In this discussion the term diode and rectifier will be used interchangeably; however, the term diode usually implies a small signal device with current typically in the milliamp range; and a rectifier, a power device, conducting from 1 to 1000 amps or even higher. Many diodes or rectifiers are identified as 1N4007. A semiconductor diode consists of a PN junction and has two (2) terminals, an anode (+) and a cathode (-). Current flows from anode to cathode within the diode. A diode and schematic representation are shown below.
An ideal diode is like a light switch in your home. When the switch is closed, the circuit is completed; and the light turns on. An ideal diode & a typical diode characteristic would be:
Junction transistors consist of two junctions made from N-type and P-type semiconductor materials and are called bipolar transistors (two polarities). They have three connections emitter, base, and collector.
The forward biased base/emitter junction causes electrons to be attracted from the emitter area towards the base. Arriving in the base area, most of the negative electrons come under the influence of the more positive collector and are attracted by it. This is shown in the left hand drawing, where the base current plus collector current equals the emitter current. Alpha gain is collector current divided by emitter current, and is always less than 1. Beta gain is collector current divided by base current and can be fairly high number. Therefore, causing a small base current to flow makes a much larger collector current to flow. A small base current controls a large collector current. There is 0.6 volts across the base\emitter junction, where it is forward biased (0.3 volts for germanium).
Pin no 8 is connected to the positive supply +5 volt. Pin no 4 is ground pin. Pin no 1, 2, 3 is 3 address line. Here we use 0 address base, so we connect all the pins of the 24c02 is to zero point. Pin no 5 is connected to the port P2.3 and pin no 6 is connected to the p2.2 and pin no 7 is connected to the p2.1 of the 89S52 micro controller.
The PCB can use any power supply that creates a DC voltage between 6 and 12 volts. A 5V voltage regulator (7805) is used to ensure that no more than 5V is delivered to the PCB regardless of the voltage present at the J12 connector (provided that voltage is less than 12VDC). The voltage regulator functions by using a diode to clamp the output voltage at 5VDC regardless of the input voltage - excess voltage is converted to heat and dissipated through the body of the regulator. If a DC supply of greater than 12V is used, excessive heat will be generated, and the PCB may be damaged. If a DC supply of less than 5V is used, insufficient voltage will be present at the regulators output.
If a power supply provides a voltage higher than 7 or 8 volts, the regulator must dissipate significant heat. The "fin" on the regulator body (the side that protrudes upward beyond the main body of the part) helps to dissipate excess heat more efficiently.
Water pump control
Boilers control- it can be used to control boiler ,furnaces and remote high temperature equpments
Safety devices- we are adding power failure option in project that’s why we can use this project to protect losses due to power failure.